[0:01]Hey everyone, Nasar Altaf here from WebSan Solutions. And in today's video, I'm going to be showing you the native integration between Dynamics 365 Sales, which I'm used to calling CRM, and Dynamics 365 Business Central.
[0:17]So, this is an out-of-the-box integration by Microsoft, and it's also known as the Dataverse connection in Business Central now.
[0:27]Before we get started, a little bit about us here at WebSan. We have 40+ employees located across Canada, US and the Philippines.
[0:36]We have been in the ERP space for over 21 years now with hundreds of Microsoft Dynamics customers throughout Great Plains, Business Central, and Dynamics 365 Sales, etc.
[0:49]Also, we have been a Microsoft Certified Gold Partner for approximately 13 plus years now with many other awards achieved over the years.
[1:00]So, in today's uh, in today's session, before we jump into the system, I'll start by showing a quick flow diagram that highlights the native flow of data between the two systems.
[1:13]And then after that, we'll get into the system and talk about how to complete the connection setup on the Dataverse connection setup window.
[1:21]So, in that, I'll talk about what information is required to complete the the connection setup.
[1:28]Then, I'll we'll review the Business Central modules that sync with CRM entities on the Integration Table Mapping window in Business Central.
[1:39]So, that's talking about the direction of the sync, um, the filters that allow or prevent data from syncing between the two systems.
[1:48]And then also just simply enabling and disabling the sync between specific fields.
[1:56]Then, following that, I'll talk about coupling and what that means for the integration.
[2:02]So, connecting BC items to products in CRM, basically the individual record connection between the two systems.
[2:11]So, not the not at the entity and module level, but down to the individual item and product and how they connect and talk to each other.
[2:20]Then, we'll take a quick look at the job queues that get created from the integration in order to sync data between the two systems.
[2:28]And lastly, I'll give a quick demo on data syncing between the two systems.
[2:35]So, here is a flow diagram highlighting the different entities that natively sync between Dynamics 365 Sales on the right here, and Dynamics 365 Business Central on the left via the the Dataverse connection setup.
[2:51]So, as you can see, customers are um are linked to account records in CRM and they both have a a bidirectional sync.
[3:00]So, you can see the arrow pointing in in both directions and that basically means changes in one record in Business Central will sync to CRM, and the account record changes will sync to Business Central customers.
[3:19]And that's the same for contacts and things like currency and units of measure are a unidirectional sync.
[3:30]So, that means the data is only going from Business Central to CRM.
[3:35]And so, and so typically, um, and we'll take a deeper dive and look at the individual entities flowing between the two systems when we take a look at the integration table mapping.
[3:45]Now, a typical flow that we've seen in the past with um many of our clients is there's there's been a sales order that gets submitted from CRM that then syncs to Business Central as a open sales order.
[4:00]And then in Business Central, the sales order is picked, packed, and shipped and finally invoiced, and then what and that posted sales invoice then makes it its way back to CRM as built.
[4:14]So, that's the typical flow that we've seen and kind of a flow diagram highlighting the the different entities and modules syncing between the two systems.
[4:26]With that, let's get right into the demo here.
[4:30]So, I'm going to start off here in Business Central and we'll go into the Dataverse Connection Setup.
[4:39]to take a look at the connection. So, starting in in the Dataverse Connection Setup window, um, you'll need to enable the connection, and as you can see, in my in my demo system here, I already have the the Dataverse Connection Setup enabled.
[4:54]But, it's as easy as going under connections, assisted setup and following the assisted setup to to complete the connection setup.
[5:03]Um, during the setup, you'll need the follow you'll need the URL for the CRM environment that you want to connect to.
[5:12]And you'll also you will also be prompted to enter the credentials of a user that has the system administrator permission assigned in CRM.
[5:22]Uh, this user is also used to deploy a a Business Central integration solution to CRM.
[5:29]So, if I take a look in my system here, if I go to under integrations, I can take a look at the integration solutions.
[5:40]I have these integration solutions deployed to my CRM environment installed here in CRM.
[6:05]Okay. So, jumping back into Business Central here, we're going to go in, we'll take a look at the integration.
[6:14]So, um, and and sorry, also on as well as your your your administrator user, once you set the administrator user and you go through the connection setup, it's going to ask you to select an ownership model.
[6:31]And what this essentially does is it it decides whether a team user in CRM is the owner of new records, or if there's one or more specific users.
[6:43]So, uh, for example, like if you if you create a record from Business Central into CRM, that record is either going to be owned by a a generic team user, or an a salesperson that's coupled to a user in CRM.
[6:55]So, if in in this case, in my case here, if I go into the coupled sales person, you can see all of these users on the left side are users that we have in our CRM Sandbox environment.
[7:18]And over here, you can see most of them are not coupled to a salesperson code, but we have Stacy, my colleague here, that she's coupled to a salesperson.
[7:27]And so, I, and so in in during this setup, I actually used my own login with the system admin user in CRM to to complete the connection setup.
[7:38]So, I'm going to assign myself or couple myself to my own user.
[7:43]So, in Business Central, I set myself up as a salesperson code.
[7:48]This is just in the sales people purchase code table.
[7:51]I've created a salesperson code here for myself.
[7:55]So, I'm going to select that and now that is going to assign me or set me coupled to the user that I that I have to my user in CRM.
[8:06]And I'm just going to hit couple over here.
[8:10]It's going to say the user and dataverse will were linked to salesperson.
[8:16]And synchronize data. I'm going to click yes.
[8:24]So, now all that all this doing is it's it's it's ensuring that the salesperson is now coupled to user in CRM.
[8:35]Okay. So, once the and so we typically advise ownership models to be person because um it allows it allows specific users to be owners of the CRM records.
[8:50]Okay. So, once the connection setup is enabled, then we can take a look at the uh integration table mapping.
[8:59]So, the integration table mapping is kind of the meat and potatoes of of the connection setup.
[9:05]So, this is basically where you'll see all the Business Central modules that are connected to the CRM entities over here.
[9:18]Uh, so I'm going to go into, so quickly talking about the the the columns that are available in here.
[9:27]You have your your different models that are in modules that are in Business Central, contacts, currencies, customers, etcetera.
[9:33]And we have the table filters that kind of dictate the the the criteria that is required in the Business Central side in order for that record to then sync to CRM.
[9:48]So, for example, customers, you can see there's a filter that's set on customers.
[9:53]And if I click into these three dots here, it's going to tell me that the customer record can um it's it's only going to sync customer records that have a blocked field as blank or no, meaning the customer in Business Central is not a blocked customer.
[10:18]And that and and if the customer is blocked, then it there is no reason for it to or then it won't sync to CRM.
[10:25]So, that's why that's one of the syncing criteria for customers. Similarly, if we look at the item product sync on in Business Central on the item card, the item card cannot be flagged as blocked.
[10:33]So, the blocked has to be no in order to sync that item to the product entity in CRM.
[10:41]Then, we have a a very important column here, which is the direction.
[10:45]This basically dictates the direction of the flow.
[10:49]So, there's there's uh three different types of directions that you can set.
[10:55]So, if again, going back to example of customer, you have bidirectional, to integrate into integration table and from integration table.
[11:01]Now, bidirectional is fairly straightforward.
[11:05]It means that changes in both systems sync back and forth.
[11:11]So, for example, uh change to a customer record in Business Central will sync to the account record in CRM.
[11:19]A change to the CRM account record will then sync back to the customer record in Business Central.
[11:24]So, that's what bidirectional is. Then, you have to integrate table. The two integration table is essentially data syncing from Business Central to CRM.
[11:37]So, if for example, if I had changed the customer to a to a integration table, or actually, better yet, we'll use this the the posted sales invoice header for example.
[11:47]So, the posted sales invoice header is a two integration table direction, and that basically means the posted sales invoice header from Business Central is going to sync to the CRM invoice.
[12:00]It's not going to go the the invoice from CRM is not coming back into Business Central.
[12:08]It's only a one-way or unidirectional sync from Business Central to CRM.
[12:16]Then, lastly, you have uh sales people, for example, that are a from integration table to to CRM.
[12:25]So, from from integration table means the data from CRM is syncing to Business Central.
[12:32]So, if we, for example, create users in CRM, those will automatically get synced as sales people/purchase codes in Business Central.
[12:45]And that's what that from integration table means.
[12:48]So, that that that's it's important to keep in mind the direction of these entities.
[12:53]And at any point, you can change the direction if you'd like.
[12:57]So, for example, if if you have um scenarios where you're only creating account records in CRM that need to sync to Business Central, then you would set it you would set the direction for the customer and account entity as from integration.
[13:21]So, you'd only create the accounts in CRM, they would sync to Business Central, and that's it.
[13:27]You wouldn't be creating any customers in Business Central that are syncing back to CRM. That's um so that that could that could be a possible requirement in your company, and so you can change that direction to to accomplish that.
[13:36]Now, moving further right, you have your integration tables, and these are basically the entities that are that you have in CRM.
[13:44]So, you have your accounts, products, opportunities, invoices, orders, users, all of that that's in CRM.
[13:51]And those also have table filters or specific criterias that that need to be met in order for data from CRM to be syncing into Business Central.
[14:04]So, once again, let's take a look at the customer table filter that we have or the account table filter that we have on the CRM side, I should say.
[14:12]And if I click into this filter, you can see for account records to sync as customers into Business Central, the relationship type on that account record must be customer.
[14:24]The status on that account record must be active, and it looks like this is just a company ID, it it must be in this specific company ID, and that's just a good ID.
[14:37]Um also, once again, we'll take a look at the product table filter and similarly, the product type of a product has to be sales inventory.
[14:46]The status also has to be active, and again, part of that company in order for it to sync from CRM into Business Central.
[15:00]So, that's kind of how the the table filters work on on the CRM side.
[15:06]Again, very similar to Business Central, CRM has their own filters and criterias that are required to be set in order for data to be syncing from CRM to Business Central.
[15:16]Uh, so now let's let's before I talk about what the the sync only coupled record checkbox is for, um, I want to quickly explain the the concept of coupling.
[15:27]So, essentially what that means is uh it it couples connects the Business Central record to the CRM record.
[15:37]So, when you enable the connection setup for the first time from from the from here, and you enable the connection setup, you can you can run a full synchronization, and what that does is it takes the data that you have in Business Central and syncs it over to CRM.
[15:58]Uh, it does when you click run full synchronization, it does give you a prompt to choose if you want to sync the data from CRM into BC or BC to CRM.
[16:05]But, either way, it syncs what's from from BC to CRM or CRM to BC.
[16:12]And once the data is synced or records are synced to um Business Central, it creates a coupling.
[17:05]So, here, if I go into the to customers, for example, I have this customer down here.
[17:10]Let's see if this this account is or this customer is connected or coupled to a record in CRM.
[17:19]So, if I go into the customer card, I check under related Dataverse coupling, you can see that this is coupled.
[17:28]So, if I click into setup coupling, it's going to bring me this table here that shows me the the customer details on the left, and the integration value, which is the CRM data on the right.
[17:43]And basically, what it means is this this record is coupled to the record in CRM.
[17:53]And now that it's coupled, only only records that are coupled will sync between the two systems.
[18:02]So, and that's how and that's how the system knows kind of where to sync the data when it when you make a change in one record and need it to go to the other system record.
[18:12]So, going back to the integration table mapping here.
[18:22]In the integration table mapping, if you take a look at this, uh you can see that sync only coupled record is not checked for customers and accounts.
[18:31]So, this is because um what we do is we we create the customer in we in Business Central, and then we run the synchronization that creates the account record in CRM.
[18:42]And then moving forward, if there's any new accounts that are created in CRM, those accounts can then sync back to Business Central, or they or those accounts can get then created into into Business Central as customers automatically.
[18:57]If we had this box checked, then this would only sync records that are coupled.
[19:04]And when that's the case, then you'd have to go in and create that customer record manually in Business Central.
[19:10]Couple it by um the way I showed you, going into the customer card, clicking setup coupling and choosing that CRM account record that it needs to be coupled to.
[19:22]And then that will establish that connection in order for the the field data to then flow between the two records.
[19:30]So, typically what we like to do is we uncheck it for customers and accounts, because we would want to create the records or the entities in both CRM and Business Central, or we would want to only create it in one and then have it automatically create in the other system.
[19:49]Um similarly for items, we also have an unchecked because items that we create in Business Central, we want them to automatically get created as products in CRM and vice versa.
[20:00]Products created in CRM, automatically created as items in Business Central.
[20:05]Once again, after the filter criteria are met.
[20:11]So, that's kind of how the sync the the checkbox here works.
[20:16]Then, you have your resolve deletion conflicts.
[20:19]Uh, and what that basically means is it it kind of tells the system what to do when a record is deleted in one system or the other.
[20:27]So, once again, if a customer, for example, is deleted in Business Central, or in CRM, if the account is deleted, then what would you like to happen?
[20:38]You can either restore the record, meaning if I delete a customer in Business Central, it'll automatically recreate that record again in Business Central using the data from CRM because that customer record was coupled.
[20:54]So, again, it's very important where if once you couple a customer record or any record to a record in CRM, then then that that coupling is kind of what joins the two systems together.
[21:07]So, if you want to break that coupling and if you need to delete that customer in Business Central, then we'd recommend uh delete the coupling first, and then delete the record.
[21:20]Um or if you want, you can also set the deletion uh resolve deletion conflict by setting it to delete coupling.
[21:27]And what that would do is if you delete the customer record in Business Central, it'll automatically delete the coupling between the account and that customer record, and then it it breaks that connection.
[21:43]So, at that point, any changes made to the account record in CRM won't sync, and it won't create that um it won't recreate that customer again.
[21:54]Then, you have your resolve update conflicts. And what this is for is essentially if there's changes that are made in both systems simultaneously.
[22:04]So, for example, if you if you change the name of a customer in Business Central, and then immediately go into CRM and change the account name that the customer is coupled to in CRM, which system of truth should win in that conflict of now the data has changed in both systems.
[22:26]So, here, I've I've set it to send data update to integration table, and that essentially just means that data from Business Central is going to then sync or override whatever was changed in CRM.
[22:41]So, and then and then get data update from integration table is essentially taking the data from CRM, syncing it to Business Central.
[22:49]So, regardless of which system I changed it in first, both systems have to um have changes in them.
[22:58]And now this this setting here will will dictate which system of truth will win.
[23:04]So, send data is saying the Business Central data will sync to CRM, get data is saying the CRM data will push whatever the changes in CRM to Business Central.
[23:17]Okay. Then, we have that setup for customers and items as well as contacts.
[23:25]Okay. So, that's the integration table mapping.
[23:29]And then if I click into um synchronization, you can take a look at the synchronization logs between the records.
[23:37]So, for example, for the customer synchronizations, you can see data has been syncing between the two systems.
[23:44]Um I don't have too many things that that too many changes or anything that was synced, so there's nothing to see, there's not much to see in there for now.
[23:54]Um, you can also use this the this synchronize section here to uh manually sync any modified records.
[24:03]So, if I have this customer account uh row selected here, I can hit synchronize modified records to then sync modified customers or modified accounts between the two systems.
[24:16]Again, only those that are coupled will sync. You can run the full customer synchronization to then um sync customer data between uh accounts and customers.
[24:26]And then under mapping, we have our field level mapping.
[24:30]So, you have your customer and account entities that are that are syncing, but if you click into the fields under mapping, this is what shows you the actual field level data that's syncing between the two entities.
[24:46]So, for example, in customer, you have your customer name, the name field on the customer card that syncs to the account name field on the account entity.
[24:55]You have your contact that syncs to the primary contact name, address to address one, and so on, so your city to city.
[25:03]So, basically it's just it's the field level syncing on the customer account um sync job.
[25:12]You can edit list and disable or enable a specific field syncing.
[25:19]So, if you, for example, don't want the name to be changed in either of the systems, or the you can have the name changed, but if you don't want the name changes in CRM syncing to Business Central, then you can disable this, um, and it'll it'll stop the the that particular field data from syncing.
[25:40]Okay. And each each entity or module sync has their own fields um mapping.
[25:48]So, this is the mapping for items, for example.
[25:52]You have your your item number linking to the product ID.
[25:56]And and also, each of those fields, you'll you can also choose the the direction for that field to be syncing.
[26:03]So, for example, if you only want the description from Business Central to to be syncing to the product name in CRM, then you would change the direction here to be um two integrate.
[26:22]You can see a lot of these right now are to integrate, meaning it's it's most of these fields are just going from Business Central into CRM.
[26:31]It's not a bidirectional sync, so changes in CRM are not getting synced back to Business Central.
[26:38]Again, this is the native um field mapping.
[26:42]Feel free to come in here once you enable the connection and and set these according to your requirements.
[26:50]Okay. So, that's the field level mapping. Uh, you can also go in and delete coupling.
[26:56]And what that does is basically uncous or breaks the connection between all the products and and items that you have.
[27:04]Um, we've so, where we'd had to where you would have to use this is if if you need to refresh your your project your product list in CRM.
[27:17]You can delete the coupling, get rid of the the product list, and then resync from Business Central to CRM, um, and then have it kind of recouple those those products that are that are getting created in in CRM fresh from Business Central items.
[27:36]Um, all right, so with that, let's go take a look at the job queues that are created for each of these syncs.
[27:44]So, the the data syncs between the two systems on scheduled jobs.
[27:50]So, here, going into the job queue entries, and I have a filter set up here for CRM sync jobs, and that's just filtering the object ID for 549 and 5339.
[28:05]5339 is the the native job that gets native jobs that get created from the from that from enabling that integration setup.
[28:16]Uh from enabling the Dataverse Connection Setup, sorry. Um so, once I enabled the connection setup, it created all of these jobs.
[28:22]It it automatically schedules them to run every 30 minutes.
[28:27]I have updated the item product sync job and the customer sync job to make it, um, sync every two minutes.
[28:38]And basically, what that's doing is it's just looking out for any changes that I make on customer records or item records, and once I do, every two minutes, the job runs and and checks to see what changes are made and if it needs to sync them to CRM, or if it if it spots any changes in CRM, it'll it'll bring those changes over to Business Central.
[28:56]Um it it and so if you see the status on hold with inactivity timeout for these jobs, it just means that there hasn't been any changes, so it doesn't need to um run that until there is activities for it to restart and run that job.
[29:09]Uh if you want to make changes to any job queues, uh be sure to set the status on hold.
[29:17]So, you'd simply select the row, set it on hold, and then you can click into it and edit the run times for these jobs.
[29:24]Okay. So, those are those are the job queues that automatically got created in Business Central.
[29:30]Uh so, now let's let's get into it.
[29:33]Let's take a look at an item here that I have.
[29:38]Um this NB Office Chair, I believe is the chair that I have coupled to a account to a product in CRM.
[29:48]Uh, so from the item card, I can access the product by clicking under related D365 Sales and product.
[29:57]Clicking into the product here, as you can see, when I clicked the product, it opens up the NB Office Chair product entity in CRM.
[30:10]And from here, I can make a change to this product.
[30:16]So, for example, if I put an exclamation mark in the name, and I hit enter, or if I save this record, and then come back into Business Central, and if I refresh here, the job queue needs to run.
[30:29]And basically, once the job runs, it's going to pick up that change and and and store it or or make that change for me in Business Central.
[30:35]So, I'm just going to take a quick look and see when that item job, item sync job needs to run.
[30:42]So, coming back in here, and I'm taking a look at the item sync job.
[30:50]It is scheduled to run. Uh it looks like it's going to be running tomorrow because I didn't spot any changes.
[30:55]So, I'm just going to set this uh to I'm just going to restart this job and have it run today.
[31:03]Let's set it to run today and restart.
[31:10]So, now you can see it's it's 4:56 now.
[31:14]Should have just ran.
[31:18]And there we go, 4:56. The job once it's completed running, it's going to now get scheduled to run again after two minutes, at 4:58.
[31:26]But if I come back to the item record here, item card here in Business Central, you can see that exclamation mark is now synced to Business Central from CRM.
[31:37]And vice versa, if I remove the exclamation mark, maybe I put um the numbers 1, 2, 3 in the description here, and I hit enter, I should eventually see that sync happen when I um oh, when I refresh the record, not revise.
[31:54]Uh, when I refresh here in CRM, gotta give it a couple seconds for the job to run, and it should sync that change that I've made to the name from Business Central into CRM.
[32:12]Uh, there is also a synchronize button that we have in the in the item card in Business Central.
[32:20]So, if I hit synchronize, it's asking oh, it looks like I had changed the data in both systems.
[32:28]So, it it's asking me um if I want to send the data from Business Central to CRM.
[32:31]If I want to get it from CRM to BC, so I'm going to hit send data from Business Central to CRM.
[32:39]And it's it's synchronized. So, if I just go back in here and if I refresh, it's now got the the 1, 2, 3 in the name.
[32:51]Right. So, this is this is the account record that I have for it in CRM, as well as see it in as the customer in Business Central.
[33:05]Once again, I I probably need to just restart that job because it it was I had changed the timing for that job before recording this video.
[33:16]So, um it it at that time, it it already had run and was scheduled to run on the next day.
[33:34]All right. So, with that, thank you very much for joining us.
[33:39]Um if you have any questions, please feel free to email me us at info@websan.com.
[33:44]Um check out our additional videos that are that are coming up on our YouTube channel.
[33:50]Thank you. Have a great day.



