Queued Stages

Queued Stages

Queued Stages are a useful feature for aggregating data or supplying "structured" data. Often systems will expect to have data bundled up and submitted all at once. A good example of this is how many ERP systems expect Sales Orders to be submitted. Many will expect that the Order Header be submitted to the API along with all the Order's Details (Line Items). You can accomplish this by using a Queued Stage for the Line Items. in the example below, we submit multiple Contacts at the same time with and Account. Queued data can be returned in JSON, XML, or as a C# DataTable object.

Create a Stage like normal, and change the "Queued Behavior" to "Queued". When a stage is Queued, it will not attempt to write data to the Destination when the stage is processed. Instead, the data mapped to that Stage is held in memory, until requested.



Map the stage like normal. Then created a 2nd stage for Accounts. This stage is not Queued.

Within the field where you want to put the queued data, call GetQueuedJSON to fetch it.


The mapped field now contains a JSON array of queued data.


For more help on the functions to retrieve queued data, see here.