How do you synchronize order statuses with ERP?
The guide explains how to map ERP order statuses to AI Commerce , which decisions belong to the merchant, and what standard synchronization already supports.
Basics of ERP order status synchronization
The order status code sent by the ERP can be matched to the order status in AI Commerce . The incoming update looks for the exact same value in the API ID field of the order status. If a match is found, the order is moved to that status and the change is saved in the status history. If no match is found, the order status does not change.
The meaning of status codes is a store-specific decision. Before making changes, determine what ERP events mean in the online store and what status the customer will see, for example, during order receipt, picking, shipping, and delivery.
Separate the internal Code from the ERP status API ID value
When synchronizing order statuses with ERP, two different identifiers must be distinguished. The Code in the Order Statuses view in the dashboard is AI Commerce 's permanent internal status code. The API ID field of the order status is used to connect the incoming status update from ERP.
Do not enter the ERP status code in the Code field in the Control Panel just because the name seems appropriate. The Control Panel status catalog does not display or modify the API ID field of the order status. The mapping is defined in the integration configuration. In the Control Panel, you can manage the status' language-specific names, internal code, color, default status, and payment or invoice number requirement.
Plan the correspondences of the spaces
It is a good idea to write down the correspondences between ERP states in a table before changing the settings. For each ERP code, mark AI Commerce state name and the meaning visible to the customer. If the ERP uses, for example, the codes KER , LLU , PKK or LAS , the merchant decides for himself whether they mean, for example, the states Received , Picking , Shipped or Delivered in his own process.
Only create a match for an event with an unambiguous meaning. AI Commerce does not determine the business meaning of ERP codes or guess the missing match.
Determine the ERP order status API ID
The identifier for the incoming ERP status update is the API ID of the order status. The Order Statuses register in the control panel does not display or edit this field. Do not enter the ERP status code in the internal Code field, as it does not control the ERP integration.
If the status code sent by the ERP does not match or needs to be changed, request an API ID for the order status through your organization's approved support channel, and provide the exact status name and the code sent by the ERP. Publishing status from AI Commerce to an external API is a separate outbound setting that is not included in the status register in the Dashboard. Test the match on a single order before deploying it on a larger scale.
Case, punctuation, and spaces are included in the identifier. If the ERP sends a different value than the API ID field, the update will not select the state.
Understand how an incoming status update works
When synchronizing orders, the incoming status update from ERP compares the code with the API ID value of the order's current status. If the values are already the same, the order is not transferred again. The latest status API message and its storage time can still be updated.
If the code differs from the current status, AI Commerce searches the status catalog for the same order status API ID. The found match updates the order status and adds the change to the status history. The unknown status code is stored in the status API message for troubleshooting purposes, but the order status and status history remain unchanged.
A simple general status update stores the status history without any indication of notification to the customer and does not itself send an email to the customer. Individual ERP adapters may handle the notification differently, so check the communication rule for each integration.
Check synchronization from subscription
ERP synchronization is checked from the API message tab of the order in the Control Panel. The Shipping / Status webhook section shows the saved status message and its time. In the status history, you can see separately whether the order status changed and whether the customer was marked as notified.
If the status webhook is visible but the status does not change, ask the technical owner of the integration to compare the message status code to the specified order status API ID. If the webhook is not visible at all, check the ERP submission and integration run. The synchronization run is described as occurring approximately every hour, but the actual schedule is integration and environment specific; ensure the integration in use is running before reporting an issue.
Please note integration-specific delivery information
In ERP synchronization of orders, in addition to the status, a tracking code, shipment number, delivery method, or delivery date can be sent. The fields and their processing depend on the ERP adapter. The tracking code can be stored for the order when the integration in use transmits it.
Don't assume that all delivery information has been updated based on a successful status change. Check the order separately for tracking information, delivery method, and other fields promised by the integration. Also, compare the ERP transaction time to the webhook time stored AI Commerce so that you don't interpret old delivery information as the result of a new status change.
Limit changes outside of standard synchronization
Standard order status synchronization is not a common order editor. Bidirectional changes to order lines or order amounts require a separate integration solution, even if the order payment method is invoice.
Separate development is also needed if you want new integration fields, unusual state transitions, or special customer message rules in addition to API ID mapping. First define the desired business process and discuss the implementation with your integration partner.
Find out the status of an unupdated order
To resolve an order status that is not updated, check the following in order:
- The order has an external order ID used by ERP.
- ERP has sent a new event and the Transport / Status webhook shows its code and time.
- The API ID for the order status corresponds character by character to the code sent by the ERP.
- The order status API ID is associated with the correct status visible to the customer.
- The status history shows the expected change and not the same status repeatedly.
If the webhook is visible but the response is missing, correct the API ID assignment for the order status through an approved support channel. If the new webhook does not appear after the integration's normal runtime, contact ERP or integration support and provide the order ID, the latest AI Commerce status message saved, and its date.