@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.
lPXOverride]
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)
{
//Add your own logic here and return false if you want to skip the update process.
//return false;
}
}
return baseMethod(mapped, status, operation, cancellationToken);
}
@simonliang91 @josh.fischer @KarthikGajendran This is just a suggestion, but it would be great if these orders would just no longer show up as needing to be synced in the connector after it’s been Completed in Acumatica, unless a refund is initiated. Customers unnecessarily end up with A LOT of clutter in their invalid and aborted records tabs.
@freddydelrio39 Like Simon said if the order in Acumatica is Completed and if there are no updates to Id/Email/Phone/Order amount/tax/qty/Shipping address info then the sync history record would stay as processed.
Also, please note, Sync History(BC301000) is for error handling so you might need all the records.
May be we should provide an ability to archive the records so that you do not see them in the regular tabs.
If you think it is useful please note on this
@KarthikGajendran , @simonliang91 , I will need to test this again, but our experience was different - that is, shipping updates were triggering updates in Acumatica.