Execution Task and Macro Payloads
Set of Execution Tasks in a pre-defined logical manner creates an Execution Workflow. Execution Workflows can also include Execution Macro in it which is a reusable set of Execution Tasks.
When you define an Execution Workflow, the request body will have the following important keys:
- Flow- Defines the flow of Execution Tasks (and Execution Macro) that will be executed in a sequence to complete the workflow.
- Input- This key includes necessary information regarding the Execution Task. The payloads provided below shows what inputs are required for a particular Execution Task. For example, the Start Execution Task can have two properties as input- canGoBack (optional) & applicableReasons (required).
- Condition- This specifies the circumstance in which an Execution Task will be executed.
For more information on Execution Workflows, see Workflow Documentation.
📘 Entity, Event, and Reason Codes
Check out the list of Entity, Event, and Reason Codes here.
This documentation will help you understand what inputs you need in order to include an Execution Task or Macro in an Execution Workflow.
An Execution Task (ET) is the smallest atomic task that is performed by an operator. Currently, we have 18 system-defined ETs.
Execution Tasks | Description |
Start | Developers can use this ET to initiate an objective workflow. |
Verify Location | Developers can use this ET to add an ability to verify if the rider is at a specific location at any given point in time. |
Pick | Developers can use this ET to keep track of the ownership of packages and cash. |
Verify Input | By using "Verify Input" ET, developers can validate whether the provided input (Captured Input ET) matches the response from an API or a static value. |
Capture Image | This Execution Task enables the developers to capture an image of the shipment. |
Capture Input | This ET allows developers to capture a number or string input. |
Deliver | The Deliver ET can be used by developers when the inventory transfer is Payable (Out). |
Display | This ET allows the developer to display an alert message, information, warning, etc to the FE. |
Doodle | This ET allows the developer to capture the digital signature (fingertip trace) of the shipment receiver. |
Deliver Cash | This ET allows the developer to enable FE to deposit cash at the Delivery center. |
Form | Developers can use this ET to collect different information in different formats. |
Scan | Developers can use this ET to allow an operator to scan a barcode or QR code. |
Completed Success | This ET enables the developer to define if the terminal endpoint of a workflow was successful. |
Completed Failure | This ET enables the developer to define if the terminal endpoint of a workflow failed. |
Init Payment | This ET is used by the developers to instruct the app layer to initiate payment flow with payment data. |
Process Payment | This enables the developers to set an ET for processing payments and generating transaction IDs. |
Complete Payment | This allows the developers to capture the final details of payments (tenant pay ID, transaction ID, amount, etc). |
Validate OTP | Developers can use this ET for capturing and verifying if the given input matches the response from an API or static value. |
Below we have provided the payloads for all the default ETs. For more information on ETs, see Workflow Documentation.
{ "name": "Start", "entityCode": "0006", "description": "To start the objective workflow ", "tag": [ { "name": "usage", "value": "Utility" } ], "inputs": { "type": "object", "properties": { "canGoBack": { "title": "Can go back", "type": "boolean", "description": "This attribute enables the developers to revert back to any of the previous ETs." }, "applicableReasons": { "title": "Applicable reasons", "description": "Developers can use this attribute to providean Applicable reason code for moving from one ET to the next one.", "type": "object" } }, "required": ["applicableReasons"] }, "output": { "type": "object", "properties": { "success": { "description": "Success flag for the operation performed by user", "type": "boolean" }, "eventCode": { "type": "string", "description": "Event code" }, "reasonCode": { "type": "string", "description": "Reason code" }, "meta": { "type": "object", "description": "Meta data related to execution of task", "properties": { "startTime": { "type": "number", "description": "Epoch timestamp for the start of task" }, "endTime": { "type": "number", "description": "Epoch timestamp for the end of task" }, "location": { "type": "object", "description": "Location at start of task", "properties": { "latitude": { "type": "string", "description": "Latitude" }, "longitude": { "type": "string", "description": "Longitude" } } }, "userDetails": { "type": "string", "description": "Unique identifier of user performing the action" } } } }, "required": ["success"] }, "canMerge": false }
{ "name": "VerifyLocation", "entityCode": "0021", "description": "Ability to verify if the rider is at a certain location", "tag": [ { "name": "usage", "value": "Transport" } ], "inputs": { "type": "object", "properties": { "geolocation": { "title": "Geo-Location", "description": "Provides the details for a given geo-location such as longitude and latitude.", "type": "object", "properties": { "longitude": { "title": "Longitude", "type": "string", "description": "Longitude for a geolocation", "pattern": "^(\\+|-)?(?:180(?:(?:\\.0{1,6})?)|(?:[0-9]|[1-9][0-9]|1[0-7][0-9])(?:(?:\\.[0-9]{1,6})?))$" }, "latitude": { "title": "Latitude", "type": "string", "description": "Latitude for a geolocation", "pattern": "^(\\+|-)?(?:90(?:(?:\\.0{1,6})?)|(?:[0-9]|[1-8][0-9])(?:(?:\\.[0-9]{1,6})?))$" }, "accuracy": { "title": "Accuracy", "type": "number"a, "description": "Accuracy of the geolocation in meters", "minimum": 0 }, "geofencing": { "title": "Geofencing", "type": "object", "description": "Developers can use this attribute to add details of geo-fencing around the location", "properties": { "radius": { "title": "Radius", "type": "number", "description": "Radius in meters around the location for geo-fencing", "minimum": 1 } }, "required": ["radius"] } }, "required": ["latitude", "longitude", "geofencing"] }, "address": { "title": "Address", "type": "string" }, "title": { "title": "Title", "type": "string", "description": "Title for the message to be displayed to the FE" }, "message": { "title": "Message", "type": "string", "description": "Actual instruction message body for the FE." }, "canGoBack": { "title": "Can go back", "type": "boolean", "description": "This attribute enables the developers to revert back to any of the previous ETs." }, "applicableReasons": { "title": "Applicable reasons", "description": "Developers can use this attribute to provide Applicable Reason code for moving from one ET to the next one.", "type": "object" } }, "required": ["geolocation", "title", "applicableReasons"] }, "output": { "type": "object", "properties": { "success": { "description": "Success flag for the operation performed by user", "type": "boolean" }, "eventCode": { "type": "string", "description": "Event code" }, "reasonCode": { "type": "string", "description": "Reason code" }, "meta": { "type": "object", "description": "Meta data related to execution of task", "properties": { "startTime": { "type": "number", "description": "Epoch timestamp for the start of task" }, "endTime": { "type": "number", "description": "Epoch timestamp for the end of task" }, "location": { "type": "object", "description": "Location at start of task", "properties": { "latitude": { "type": "string", "description": "Latitude" }, "longitude": { "type": "string", "description": "Longitude" } } }, "userDetails": { "type": "string", "description": "Unique identifier of user performing the action" } } } }, "required": ["success"] }, "canMerge": false }
{ "name": "Pick", "entityCode": "0009", "description": "Pick (Execution Task) is when the inventory transfer is Receivables (In). This is used to maintain track of ownership of goods and cash", "tag": [ { "name": "usage", "value": "Logistics" } ], "inputs": { "type": "object", "properties": { "items": { "title": "Items", "description": "Developers can use this attribute for their app user to add Package details - items to be picked.", "type": "array", "items": { "type": "object", "description": "Definition of line item", "properties": { "skuId": { "title": "SKU ID", "type": "string", "description": "Shipment ID of the picked items." }, "productDescription": { "title": "Product Description", "type": "string", "description": "Developers can use this attribute to get the description of the shipment picked" }, "count": { "title": "Item Count", "type": "number", "description": "The count of items in a shipment picked. There can be more than one item in a shipment picked.", "exclusiveMinimum": 0 } }, "required": ["skuId"] } }, "title": { "title": "Title", "type": "string", "description": "Title for the message to be displayed to the FE" }, "message": { "title": "Message", "type": "string", "description": "Actual instruction message body for the FE." }, "confirmCustodyExchange": { "title": "Confirm custody Exchange", "type": "boolean", "description": "Boolean key to validate the pickup of shipment by FE." }, "canGoBack": { "title": "Can go back", "type": "boolean", "description": "This attribute enables the developers to revert back to any of the previous ETs." }, "applicableReasons": { "title": "Applicable reasons", "description": "Developers can use this attribute to provide Applicable Reason code for moving from one ET to the next one.", "type": "object" } }, "required": ["items", "title", "applicableReasons"] }, "output": { "type": "object", "properties": { "success": { "description": "Success flag for the operation performed by user", "type": "boolean" }, "eventCode": { "type": "string", "description": "Event code" }, "reasonCode": { "type": "string", "description": "Reason code" }, "remark": { "type": "string", "description": "Remark captured at time of delivery" }, "meta": { "type": "object", "description": "Meta data related to execution of task", "properties": { "startTime": { "type": "number", "description": "Epoch timestamp for the start of task" }, "endTime": { "type": "number", "description": "Epoch timestamp for the end of task" }, "location": { "type": "object", "description": "Location at start of task", "properties": { "latitude": { "type": "string", "description": "Latitude" }, "longitude": { "type": "string", "description": "Longitude" } } }, "userDetails": { "type": "string", "description": "Unique identifier of user performing the action" } } } }, "required": ["success"] }, "canMerge": false }
{ "name": "VerifyInput", "entityCode": "0020", "description": "Ability to verify if the given input matches the response from an API or static value", "tag": [ { "name": "usage", "value": "Utility" } ], "inputs": { "anyOf": [ { "type": "object", "properties": { "input": { "title": "Input", "description": "Input entered by user", "type": ["string", "number"] }, "value": { "title": "Value", "type": ["string", "number"], "description": "Value of the relevant input" }, "title": { "title": "Title", "type": "string", "description": "Title for the message to be displayed to the FE" }, "message": { "title": "Message", "type": "string", "description": "The instruction message body for the FE." }, "canGoBack": { "title": "Can go back", "type": "boolean", "description": "This attribute enables the developers to revert back to any of the previous ETs." }, "applicableReasons": { "title": "Applicable reasons", "description": "Developers can use this attribute to provide the Applicable Reason code for moving from one ET to the next one.", "type": "object" } }, "required": ["input", "value", "title", "applicableReasons"] }, { "type": "object", "properties": { "input": { "title": "Input", "description": "Input entered by user", "type": ["string", "number"] }, "api": { "title": "API", "type": "object", "description": "Api", "properties": { "uri": { "type": "string", "title": "URI", "description": "Verification api URI" }, "headers": { "type": "array", "title": "Headers", "description": "Verification api headers", "items": { "type": "object", "properties": { "key": { "type": "string", "title": "Header key" }, "value": { "type": "string", "title": "Header value" } } } }, "valueJsonPath": { "type": "string", "title": "JSON path of value", "description": "Json path of value to be matched" } }, "required": ["uri", "valueJsonPath"] }, "title": { "title": "Title", "type": "string", "description": "Title of instruction" }, "message": { "title": "Message", "type": "string", "description": "Message of instruction" }, "canGoBack": { "title": "Can go back", "type": "boolean", "description": "Can go back" }, "applicableReasons": { "title": "Applicable reasons", "description": "applicable reason codes", "type": "object" } }, "required": ["input", "api", "title", "applicableReasons"] } ] }, "output": { "type": "object", "properties": { "success": { "description": "Boolean to represent result of verification", "type": "boolean" }, "eventCode": { "type": "string", "description": "Event code" }, "reasonCode": { "type": "string", "description": "Reason code" }, "meta": { "type": "object", "description": "Meta data related to execution of task", "properties": { "startTime": { "type": "number", "description": "Epoch timestamp for the start of task" }, "endTime": { "type": "number", "description": "Epoch timestamp for the end of task" }, "location": { "type": "object", "description": "Location at start of task", "properties": { "latitude": { "type": "string", "description": "Latitude" }, "longitude": { "type": "string", "description": "Longitude" } } }, "userDetails": { "type": "string", "description": "Unique identifier of user performing the action" } } } }, "required": ["success"] }, "canMerge": false }
{ "name": "CaptureImage", "entityCode": "0011", "description": "To capture an image", "tag": [ { "name": "usage", "value": "Utility" } ], "inputs": { "type": "object", "properties": { "resolution": { "title": "Resolution", "description": "The preferred resolution for capturing an image of the shipment.", "type": "object", "properties": { "length": { "title": "Length", "description": "Length of the image in pixels", "type": "number", "exclusiveMinimum": 0 }, "breadth": { "title": "Breadth", "description": "Breadth of the image in pixels", "type": "number", "exclusiveMinimum": 0 } }, "required": ["length", "breadth"] }, "fileSizeLimit": { "title": "Max file size", "type": "number", "description": "Developers can use this attribute to put Maximum Size limit (in KB) for an image of the shipment to be captured.", "exclusiveMinimum": 0 }, "captureMode": { "title": "Capture Mode", "description": "By using this attribute developers can allow an FE to capture one or more images of the shipment.", "type": "string", "enum": ["SINGLE", "MULTI"] }, "captureCountLimit": { "title": "Max image count", "type": "number", "description": "Developers can put limitation on number of images that can be captured in multi-capture mode for the shipment/s using this attribute.", "minimum": 1 }, "title": { "title": "Title", "type": "string", "description": "Title for the message to be displayed to the FE" }, "message": { "title": "Message", "type": "string", "description": "Actual instruction message body for the FE." }, "canGoBack": { "title": "Can go back", "type": "boolean", "description": "This attribute enables the developers to revert back to any of the previous ETs." }, "applicableReasons": { "title": "Applicable reasons", "description": "Developers can use this attribute to provide the Applicable Reason code for moving from one ET to the next one.", "type": "object" } }, "required": [ "resolution", "fileSizeLimit", "captureMode", "title", "applicableReasons" ] }, "output": { "type": "object", "properties": { "success": { "description": "Success flag for the operation performed by user", "type": "boolean" }, "captures": { "type": "array", "description": "Array of captured images", "items": { "type": "object", "description": "Object to describe details of single image", "properties": { "url": { "type": "string", "description": "Url of image" }, "timestamp": { "type": "number", "description": "Epoch timestamp for the image capture" }, "file": { "type": "object", "description": "details of file", "properties": { "folder": { "type": "string", "description": "folder name" }, "name": { "type": "string", "description": "name of the file" } } } }, "required": ["url", "timestamp"] } }, "eventCode": { "type": "string", "description": "Event code" }, "reasonCode": { "type": "string", "description": "Reason code" }, "meta": { "type": "object", "description": "Meta data related to execution of task", "properties": { "startTime": { "type": "number", "description": "Epoch timestamp for the start of task" }, "endTime": { "type": "number", "description": "Epoch timestamp for the end of task" }, "location": { "type": "object", "description": "Location at start of task", "properties": { "latitude": { "type": "string", "description": "Latitude" }, "longitude": { "type": "string", "description": "Longitude" } } }, "userDetails": { "type": "string", "description": "Unique identifier of user performing the action" } } } }, "required": ["success"] }, "canMerge": false }
{ "name": "CaptureInput", "entityCode": "0012", "description": "Ability to capture a number or string input", "tag": [ { "name": "usage", "value": "Utility" } ], "inputs": { "type": "object", "properties": { "inputType": { "title": "Input Data type", "description": "Developers can declare the type of Data input by using this attribute (String, Boolean, etc).", "type": "string", "enum": ["string", "number"] }, "validationRegex": { "title": "Validation Regex", "type": "string", "description": "Validation for the format of input data type." }, "title": { "title": "Title", "type": "string", "description": "Title for the message to be displayed to the FE" }, "message": { "title": "Message", "type": "string", "description": "Actual instruction message body for the FE." }, "canGoBack": { "title": "Can go back", "type": "boolean", "description": "This attribute enables the developers to revert back to any of the previous ETs." }, "applicableReasons": { "title": "Applicable reasons", "description": "Developers can use this attribute to provide Applicable Reason code for moving from one ET to the next one.", "type": "object" } }, "required": ["inputType", "validationRegex", "title", "applicableReasons"] }, "output": { "type": "object", "properties": { "success": { "description": "Success flag for the operation performed by user", "type": "boolean" }, "eventCode": { "type": "string", "description": "Event code" }, "reasonCode": { "type": "string", "description": "Reason code" }, "value": { "description": "Value entered by user", "type": ["string", "number"] }, "validated": { "type": "boolean", "description": "Boolean to denote if value was validate successfully" }, "attemptCount": { "type": "number", "description": "Number of attempts for this ET" }, "meta": { "type": "object", "description": "Meta data related to execution of task", "properties": { "startTime": { "type": "number", "description": "Epoch timestamp for the start of task" }, "endTime": { "type": "number", "description": "Epoch timestamp for the end of task" }, "location": { "type": "object", "description": "Location at start of task", "properties": { "latitude": { "type": "string", "description": "Latitude" }, "longitude": { "type": "string", "description": "Longitude" } } }, "userDetails": { "type": "string", "description": "Unique identifier of user performing the action" } } } }, "required": ["success"] }, "canMerge": false }
{ "name": "Deliver", "entityCode": "0010", "description": "Deliver (Execution Task) is when the inventory transfer is Payables (Out)", "tag": [ { "name": "usage", "value": "Logistics" } ], "inputs": { "type": "object", "properties": { "items": { "title": "Items", "description": "This attribute can be used by the developers to show the list of items to be delivered by FE.", "type": "array", "items": { "type": "object", "description": "Definition of line item", "properties": { "skuId": { "title": "SKU ID", "type": "string", "description": "Shipment ID of the deliverable items." }, "productDescription": { "title": "Product Description", "type": "string", "description": "Developers can use this attribute to show the description of the shipment delivered" }, "count": { "title": "Item Count", "type": "number", "description": "The count of items in a shipment delivered. There can be more than one item in a shipment delivered.", "exclusiveMinimum": 0 } }, "required": [ "skuId" ] } }, "title": { "title": "Title", "type": "string", "description": "Title for the message to be displayed to the FE" }, "message": { "title": "Message", "type": "string", "description": "Developers can use this attribute to show the actual instruction message to the FE." }, "confirmCustodyExchange": { "title": "Confirm custody Exchange", "type": "boolean", "description": "Boolean key to validate the delivery of the shipment by FE." }, "confirmShipments": { "title": "Confirm shipments", "type": "boolean", "description": "Boolean key to validate the number of the shipment delivered by FE." }, "canGoBack": { "title": "Can go back", "type": "boolean", "description": "This attribute enables the developers to revert back to any of the previous ETs." }, "applicableReasons": { "title": "Applicable reasons", "description": "Developers can use this attribute to provide Applicable Reason code for moving from one ET to the next one.", "type": "object" } }, "required": [ "items", "title", "applicableReasons" ] }, "output": { "type": "object", "properties": { "success": { "description": "Success flag for the operation performed by user", "type": "boolean" }, "remark": { "type": "string", "description": "Remark captured at time of delivery" }, "eventCode": { "type": "string", "description": "Event code" }, "reasonCode": { "type": "string", "description": "Reason code" }, "meta": { "type": "object", "description": "Meta data related to execution of task", "properties": { "startTime": { "type": "number", "description": "Epoch timestamp for the start of task" }, "endTime": { "type": "number", "description": "Epoch timestamp for the end of task" }, "location": { "type": "object", "description": "Location at start of task", "properties": { "latitude": { "type": "string", "description": "Latitude" }, "longitude": { "type": "string", "description": "Longitude" } } }, "userDetails": { "type": "string", "description": "Unique identifier of user performing the action" } } } }, "required": [ "success" ] }, "canMerge": false }
{ "name": "Display", "entityCode": "0013", "description": "Ability to display an alert message, information, warning, etc to the operator.", "tag": [ { "name": "usage", "value": "Utility" } ], "inputs": { "type": "object", "properties": { "displayType": { "title": "Display Type", "description": "Developers can use this attribute to show the 'ALERT', 'WARNING', 'MESSAGE', etc. in th UI to the FE.", "type": "string", "enum": ["ALERT", "WARNING", "MESSAGE"] }, "text": { "title": "Display Text", "type": "string", "description": "Actual text to be displayed on the screen of an FE with the associated displayType." }, "image": { "title": "Display Image URL", "description": "URL of the image to be displayed along associated with the displayType.", "type": "string" }, "title": { "title": "Title", "type": "string", "description": "Title for the message to be displayed to the FE" }, "message": { "title": "Message", "type": "string", "description": "Actual instruction message body for the FE." }, "canGoBack": { "title": "Can go back", "type": "boolean", "description": "This attribute enables the developers to revert back to any of the previous ETs." }, "applicableReasons": { "title": "Applicable reasons", "description": "Developers can use this attribute to provide Applicable Reason code for moving from one ET to the next one.", "type": "object" } }, "required": ["displayType", "text", "title", "applicableReasons"] }, "output": { "type": "object", "properties": { "success": { "description": "Success flag for the operation performed by user", "type": "boolean" }, "eventCode": { "type": "string", "description": "Event code" }, "reasonCode": { "type": "string", "description": "Reason code" }, "meta": { "type": "object", "description": "Meta data related to execution of task", "properties": { "startTime": { "type": "number", "description": "Epoch timestamp for the start of task" }, "endTime": { "type": "number", "description": "Epoch timestamp for the end of task" }, "location": { "type": "object", "description": "Location at start of task", "properties": { "latitude": { "type": "string", "description": "Latitude" }, "longitude": { "type": "string", "description": "Longitude" } } }, "userDetails": { "type": "string", "description": "Unique identifier of user performing the action" } } } }, "required": ["success"] }, "canMerge": false }
{ "name": "Doodle", "entityCode": "0014", "description": "To capture digital signature (fingertip trace)", "tag": [ { "name": "usage", "value": "Utility" } ], "inputs": { "type": "object", "properties": { "resolution": { "title": "Resolution", "description": "The preferred resolution for doodle image to be captured.", "type": "object", "properties": { "length": { "title": "Length", "description": "Length of the image in pixels", "type": "number", "exclusiveMinimum": 0 }, "breadth": { "title": "Breadth", "description": "Breadth of the image in pixels", "type": "number", "exclusiveMinimum": 0 } }, "required": ["length", "breadth"] }, "fileSizeLimit": { "title": "Max file size", "type": "number", "description": "Developers can use this attribute to put Maximum Size limit (in KB) for a doodle image to be captured.", "exclusiveMinimum": 0 }, "penColor": { "title": "Pen color", "type": "string", "description": "Hex code for selection of pen color for capturing signature of the shipment receiver.", "pattern": "^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$" }, "title": { "title": "Title", "type": "string", "description": "Title for the message to be displayed to the FE" }, "message": { "title": "Message", "type": "string", "description": "Actual instruction message body for the FE." }, "canGoBack": { "title": "Can go back", "type": "boolean", "description": "This attribute enables the developers to revert back to any of the previous ETs." }, "applicableReasons": { "title": "Applicable reasons", "description": "Developers can use this attribute to provide Applicable Reason code for moving from one ET to the next one.", "type": "object" } }, "required": ["resolution", "fileSizeLimit", "title", "applicableReasons"] }, "output": { "type": "object", "properties": { "success": { "description": "Success flag for the operation performed by user", "type": "boolean" }, "eventCode": { "type": "string", "description": "Event code" }, "reasonCode": { "type": "string", "description": "Reason code" }, "url": { "type": "string", "description": "Url of doodle image" }, "meta": { "type": "object", "description": "Meta data related to execution of task", "properties": { "startTime": { "type": "number", "description": "Epoch timestamp for the start of task" }, "endTime": { "type": "number", "description": "Epoch timestamp for the end of task" }, "location": { "type": "object", "description": "Location at start of task", "properties": { "latitude": { "type": "string", "description": "Latitude" }, "longitude": { "type": "string", "description": "Longitude" } } }, "userDetails": { "type": "string", "description": "Unique identifier of user performing the action" } } }, "file": { "type": "object", "description": "details of file", "properties": { "folder": { "type": "string", "description": "folder name" }, "name": { "type": "string", "description": "name of the file" } } } }, "required": ["success"] }, "canMerge": false }
{ "name": "DeliverCash", "entityCode": "0022", "description": "Ability to deposit cash", "tag": [ { "name": "usage", "value": "Utility" } ], "inputs": { "type": "object", "properties": { "expectedAmount": { "title": "Amount", "description": "Show the data as per the scan if it is an online payment", "type": "object", "properties": { "value": { "title": "Amount", "description": "Value of the amount to be delivered by the FE.", "type": "number", "minimum": 0 }, "currencyCode": { "title": "Currency code", "description": "Standard alpha codes and numeric codes for the representation of currencies.", "type": "string", "minLength": 3, "maxLength": 3 }, "minorUnit": { "title": "Minor Code", "description": "Standard minor unit code of the currency.", "type": "number", "minimum": 0, "maximum": 5 } }, "required": [ "value", "currencyCode" ] }, "title": { "title": "Title", "type": "string", "description": "Title for the message to be displayed to the FE" }, "message": { "title": "Message", "type": "string", "description": "Actual instruction message body for the FE." }, "canGoBack": { "title": "Can go back", "type": "boolean", "description": "This attribute enables the developers to revert back to any of the previous ETs." }, "confirmCustodyExchange": { "title": "confirm custody exchange", "type": "boolean", "description": "Validate the delivery of cash by FE." }, "confirmAmount": { "title": "confirm amount", "type": "boolean", "description": "Developers can use this attribute if amount dropped needs to be confirmed." }, "applicableReasons": { "title": "Applicable reasons", "description": "Developers can use this attribute to provide Applicable Reason code for moving from one ET to the next one.", "type": "object" } }, "required": [ "expectedAmount", "title", "confirmCustodyExchange", "applicableReasons" ] }, "output": { "type": "object", "properties": { "success": { "description": "Success flag for the operation performed by user", "type": "boolean" }, "amount": { "description": "Amount collected (ISO 4217)", "type": "object", "properties": { "value": { "title": "Amount", "description": "Amount collected", "type": "number", "minimum": 0 }, "currencyCode": { "title": "Currency code", "description": "Currency code in ISO 4217", "type": "string", "minLength": 3, "maxLength": 3 }, "minorUnit": { "title": "Minor Code", "description": "Currency minor code in ISO 4217", "type": "number", "minimum": 0, "maximum": 5 } }, "required": [ "value", "currencyCode" ] }, "eventCode": { "type": "string", "description": "Event code" }, "reasonCode": { "type": "string", "description": "Reason code" }, "meta": { "type": "object", "description": "Meta data related to execution of task", "properties": { "startTime": { "type": "number", "description": "Epoch timestamp for the start of task" }, "endTime": { "type": "number", "description": "Epoch timestamp for the end of task" }, "location": { "type": "object", "description": "Location at start of task", "properties": { "latitude": { "type": "string", "description": "Latitude" }, "longitude": { "type": "string", "description": "Longitude" } } }, "userDetails": { "type": "string", "description": "Unique identifier of user performing the action" } } } }, "required": [ "success", "mode", "transactionId" ] }, "canMerge": false }
{ "name": "Form", "entityCode": "0015", "description": "To collect different information in different formats", "tag": [ { "name": "usage", "value": "Utility" } ], "inputs": { "type": "object", "properties": { "jsonSchema": { "title": "JSON Schema", "description": "Using this attribute developers can create a form.", "type": "object" }, "uiSchema": { "title": "UI Schame", "description": "Develoeprs can set what all should be shown on UI screen in the form", "type": "object" }, "title": { "title": "Title", "type": "string", "description": "Title for the message to be displayed to the FE" }, "message": { "title": "Message", "type": "string", "description": "Actual instruction message body for the FE." }, "canGoBack": { "title": "Can go back", "type": "boolean", "description": "This attribute enables the developers to revert back to any of the previous ETs." }, "applicableReasons": { "title": "Applicable reasons", "description": "Developers can use this attribute to provide Applicable Reason code for moving from one ET to the next one.", "type": "object" } }, "required": ["jsonSchema", "uiSchema", "title", "applicableReasons"] }, "output": { "type": "object", "properties": { "success": { "description": "Success flag for the operation performed by user", "type": "boolean" }, "data": { "description": "Data returned from user input", "type": "object" }, "eventCode": { "type": "string", "description": "Event code" }, "reasonCode": { "type": "string", "description": "Reason code" }, "meta": { "type": "object", "description": "Meta data related to execution of task", "properties": { "startTime": { "type": "number", "description": "Epoch timestamp for the start of task" }, "endTime": { "type": "number", "description": "Epoch timestamp for the end of task" }, "location": { "type": "object", "description": "Location at start of task", "properties": { "latitude": { "type": "string", "description": "Latitude" }, "longitude": { "type": "string", "description": "Longitude" } } }, "userDetails": { "type": "string", "description": "Unique identifier of user performing the action" } } } }, "required": ["success", "data"] }, "canMerge": false }
{ "name": "Scan", "entityCode": "0016", "description": "To scan a barcode or QR code", "tag": [ { "name": "usage", "value": "Utility" } ], "inputs": { "type": "object", "properties": { "defaultERC": { "title": "Default Event Reason Code", "type": "object", "description": "This attribute is used for determining the Unscanned shipments.", "required": ["eventCode", "reasonCode"], "properties": { "eventCode": { "title": "Event Code", "description": "This attribute is used to enable the developer to set default event code.", "type": "string" }, "reasonCode": { "title": "Reason Code", "description": "This attribute is used to enable the developer to set default reason code", "type": "string" } } }, "ercSelector": { "title": "Event/Reason Code Selector", "description": "FE will select the ERC (Event and Reason Code) from the dropdown displayed and using this attribute developer can enable an FE to do so.", "type": "array", "items": { "type": "object", "required": ["eventCode", "reasonCode"], "properties": { "eventCode": { "title": "Event Code", "description": "This attribute is used to enable the developer to set default event code.", "type": "string" }, "reasonCode": { "title": "Reason Code", "description": "This attribute is used to enable the developer to set default reason code", "type": "array", "items": { "type": "string" }, "uniqueItems": true } } } }, "scannedInput": { "title": "Scanned Input", "type": "object", "description": "This attribute is used by developers to set the type for scanned inputs. The type of scan to be expected.", "properties": { "scanType": { "title": "Scan Type", "description": "Type of scan", "type": "array", "uniqueItems": true, "items": { "type": "string", "enum": [ "QRCODE", "aztec", "codabar", "code39", "code93", "code128", "datamatrix", "ean13", "ean8", "itf14", "pdf417", "upc_e" ] } } }, "required": ["scanType"] }, "scanMode": { "title": "Scan Mode", "description": "Using this attribute developers can help the user to select the scan mode of Shipments to be delivered/Picked.", "type": "string", "enum": ["SINGLE", "MULTI"] }, "scanCountLimit": { "title": "Max scan count", "type": "number", "description": "This attributes helps the developers to set the maximum limit of the items to be scanned in multi-scan mode.", "minimum": 1 }, "validation": { "title": "Validation", "type": "object", "description": "Regex to validate scanned strings", "properties": { "selectedIndex": { "title": "Selected Index", "description": "This attribute helps the developers to define the type of index selection that can be used.", "type": "number", "default": 0, "minimum": 0, "maximum": 2 }, "logic": { "title": "Validation Logic", "description": "This attribute is used by the developers to provide the logic for the selected index.", "anyOf": [ { "title": "Scans", "minItems": 1, "maxItems": 100, "uniqueItems": true, "type": "array", "description": "List of items to be scanned", "items": { "type": "string", "description": "ID of items to be scanned" } }, { "title": "Validation Regex", "type": "string", "description": "Regex to validate scanned strings" }, { "title": "Validation API", "type": "object", "description": "API to validate scanned items from.", "properties": { "uri": { "type": "string", "title": "URI", "description": "HTTP API url" }, "timeout": { "type": "number", "title": "Timeout for API", "description": "The time after which request will be canceled", "default": 15 }, "httpMethod": { "title": "HTTP Method", "description": "HTTP Method", "type": "string", "enum": ["PUT", "POST", "GET"] }, "headers": { "type": "array", "title": "Headers", "description": "API headers", "items": { "type": "object", "properties": { "key": { "type": "string", "title": "Header key" }, "value": { "type": "string", "title": "Header value" } } } }, "requestBody": { "type": "object", "title": "HTTP Request Body", "description": "request body object" }, "queryParams": { "type": "array", "title": "HTTP Query param", "description": "Query param for request", "items": { "type": "object", "properties": { "key": { "type": "string", "title": "Query key" }, "value": { "type": "string", "title": "Query value" } } } }, "pathParams": { "type": "array", "title": "HTTP Path param", "description": "Path param for request", "items": { "type": "object", "properties": { "key": { "type": "string", "title": "Path key" }, "value": { "type": "string", "title": "Path value" } } } }, "responseJsonLogic": { "type": "object", "title": "JSON logic", "description": "Json path to extract the required output from API response" }, "errorJsonLogic": { "type": "object", "title": "Json Path", "description": "Json path to extract the required error response" } }, "required": [ "uri", "httpMethod", "responseJsonLogic", "errorJsonLogic" ] } ] } }, "required": ["selectedIndex", "logic"] }, "exitOnError": { "title": "Exit on Error", "type": "boolean", "description": "This attribute can be used by the developer to drop the workflow if the scan fails." }, "title": { "title": "Title", "type": "string", "description": "Title for the message to be displayed to the FE." }, "message": { "title": "Message", "type": "string", "description": "Message of instruction" }, "canGoBack": { "title": "Can go back", "type": "boolean", "description": "Can go back" }, "applicableReasons": { "title": "Applicable reasons", "description": "applicable reason codes", "type": "object" }, "additionalMultiConfig": { "title": "Additional MultiConfig", "description": "This attribute holds additional inputs for developer to provide with exitOnError attribute.", "type": "object", "properties": { "validationType": { "title": "Validation Type", "description": "This attribute can be used by developer to set the validation type for the FE before the FE moves to next ET.", "type": "string", "enum": ["ALL_OR_NONE", "SUBSET_OF_LIST"] } }, "required": ["validationType"] } }, "required": [ "defaultERC", "scannedInput", "scanMode", "title", "applicableReasons", "validation" ] }, "output": { "type": "object", "properties": { "success": { "description": "Success flag for the operation performed by user", "type": "boolean" }, "eventCode": { "type": "string", "description": "Event code" }, "reasonCode": { "type": "string", "description": "Reason code" }, "scans": { "type": "array", "description": "Array of scan objects", "items": { "type": "object", "description": "Object to describe details of single scan", "properties": { "value": { "type": "string", "description": "Value of scanned item" }, "validated": { "type": "boolean", "description": "Boolean to denote if scan was validate successfully" }, "timestamp": { "type": "number", "description": "Epoch timestamp for the scan" } }, "required": ["value", "timestamp"] } }, "meta": { "type": "object", "description": "Meta data related to execution of task", "properties": { "startTime": { "type": "number", "description": "Epoch timestamp for the start of task" }, "endTime": { "type": "number", "description": "Epoch timestamp for the end of task" }, "location": { "type": "object", "description": "Location at start of task", "properties": { "latitude": { "type": "string", "description": "Latitude" }, "longitude": { "type": "string", "description": "Longitude" } } }, "userDetails": { "type": "string", "description": "Unique identifier of user performing the action" } } } }, "required": ["success", "scans"] }, "canMerge": false, "meta": { "allowFailureFlow": false } }
{ "name": "Completed-Success", "entityCode": "0007", "description": "Ability to define if the terminal endpoint of a workflow is successful", "tag": [ { "name": "usage", "value": "Utility" } ], "inputs": { "type": "object", "properties": { "canGoBack": { "title": "Can go back", "type": "boolean", "description": "This attribute enables the developers to revert back to any of the previous ETs." }, "applicableReasons": { "title": "Applicable reasons", "description": "Developers can use this attribute to provide Applicable Reason code for moving from one ET to the next one.", "type": "object" } }, "required": ["applicableReasons"] }, "output": { "type": "object", "properties": { "success": { "description": "Success flag for the operation performed by user", "type": "boolean" }, "eventCode": { "type": "string", "description": "Event code" }, "reasonCode": { "type": "string", "description": "Reason code" }, "lastEventCode": { "type": "string", "description": "Last Event code" }, "lastReasonCode": { "type": "string", "description": "Last Reason code" }, "meta": { "type": "object", "description": "Meta data related to execution of task", "properties": { "startTime": { "type": "number", "description": "Epoch timestamp for the start of task" }, "endTime": { "type": "number", "description": "Epoch timestamp for the end of task" }, "location": { "type": "object", "description": "Location at start of task", "properties": { "latitude": { "type": "string", "description": "Latitude" }, "longitude": { "type": "string", "description": "Longitude" } } }, "userDetails": { "type": "string", "description": "Unique identifier of user performing the action" } } } }, "required": ["success"] }, "canMerge": false }
{ "name": "Completed-Failure", "entityCode": "0008", "description": "Ability to define if the terminal endpoint of a workflow is failure", "tag": [ { "name": "usage", "value": "Utility" } ], "inputs": { "type": "object", "properties": { "canGoBack": { "title": "Can go back", "type": "boolean", "description": "This attribute enables the developers to revert back to any of the previous ETs." }, "applicableReasons": { "title": "Applicable reasons", "description": "Developers can use this attribute to provide Applicable Reason code for moving from one ET to the next one.", "type": "object" } }, "required": ["applicableReasons"] }, "output": { "type": "object", "properties": { "success": { "description": "Success flag for the operation performed by user", "type": "boolean" }, "eventCode": { "type": "string", "description": "Event code" }, "reasonCode": { "type": "string", "description": "Reason code" }, "lastEventCode": { "type": "string", "description": "Last Event code" }, "lastReasonCode": { "type": "string", "description": "Last Reason code" }, "meta": { "type": "object", "description": "Meta data related to execution of task", "properties": { "startTime": { "type": "number", "description": "Epoch timestamp for the start of task" }, "endTime": { "type": "number", "description": "Epoch timestamp for the end of task" }, "location": { "type": "object", "description": "Location at start of task", "properties": { "latitude": { "type": "string", "description": "Latitude" }, "longitude": { "type": "string", "description": "Longitude" } } }, "userDetails": { "type": "string", "description": "Unique identifier of user performing the action" } } } }, "required": ["success"] }, "canMerge": false }
{ "name": "InitPayment", "entityCode": "0017", "description": "To instruct the app layer to initiate payment flow with payment data.", "tag": [ { "name": "usage", "value": "Utility" } ], "inputs": { "type": "object", "properties": { "amount": { "title": "Amount", "description": "The amount to be displayed on the FE screen. Right now it is just cash.", "type": "object", "properties": { "value": { "title": "Amount", "description": "Value of the amount to be collected by the FE.", "type": "number", "minimum": 0 }, "currencyCode": { "title": "Currency code", "description": "Standard alpha codes and numeric codes for the representation of currencies.", "type": "string", "minLength": 3, "maxLength": 3 }, "minorUnit": { "title": "Minor Code", "description": "Standard minor unit code of the currency.", "type": "number", "minimum": 0, "maximum": 5 } }, "required": ["value", "currencyCode"] }, "allowedModes": { "title": "Allowed Modes list", "type": "array", "description": "This attribute allows developers to set the different modes of payments to be accepted. Example: Cash, Credit, etc.", "items": { "type": "string", "enum": ["CASH", "UPI", "PAYMENT_LINK"] }, "minItems": 1, "uniqueItems": true }, "title": { "title": "Title", "type": "string", "description": "Title for the message to be displayed to the FE." }, "message": { "title": "Message", "type": "string", "description": "Actual instruction message body for the FE." }, "canGoBack": { "title": "Can go back", "type": "boolean", "description": "This attribute enables the developers to revert back to any of the previous ETs." }, "applicableReasons": { "title": "Applicable reasons", "description": "Developers can use this attribute to provide Applicable Reason code for moving from one ET to the next one.", "type": "object" } }, "required": ["amount", "allowedModes", "title", "applicableReasons"] }, "output": { "type": "object", "properties": { "success": { "description": "Success flag for the operation performed by user", "type": "boolean" }, "transactionId": { "description": "Unique transaction id", "type": "string" }, "paymentMode": { "description": "Payment mode selected by user", "type": "string", "enum": ["CASH", "UPI", "PAYMENT_LINK"] }, "eventCode": { "type": "string", "description": "Event code" }, "reasonCode": { "type": "string", "description": "Reason code" }, "meta": { "type": "object", "description": "Meta data related to execution of task", "properties": { "startTime": { "type": "number", "description": "Epoch timestamp for the start of task" }, "endTime": { "type": "number", "description": "Epoch timestamp for the end of task" }, "location": { "type": "object", "description": "Location at start of task", "properties": { "latitude": { "type": "string", "description": "Latitude" }, "longitude": { "type": "string", "description": "Longitude" } } }, "userDetails": { "type": "string", "description": "Unique identifier of user performing the action" } } } }, "required": ["success", "paymentMode", "transactionId"] }, "canMerge": false }
{ "name": "ProcessPayment", "entityCode": "0018", "description": "To process a payment and generate transaction IDs", "tag": [ { "name": "usage", "value": "Utility" } ], "inputs": { "type": "object", "properties": { "amount": { "title": "Amount", "description": "This attribute allows the develoepr to show the data as per the scan if it is an online payment (UPI or other online payment method).", "type": "object", "properties": { "value": { "title": "Amount", "description": "Value of the amount to be collected by the FE.", "type": "number", "minimum": 0 }, "currencyCode": { "title": "Currency code", "description": "Standard alpha codes and numeric codes for the representation of currencies.", "type": "string", "minLength": 3, "maxLength": 3 }, "minorUnit": { "title": "Minor Code", "description": "Standard minor unit code of the currency.", "type": "number", "minimum": 0, "maximum": 5 } }, "required": ["value", "currencyCode"] }, "paymentMode": { "title": "Payment mode", "description": "This attribute is used to the allowed payment modes - UPI, Credit Card, etc.", "type": "string", "enum": ["CASH", "UPI", "PAYMENT_LINK"] }, "title": { "title": "Title", "type": "string", "description": "Title of instruction" }, "message": { "title": "Message", "type": "string", "description": "Message of instruction" }, "canGoBack": { "title": "Can go back", "type": "boolean", "description": "Can go back" }, "transactionId": { "title": "transaction id", "type": "string", "description": "transaction id" }, "applicableReasons": { "title": "Applicable reasons", "description": "Developers can use this attribute to provide Applicable Reason code for moving from one ET to the next one.", "type": "object" } }, "required": [ "amount", "paymentMode", "title", "transactionId", "applicableReasons" ] }, "output": { "type": "object", "properties": { "success": { "description": "Success flag for the operation performed by user", "type": "boolean" }, "transactionId": { "description": "Unique transaction id", "type": "string" }, "collectedAmount": { "description": "Amount collected (ISO 4217)", "type": "object", "properties": { "value": { "title": "Amount", "description": "Amount collected", "type": "number", "minimum": 0 }, "currencyCode": { "title": "Currency code", "description": "Currency code in ISO 4217", "type": "string", "minLength": 3, "maxLength": 3 }, "minorUnit": { "title": "Minor Code", "description": "Currency minor code in ISO 4217", "type": "number", "minimum": 0, "maximum": 5 } }, "required": ["value", "currencyCode"] }, "paymentMeta": { "description": "Payment meta data", "type": "object" }, "eventCode": { "type": "string", "description": "Event code" }, "reasonCode": { "type": "string", "description": "Reason code" }, "meta": { "type": "object", "description": "Meta data related to execution of task", "properties": { "startTime": { "type": "number", "description": "Epoch timestamp for the start of task" }, "endTime": { "type": "number", "description": "Epoch timestamp for the end of task" }, "location": { "type": "object", "description": "Location at start of task", "properties": { "latitude": { "type": "string", "description": "Latitude" }, "longitude": { "type": "string", "description": "Longitude" } } }, "userDetails": { "type": "string", "description": "Unique identifier of user performing the action" } } }, "paymentMode": { "title": "Payment mode", "description": "Payment mode", "type": "string", "enum": ["CASH", "UPI", "PAYMENT_LINK"] } }, "required": ["success", "collectedAmount", "transactionId", "paymentMode"] }, "canMerge": false }
{ "name": "CompletePayment", "entityCode": "0019", "description": "To record final details of payments (tenant payID, transaction ID, amount etc).", "tag": [ { "name": "usage", "value": "Utility" } ], "inputs": { "type": "object", "properties": { "expectedAmount": { "title": "Expected Amount", "description": "By using this attribute developers can show the data of the complete payments.", "type": "object", "properties": { "value": { "title": "Amount", "description": "Value of the complete amount.", "type": "number", "minimum": 0 }, "currencyCode": { "title": "Currency code", "description": "Standard alpha codes and numeric codes for the representation of currencies.", "type": "string", "minLength": 3, "maxLength": 3 }, "minorUnit": { "title": "Minor Code", "description": "Standard minor unit code of the currency.", "type": "number", "minimum": 0, "maximum": 5 } }, "required": ["value", "currencyCode"] }, "collectedAmount": { "title": "Collected Amount", "description": "This attributes can be used to enter the amount to be collected by the FE.", "type": "object", "properties": { "value": { "title": "Amount", "description": "This attribute will help to enter the actual value of the amount to be collected.", "type": "number", "minimum": 0 }, "currencyCode": { "title": "Currency code", "description": "Standard alpha codes and numeric codes for the representation of currencies.", "type": "string", "minLength": 3, "maxLength": 3 }, "minorUnit": { "title": "Minor Code", "description": "Standard minor unit code of the currency.", "type": "number", "minimum": 0, "maximum": 5 } }, "required": ["value", "currencyCode"] }, "transactionId": { "title": "Platform Transaction Id", "description": "Developers can use this attribute to show the transaction Id of the payment. It is only used in case of online payment", "type": "string" }, "tenantTransactionId": { "title": "Tenant Transaction Id", "description": "Platform based internal transaction ID to keep the track of online transaction.", "type": "string" }, "title": { "title": "Title", "type": "string", "description": "Title for the message to be displayed to the FE" }, "message": { "title": "Message", "type": "string", "description": "Actual instruction message body for the FE." }, "canGoBack": { "title": "Can go back", "type": "boolean", "description": "This attribute enables the developers to revert back to any of the previous ETs." }, "paymentMode": { "title": "Payment mode", "description": "Payment mode", "type": "string", "enum": ["CASH", "UPI", "PAYMENT_LINK"] }, "applicableReasons": { "title": "Applicable reasons", "description": "Developers can use this attribute to provide Applicable Reason code for moving from one ET to the next one.", "type": "object" } }, "required": [ "expectedAmount", "collectedAmount", "transactionId", "tenantTransactionId", "title", "paymentMode", "applicableReasons" ] }, "output": { "type": "object", "properties": { "success": { "description": "Success flag for the operation performed by user", "type": "boolean" }, "eventCode": { "type": "string", "description": "Event code" }, "reasonCode": { "type": "string", "description": "Reason code" }, "meta": { "type": "object", "description": "Meta data related to execution of task", "properties": { "startTime": { "type": "number", "description": "Epoch timestamp for the start of task" }, "endTime": { "type": "number", "description": "Epoch timestamp for the end of task" }, "location": { "type": "object", "description": "Location at start of task", "properties": { "latitude": { "type": "string", "description": "Latitude" }, "longitude": { "type": "string", "description": "Longitude" } } }, "userDetails": { "type": "string", "description": "Unique identifier of user performing the action" } } }, "paymentMode": { "title": "Payment mode", "description": "Payment mode", "type": "string", "enum": ["CASH", "UPI", "PAYMENT_LINK"] }, "collectedAmount": { "title": "Collected Amount", "description": "Amount collected (ISO 4217)", "type": "object", "properties": { "value": { "title": "Amount", "description": "Amount", "type": "number", "minimum": 0 }, "currencyCode": { "title": "Currency code", "description": "Currency code in ISO 4217", "type": "string", "minLength": 3, "maxLength": 3 }, "minorUnit": { "title": "Minor Code", "description": "Currency minor code in ISO 4217", "type": "number", "minimum": 0, "maximum": 5 } }, "required": ["value", "currencyCode"] } }, "required": ["success", "paymentMode", "collectedAmount"] }, "canMerge": false }
{ "name": "ValidateOtp", "entityCode": "0052", "description": "Ability to capture and verify if the given input matches the response from an API or static value.", "tag": [ { "name": "usage", "value": "Utility" } ], "inputs": { "type": "object", "properties": { "generationLogic": { "title": "Logic for generation", "description": "When do you want to generate the OTP.", "type": "object", "properties": { "generateOnLoad": { "title": "Generation on load", "type": "boolean", "description": "Generate OTP via FE device" }, "api": { "title": "API", "type": "object", "description": "Generation api", "properties": { "uri": { "type": "string", "title": "URI", "description": "HTTP API url" }, "timeout": { "type": "number", "title": "Timeout for API", "description": "The time after which request will be canceled" }, "httpMethod": { "title": "HTTP Method", "description": "HTTP Method", "type": "string", "enum": ["PUT", "POST", "GET"] }, "headers": { "type": "array", "title": "Headers", "description": "API headers", "items": { "type": "object", "properties": { "key": { "type": "string", "title": "Header key" }, "value": { "type": "string", "title": "Header value" } } } }, "requestBody": { "type": "object", "title": "HTTP Request Body", "description": "request body object" }, "queryParams": { "type": "array", "title": "HTTP Query param", "description": "Query param for request", "items": { "type": "object", "properties": { "key": { "type": "string", "title": "Query key" }, "value": { "type": "string", "title": "Query value" } } } }, "pathParams": { "type": "array", "title": "HTTP Path param", "description": "Path param for request", "items": { "type": "object", "properties": { "key": { "type": "string", "title": "Path key" }, "value": { "type": "string", "title": "Path value" } } } }, "responseJsonLogic": { "type": "object", "title": "Response JSON logic", "description": "Json path to extract the required output from API response" }, "errorJsonLogic": { "type": "object", "title": "Error Json Logic", "description": "Json path to extract the required error response" } }, "required": [ "uri", "httpMethod", "responseJsonLogic", "errorJsonLogic" ] }, "enableRetry": { "title": "Enable retry", "type": "boolean", "description": "Developers can use this attribute if they want to enable retries of the package delivery" }, "retryConfig": { "title": "Retry configuration", "description": "Retry the OTP if enable retry is true.", "type": "object", "properties": { "buttonTitle": { "title": "Button Title", "type": "string", "description": "Button label" }, "maxAttempt": { "title": "Max retry attempts", "type": "number", "description": "Maximum retry attempts" }, "delay": { "title": "Delay for Retry (seconds)", "type": "number", "description": "Resend button enable delay in seconds" } }, "required": ["buttonTitle"] } }, "required": ["generateOnLoad", "api", "enableRetry"] }, "captureInput": { "title": "Capture Input", "description": "Developers can use this attribute to validate the captured inputs", "type": "object", "properties": { "inputType": { "title": "Input Data type", "description": "Developers can declare the input type by using this attribute.", "type": "string", "enum": ["string", "number"] }, "length": { "title": "Input length", "type": "number", "description": "Maximum length of the input type.", "minimum": 1 }, "validationRegex": { "title": "Validation Regex", "type": "string", "description": "Validation for the format of input data type." } }, "required": ["inputType", "length"] }, "validation": { "title": "Validation", "type": "object", "properties": { "selectedIndex": { "title": "Selection Validation Index", "description": "Selected Validation Logic in anyOf", "type": "number", "minimum": 0, "maximum": 1 }, "logic": { "title": "Validation Logic", "anyOf": [ { "title": "Validation API", "type": "object", "properties": { "api": { "title": "API", "type": "object", "description": "Generation api", "properties": { "uri": { "type": "string", "title": "URI", "description": "HTTP API url" }, "timeout": { "type": "number", "title": "Timeout for API", "description": "The time after which request will be canceled" }, "httpMethod": { "title": "HTTP Method", "description": "HTTP Method", "type": "string", "enum": ["PUT", "POST", "GET"] }, "headers": { "type": "array", "title": "Headers", "description": "API headers", "items": { "type": "object", "properties": { "key": { "type": "string", "title": "Header key" }, "value": { "type": "string", "title": "Header value" } } } }, "requestBody": { "type": "object", "title": "HTTP Request Body", "description": "request body object" }, "queryParams": { "type": "array", "title": "HTTP Query param", "description": "Query param for request", "items": { "type": "object", "properties": { "key": { "type": "string", "title": "Query key" }, "value": { "type": "string", "title": "Query value" } } } }, "pathParams": { "type": "array", "title": "HTTP Path param", "description": "Path param for request", "items": { "type": "object", "properties": { "key": { "type": "string", "title": "Path key" }, "value": { "type": "string", "title": "Path value" } } } }, "responseJsonLogic": { "type": "object", "title": "Response JSON logic", "description": "Json path to extract the required output from API response" }, "errorJsonLogic": { "type": "object", "title": "Error JSON logic", "description": "Json path to extract the required error response" } }, "required": [ "uri", "httpMethod", "responseJsonLogic", "errorJsonLogic" ] } }, "required": ["api"] }, { "title": "Validation Value", "type": "object", "properties": { "value": { "title": "Value", "type": "string", "description": "Value to validate user entered input from" } }, "required": ["value"] } ] } }, "required": ["selectedIndex", "logic"] }, "title": { "title": "Title", "type": "string", "description": "Title for the message to be displayed to the FE" }, "message": { "title": "Message", "type": "string", "description": "Actual instruction message body for the FE." }, "canGoBack": { "title": "Can go back", "type": "boolean", "description": "This attribute enables the developers to revert back to any of the previous ETs." }, "applicableReasons": { "title": "Applicable reasons", "description": "Developers can use this attribute to provide Applicable Reason code for moving from one ET to the next one.", "type": "object" } }, "required": ["captureInput", "validation", "title", "applicableReasons"] }, "output": { "type": "object", "properties": { "success": { "description": "Boolean to represent result of verification", "type": "boolean" }, "eventCode": { "type": "string", "description": "Event code" }, "reasonCode": { "type": "string", "description": "Reason code" }, "meta": { "type": "object", "description": "Meta data related to execution of task", "properties": { "startTime": { "type": "number", "description": "Epoch timestamp for the start of task" }, "endTime": { "type": "number", "description": "Epoch timestamp for the end of task" }, "location": { "type": "object", "description": "Location at start of task", "properties": { "latitude": { "type": "string", "description": "Latitude" }, "longitude": { "type": "string", "description": "Longitude" } } }, "userDetails": { "type": "string", "description": "Unique identifier of user performing the action" } } } }, "required": ["success"] }, "canMerge": true, "meta": { "allowFailureFlow": true, "allowGoBack": true } }
You can combine one or more Execution Tasks together in a logical sequence that can be reused. This is called an Execution Macro. Currently, we have one default Execution Macro. The payload is provided below. For more information on Execution Macros, see Workflow Documentation.
{ "flows": [ { "description": "Initiate payment", "id": "etask:4eb8d36b-6762-5c53-aca6-95b1f4e3aa3f", "name": "InitPayment", "next": [ { "task": "ProcessPayment", "condition": "initPaymentSuccess" }, { "task": "macroFailed", "condition": "initPaymentFailure" } ] }, { "description": "Process payment", "id": "etask:9a559375-02a5-50fe-9ce4-0a36df6f324e", "name": "ProcessPayment", "next": [ { "task": "CompletePayment", "condition": "processSuccess" }, { "task": "macroFailed", "condition": "processFailure" } ] }, { "description": "Complete payment", "id": "etask:0e6c7bd7-c9ab-5b82-85b2-a054249bc1f1", "name": "CompletePayment", "next": [ { "task": "macroSucceeded", "condition": "completeSuccess" }, { "task": "macroFailed", "condition": "completeFailure" } ] } ], "name": "Collect Cash Macro", "conditions": { "initPaymentSuccess": { "and": [ { "==": [ "$.output.entityCode", "0017" ] }, { "==": [ "$.output.eventCode", "E-010" ] } ] }, "initPaymentFailure": { "and": [ { "==": [ "$.output.entityCode", "0017" ] }, { "==": [ "$.output.eventCode", "E-011" ] }, { "==": [ "$.output.reasonCode", "R-0020" ] } ] }, "processSuccess": { "and": [ { "==": [ "$.output.entityCode", "0018" ] }, { "==": [ "$.output.eventCode", "E-010" ] } ] }, "processFailure": { "and": [ { "==": [ "$.output.entityCode", "0018" ] }, { "==": [ "$.output.eventCode", "E-011" ] } ] }, "completeSuccess": { "and": [ { "==": [ "$.output.entityCode", "0019" ] }, { "==": [ "$.output.eventCode", "E-010" ] } ] }, "completeFailure": { "and": [ { "==": [ "$.output.entityCode", "0019" ] }, { "==": [ "$.output.eventCode", "E-011" ] } ] } }, "canMerge": false, "systemGenerated": true, "inputs": { "InitPayment": { "$val": { "amount": { "$expr": "$.inputs.amount" }, "allowedModes": { "$val": [ "CASH" ] }, "title": { "$val": "Collect Payment" }, "applicableReasons": { "$val": { "E-010": { "$val": [] }, "E-011": { "$val": [ "R-0020" ] } } } } }, "ProcessPayment": { "$val": { "amount": { "$expr": "$.inputs.amount" }, "paymentMode": { "$val": "CASH" }, "title": { "$val": "Processing Payment" }, "transactionId": { "$expr": "$.InitPayment.output.transactionId" }, "applicableReasons": { "$val": { "E-010": { "$val": [] }, "E-011": { "$val": [] } } } } }, "CompletePayment": { "$val": { "expectedAmount": { "$expr": "$.inputs.amount" }, "collectedAmount": { "$expr": "$.ProcessPayment.output.collectedAmount" }, "transactionId": { "$expr": "$.ProcessPayment.output.transactionId" }, "tenantTransactionId": { "$expr": "$.ProcessPayment.output.tenantTransactionId" }, "paymentMode": { "$expr": "$.ProcessPayment.output.paymentMode" }, "title": { "$val": "Payment Success" }, "applicableReasons": { "$val": { "E-010": { "$val": [] }, "E-011": { "$val": [] } } } } } } }