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
Just trigger a global action from the playground which runs the sync ?
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
This would definitely run the onSuccess. The playground runs the action as you've called it.
So I can just trigger the manual sync form the installs page?
Yes, if there are new records, the actions will run
Wait, the point is if there is a record that may have already existed just it doesn’t have the external id
Why don't you simply add the external Id on the field using the JS Playground?