Step 1: Configure the Store View Card

Before importing customers make sure that the import function on all store views is set up correctly. When navigating to the store view card (Master Data > Store View) you will see this section which needs to be set up.



For each store view this setup needs to be configured, this will provide you with the ability to manage customers that have to be imported per store view. If customers need to be imported for a store view please enable the boolean Import Customers, the last import date will be filled automatically when performing this action.


The Last Import date specifies the last date on which the customers were imported. The next import will look at the new customers between the last import date and the date when performing the import action. If it is required to import new customers from a longer period, please fill in an earlier date.


The Start Date specifies the date from which new customers can be imported. When it is filled like the setup above it will not import any new customers that have been created before that date.


When the customer import is activated and the dates are set, it is important that the Magento Customer Templates are set up correctly in order to be able to create Business Central Customers automatically. A brief description on how to do this is described in the Working with Customer Templates section of the Customer Accounts manual.


Based on your preferences the processing method can be configured in four ways. These options are described below.


Processing MethodFunction
NoneWhen importing new customers, the new customers will only be converted into staging customers without further actions.
UpdateModifications on existing customers will be updated, new customers will be imported as staging customers.
Create
Modifications on existing customers will not be updated, new customers will be created as a Business Central customers according to the Magento Customer templates that have been set up.
Create and Update
Modifications on existing customers will be updated and new customers will be created as a Business Central customers according to the Magento Customer templates that have been set up.


When the correct processing method is chosen, the first new customer can be imported.


Step 2: Creating a New Magento Customer

 This step will normally be done by the customer but in this example we will create a demo customer as shown below. The setup as shown in the image above is being used to show all of the steps in the import process.


First of all a new customer needs to be created in Magento, this is the customer that has been created for this example.


After registration there are no addresses provided by the customer as shown below. Since it is mandatory in Business Central to have at least a billing address, the customer is not being imported until an address is provided in Magento.


When the default billing address is added in Magento, the customer is ready to be imported.



The default shipping address will be filled with the same information as the default billing address.


When both addresses are filled in, the customer account is ready to be imported in Business Central.


Step 3: Import New Magento Customers

To import the new customer, navigate to Sales > Customers > Staging Customers and click the button Get New/Updated Customers.



This will trigger al new customers to be imported from Magento. As shown below the new customer that has been created in the previous step is imported as a staging customer since the processing method was set to None. The overview also shows that it is not an existing customer and it does not have a customer number yet.



When opening the staging customer we see that the customer details are being imported correctly and that the default billing / shipping address is imported. To create the Business Central customer click Process Customer.



The staging customer will now be converted into a Business Central customer and the staging customer record will be moved to the staging customer archive.



When we look at the Business Central Customer list we will now see the customer we just created.



When opening this customer we see that all information provided in Magento has been transferred to the Business Central customer card. The Magento status of the customer will automatically be set to Synchronized because the Business Central Magento Customer Card is created automatically by the import process.



Click the blue interactive status synchronized to navigate to the Magento Customer Card.

On the Magento customer card we see that the Store Code and Customer Group Code are already filled in by the import process. In the bottom section the Magento Customer ID will also be shown.



To see the addresses please click the Addresses button in the menu.

This list will show all of the addresses known in Magento, it will also show which addresses are the default addresses.


When the new customer is imported there will be two records that are added to the integration queue. These records will update the Magento customer with information such as the Business Central customer no. and additional customer data.



Step 4: Updating Magento Customers

When a customer will change information on the Magento side or for example add an address the changes will be imported in the same way as described in the previous step. In this example we will show what happens when a customer adds a new address and set it as their default shipping address.


The customer will add a new address and set is as the default shipping address by clicking Add New Address.



In this example we will change the address information as shown below and click save address.



This will result in the address book on the Magento side reflecting the changes that the customer just made.




When we move to Business Central and navigate to Sales > Customers > Staging Customers and click the button Get New/Updated Customers, we will see that the staging customer is an existing customer.



When opening the staging customer we now see two addresses in the address section of the customer with the change the customer made.



When the staging customer is processed, these changes will reflect in the customers Addresses (Commerce365) and the changes will be added to the integration queue.



Step 5: Switching to Auto-mode

If you are running a production environment you don't want to manually import new customers every day by clicking the "Get New/Updated Customers" button. For this reason we created a job queue which does this work for you.


By navigating to Integration > Queue > Job Queue Details you will see a list of Commerce 365 job queues which automate various processes. There is an job queue named "NC365 Get Customers" available which imports the new customers. To add the job queue click New and fill in the settings as shown below.



This will open the job queue card below which allows you to set up and schedule the job queue. Please fill in the Object Type and Object ID as shown below and schedule the job queue to your preferences.



We recommend to let the job queue run as often and long as possible, the configuration can be customized any time. When you are ready, click the "Restart" button in the header which will activate the job queue. Based on the configuration on your store view card (explained in step 1) your Business Central customers are now created, updated or created and updated.