If your flow is intermittently creating duplicate sales orders with the same ID value, this is most likely caused by multiple calls processing the record simultaneously. To resolve the issue, change your concurrency settings.
What is concurrency?
When submitting records to an application, inconsistencies can result if you’re using a concurrency level greater than one and the records arrive at the destination out of order. However, you can use concurrency settings to prevent duplicate records and preserve the order of records.
Possible problems with concurrency
When you use multiple concurrencies, messages can return simultaneously and get processed out of order. While this is rare, you can mitigate the possibility by setting up the Concurrency Lock ID Template.
Keep your records accurate
Edit the Concurrency ID lock template setting to ensure the records are always processed in the correct order. Enter one or more fields from your records to construct a unique key for each record. With the unique key (that you define), integrator.io will not process any two records with the same unique key value simultaneously, and records with duplicate key values will always be processed in the correct order. If two or more records that do not have the same unique key value come in at the same time, they will continue to be processed in parallel (preserving optimized flow performance for unrelated records).
- Open the Edit import form for your import.
- At the bottom of the import configuration form, under Advanced settings find the Concurrency ID lock template field.
- In the Advanced settings section, find the Concurrency ID lock template field.
- Enter a handlebars expression to reference the field you want to use as the unique key (wrapped in three sets of curly brackets) to process records in the order that changes are received. For example: {{{record.customer_id}}}
- Click Save.