@Yuri Karpenko , we are using the “updated_at” field datetime data to identify the Shopify order whether is modified after import.
Usually we will skip the update process if the gap between “updated_at” in Order and “updated_at” in order fulfillment is less than 5 seconds. Or we will skip the sync process if order in ERP is completed or cancelled and the key info(Hash code based on the Id/Email/Phone/Order amount/tax/qty/Shipping address info) in the external order are the same.
If you think you have additional logic to skip the order sync process, you can make a customization to override the method ControlModification() in SPSalesOrderProcessor graph, system will skip the update process if it return false.
[PXOverride]
public Boolean ControlModification(IMappedEntity mapped, BCSyncStatus status, string operation, CancellationToken cancellationToken, ControlModificationDelegate baseMethod)
{
if (mapped is MappedOrder)
{
MappedOrder order = mapped as MappedOrder;
OrderData shopifyOrder = order?.Extern;
SalesOrder erpOrder = order?.Local;
if (operation == BCSyncOperationAttribute.ExternChanged && !order.IsNew && shopifyOrder != null && erpOrder != null && status?.PendingSync == false)
{
}
}
return baseMethod(mapped, status, operation, cancellationToken);
}