How to integrate Business Central with Dynamics 365 Talent – part 3 (inserting data with LogicApps)

The last days of the previous year, I’ve started with blog series how to integrate Business Central with Dynamics 365 Talent (now Dynamic 365 Human Resources). I wanted to show how to integrate these two solutions without code, using only available services.

I’ve started with the first post, with an overview and then continue with the second one where I explained how to configure both solutions. Now I would like to continue with the third part where I’ll explain integration tools we can use.

Generally, you can use Flow (Power Automation) or Azure Logic Apps. Personally, for this purpose I prefer Logic Apps. There are many reasons for this, and I’ll show the basic comparison between these two solutions:

I don’t want to say Flow is not good solution as I enjoy in using it, but for this purpose (integration) I think Logic Apps is much better choice.

To use Logic Apps, first you must have an Azure subscription. When you open an Azure portal, you can easily find Logic Apps using a search feature. Create a new Logic Apps using Add command.

If you already used Microsoft Flow, you will find that Logic Apps are very similar, but as this is on the first place Azure service, you have to make some basic configuration as a choosing a service Name, what Subscription you want to use, Resource Group and Location for your service.

Then you just need to click on Create and wait a few seconds. If you still don’t see new service, probably you need to hit Refresh and new service will appear. When a new service is created, you need to open it and start creating a flow. System will open Logic Apps Designer and you can start with a Blank Logic App button scrolling little bit down (if this is your first time with Logic Apps, I can recommend to look the introducing video before you start). Do not forget that you need to have already deployed Business Central and Talent and created Talend entities in CDS (check in PowerApps with Data tab).

On the first sight you will see it obviously look like very similar as Microsoft Flow (Power Automation). First you need to start with a trigger, and as there is not trigger for Talent, you need to find ‘Common Data Service’ trigger – ‘When a record is created’. Yes, the first Logic App will be for inserting new data, but to complete this process, minimum necessary will be to make a Logic App for update as well.

Now you need to sign in to create a connection to Common Data Service. You will use credentials you used for Talent and CDS. When you finish with signing in, choose an environment where you have installed Talent and Workers as an entity name. On the end, add Organization as a Scope.

In a new step, you need to make an action. For this purpose, you need to choose Business Central and find ‘Create record’ action. When you sign in, first you need to choose if you want to use Production or some other environment and after that you need to choose a company name and as a Table name choose Employees (this is an API from Business Central).

On the end you just need to connect fields. To do this you need to click on Add new parameter and to choose Business Central fields you want to use for integration. Minimum you have to use are number, givenName and surname. Now you need to connect BC with Talent data i.e. Given Name (from Talent) to First_name, Surname to Last_name…

Click Save and as this is a service, do not forget to click Run. Only now, your Logic App is ready for using.

Be careful here with choosing fields for integration… you can try to integrate more fields here, but it cannot be useful. The answer on your question is when you create new record to the Worker entity in Talent, only a few field will be treated as an insert and the most of them will be treated as an update. Look at the last image where I’ll create new record… only these field you see are treated as an insert.

When you click Hire and add details, all other values you will add will be treated as an update. Because of that, you will see that created new Logic App for updating is absolutely necessary. But I’ll explain more about this in my next post.

But right now, you can create new Worker in Talent and you will see that system created new Employee in Business Central immediately.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.