Customer and item matching

Every webshop order contains customer and product identifiers that are specific to your webshop. Business Central uses its own customer and item numbers. Before Tinx Connector can convert a webshop order to a sales order, it must identify which Business Central customer and items the order refers to.

Workflow

The following diagram shows the matching process during order import.

Customer and item matching

The following workflow corresponds to the previous diagram:

  1. During the webshop order import, Tinx Connector receives the web response. The response contains details about the order, including the customer and the products in the order.
  2. Data from the web response is recorded on the Webshop Orders page. One record per order.
  3. Webshop values are recorded in the Webshop Customer ID and Webshop SKU fields on the Webshop Orders page. Tinx Connector must identify the corresponding Business Central values for the fields: Customer No. and Item No., respectively.
  4. The Webshop Customers page contains all existing matches between the webshop values and Business Central values for the customers. The Webshop ID field should have a corresponding Business Central customer number in the Customer No. field.
  5. If the match is found, the corresponding Business Central values are recorded in the Default Customer No. - ID fields on the Webshop Orders page.
  6. The same process applies to products.
  7. When both Default Customer No. - ID and Item No. fields are populated, the records on the Webshop Orders page are ready for the order creation in Business Central.
  8. Tinx Connector uses those values to populate corresponding fields in the Business Central tables, and based on that, the sales order can be created.

Item matching

During the webshop order import, Tinx Connector checks whether the products in the order exist on the Webshop Products page. For each webshop order with a product that cannot be matched, the Blocked Order field on the Webshop Orders page is set to Yes. To learn more, see Synchronize products. If you want to allow Tinx Connector to match items directly in Business Central without using the Webshop Products page, you can disable the blocked check on the E-commerce Setup page.

Customer matching

You can use the following methods to match webshop customers to Business Central customers.

  • Default Customer No: Matches based on the webshop customer ID. If a customer is found on the Webshop Customers page, that customer’s number is used. This method is shown in the diagram. Default Customer No. - ID is the recommended matching method when you have a single sales channel. If you have multiple sales channels, use the Customer No. Sales Channel method instead.
  • Email address: Matches based on the customer’s email address. Use this method when customers are sometimes created in Business Central before they place an order in your webshop. For more information, see Email-based matching for new customers.
  • Different Customer No. Order: Matches based on the contact-customer relationship. Use this option when the order is placed by one contact but must be booked to a different customer account, for example, in a B2B sub-login setup.

Mapping needed to create sales order based on Default Customer No. - ID

In the customer matching based on the Default Customer No. - ID, Tinx Connector identifies the Business Central customer through an intermediate step using the Webshop Customers page. The workflow describes the process in more detail. For more information, see Workflow.

When the matching is complete and Tinx Connector populates the Default Customer No. - ID field on the Webshop Orders page, step 7 of the process can begin. During that step, Tinx Connector uses the value in the Default Customer No. - ID field to populate the Sell-to Customer No. field on the sales order.

The following screenshot shows the mapping of the WOO-087 message definition for WooCommerce. The role of this message definition is to create sales orders in Business Central based on webshop orders imported from WooCommerce. For more information, see Enable webshop orders import. The mapping in the third line instructs Tinx Connector how to populate the Sell-to Customer No. field on the sales order. This mapping reads the value from the Default Customer No. - ID (field 73) on the Webshop Orders page (TINX Sales Order table 11205270).

Sell-to Customer No. mapping

Email-based matching for new customers

Email-based matching prevents duplicate customer cards when the connector processes webshop orders from new customers who are not yet matched in Tinx Connector.

By default, when your customer places an order on your webshop, Tinx Connector looks for a match in the Webshop Customers table. For more information, see Workflow. If no match is found, by default, the connector creates a new customer card. Email-based matching adds an extra check before creating that new customer card.

When an unmatched webshop customer places an order, Tinx Connector searches Business Central for a customer with the same email address. If a match is found, the order is applied to the existing customer instead of creating a new customer card.

This is particularly useful for businesses with both physical stores and webshops. Consider a customer who previously made a purchase in a physical store and has a customer card in Business Central. When they later place their first order online, email-based matching connects their online and offline purchase history under the same customer card. This avoids duplicates.

To enable email-based matching, turn on the Check E-mail New Customers toggle on the E-commerce Setup page. For more information, see To set up customer import.

Matching customers based on email and custom field

You can use custom fields to include additional logic in the email-based matching process. You can match on both email and a custom field (such as the currency code). This lets you create separate customer cards for the same customer when different currencies are needed.

The following screenshot shows an example of the setup for matching customers based on both email and currency.

Match customers based on email and currency

Related information

Synchronize customers
Synchronize products
Synchronize orders
Customer templates
E-commerce Setup and Sales Channel: Where to set up the webshop
Error messages
Key concepts in Tinx Connector
Troubleshooting checklist