Best way to trigger a sync?

I have actions that run on order creation and order updates, based on whether the external system has stored an ID in the externalPlatformId field (a custom field I added to the order data model). These actions interact with an external system. Now, I want to trigger these actions for all historical orders. How can I accomplish this?
7 Replies
ljspoor94
ljspoor948mo ago
Just trigger a global action from the playground which runs the sync ?
Jay
JayOP8mo ago
but will it trigger the oncreate as well? meaning the on success basiclly I need to simulate order create and if the external id is there, it shoud simular update
Chocci_Milk
Chocci_Milk8mo ago
This would definitely run the onSuccess. The playground runs the action as you've called it.
Jay
JayOP8mo ago
So I can just trigger the manual sync form the installs page?
Chocci_Milk
Chocci_Milk8mo ago
Yes, if there are new records, the actions will run
Jay
JayOP8mo ago
Wait, the point is if there is a record that may have already existed just it doesn’t have the external id
Chocci_Milk
Chocci_Milk8mo ago
Why don't you simply add the external Id on the field using the JS Playground?

Did you find this page helpful?