Overview


We are rolling out a new postback feature that allows you to know exactly what Device a sub-batch is sent to. Although the user typically defines what Device a sub-batch is sent to in the Workplan, an operator may decide to send the sub-batch to a different Device. In this situation the user will not know for certain which Device processes a given sub-batch.


We are introducing a new postback option that is triggered when a sub-batch is successfully sent to a Device. This will allow you to know immediately what Device is responsible for your sub-batch. In this article we will be referring to this feature as Sub-Batch Send To Device.



TABLE OF CONTENTS



Sub-Batch Send To Device Template


Your first step is to configure a template. In the SETUP tab navigate to SYSTEM > Templates and click Add New in the top-right corner of the page. The Add Template page appears.



The following code snippet is a basic example of a Sub-Batch Send To Device template. Be sure to include deviceName and deviceId in the data object to get the desired device information (lines 16-17). In addition, this template defines details such as the batch number and the timestamp. You may also include subBatch.componentCode to retrieve the name of the component being sent to the Device (lines 18-20).



Set the template Type as JSON and fill out the rest of the template information. Then click Save.


Back to Top




Sub-Batch Send To Device Trigger


Your second task is to set up the trigger. In the SETUP tab navigate to SYSTEM > Triggers and click Add New in the top-right corner of the page. The Add Trigger page appears.



In the Event field select Sub-Batch Send To Device.



In the Template dropdown select the template created in the previous step (For the purpose of this article, called Sub-Batch Send To Device). 


Configure the rest of the trigger as needed and click Save.


Back to Top




Postback


A correctly configured trigger will return the following postback payload (Note: all the numbers are for sample purposes only): 



SYSTEM TIP: In order to obtain the full payload with all the possible values, you can define a JSON template with {{ prettyJson this }} and test the postback by running an order/batch/shipment/etc. through the desired trigger.



Back to Top