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.

Execution Tasks

An Execution Task (ET) is the smallest atomic task that is performed by an operator. Currently, we have 17 system-defined ETs. Below we have provided the payloads for all the default ETs. For more information on ETs, see Workflow Documentation.

Start

{
   "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": "Can go back"
           },
           "applicableReasons": {
               "title": "Applicable reasons",
               "description": "applicable reason codes",
               "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
}

Verify Location

{
   "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": "Details of geo-location",
               "type": "object",
               "properties": {
                   "longitude": {
                       "title": "Longitude",
                       "type": "string",
                       "description": "Longitude",
                       "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",
                       "pattern": "^(\\+|-)?(?:90(?:(?:\\.0{1,6})?)|(?:[0-9]|[1-8][0-9])(?:(?:\\.[0-9]{1,6})?))$"
                   },
                   "accuracy": {
                       "title": "Accuracy",
                       "type": "number",
                       "description": "Accuracy in meters of the geolocation",
                       "minimum": 0
                   },
                   "geofencing": {
                       "title": "Geofencing",
                       "type": "object",
                       "description": "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 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": ["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
}

Pick

{
   "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": "Items to be picked",
               "type": "array",
               "items": {
                   "type": "object",
                   "description": "Definition of line item",
                   "properties": {
                       "skuId": {
                           "title": "SKU ID",
                           "type": "string",
                           "description": "Unique identifier for the item"
                       },
                       "productDescription": {
                           "title": "Product Description",
                           "type": "string",
                           "description": "Description of product"
                       },
                       "count": {
                           "title": "Item Count",
                           "type": "number",
                           "description": "Count of items",
                           "exclusiveMinimum": 0
                       }
                   },
                   "required": ["skuId"]
               }
           },
           "title": {
               "title": "Title",
               "type": "string",
               "description": "Title of instruction"
           },
           "message": {
               "title": "Message",
               "type": "string",
               "description": "Message of instruction"
           },
           "confirmCustodyExchange": {
               "title": "Confirm custody Exchange",
               "type": "boolean",
               "description": "Boolean key to apply custody scan"
           },
           "canGoBack": {
               "title": "Can go back",
               "type": "boolean",
               "description": "Can go back"
           },
           "applicableReasons": {
               "title": "Applicable reasons",
               "description": "applicable reason codes",
               "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
}

Verify Input

{
   "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"
                   },
                   "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", "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
}

Capture Image

{
   "name": "CaptureImage",
   "entityCode": "0011",
   "description": "To capture an image",
   "tag": [
       {
           "name": "usage",
           "value": "Utility"
       }
   ],
   "inputs": {
       "type": "object",
       "properties": {
           "resolution": {
               "title": "Resolution",
               "description": "Resolution of image to be captured",
               "type": "object",
               "properties": {
                   "length": {
                       "title": "Length",
                       "description": "Length (in px)",
                       "type": "number",
                       "exclusiveMinimum": 0
                   },
                   "breadth": {
                       "title": "Breadth",
                       "description": "Breadth (in px)",
                       "type": "number",
                       "exclusiveMinimum": 0
                   }
               },
               "required": ["length", "breadth"]
           },
           "fileSizeLimit": {
               "title": "Max file size",
               "type": "number",
               "description": "Maximum Size limit (in kb) of image to be captured",
               "exclusiveMinimum": 0
           },
           "captureMode": {
               "title": "Capture Mode",
               "description": "Mode of capturing image",
               "type": "string",
               "enum": ["SINGLE", "MULTI"]
           },
           "captureCountLimit": {
               "title": "Max image count",
               "type": "number",
               "description": "Max limit of images to be captured in multi-capture mode",
               "minimum": 1
           },
           "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": [
           "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
}

Capture Input

{
   "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": "Input data type",
               "type": "string",
               "enum": ["string", "number"]
           },
           "validationRegex": {
               "title": "Validation Regex",
               "type": "string",
               "description": "Regex to validate input strings"
           },
           "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": ["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
}

Deliver

{
   "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": "Items to be delivered",
               "type": "array",
               "items": {
                   "type": "object",
                   "description": "Definition of line item",
                   "properties": {
                       "skuId": {
                           "title": "SKU ID",
                           "type": "string",
                           "description": "Unique identifier for the item"
                       },
                       "productDescription": {
                           "title": "Product Description",
                           "type": "string",
                           "description": "Description of product"
                       },
                       "count": {
                           "title": "Item Count",
                           "type": "number",
                           "description": "Count of items",
                           "exclusiveMinimum": 0
                       }
                   },
                   "required": [
                       "skuId"
                   ]
               }
           },
           "title": {
               "title": "Title",
               "type": "string",
               "description": "Title of instruction"
           },
           "message": {
               "title": "Message",
               "type": "string",
               "description": "Message of instruction"
           },
           "confirmCustodyExchange": {
               "title": "Confirm custody Exchange",
               "type": "boolean",
               "description": "Boolean key to apply custody scan"
           },
           "confirmShipments": {
               "title": "Confirm shipments",
               "type": "boolean",
               "description": "Boolean key to confirm number of shipments delivered"
           },
           "canGoBack": {
               "title": "Can go back",
               "type": "boolean",
               "description": "Can go back"
           },
           "applicableReasons": {
               "title": "Applicable reasons",
               "description": "applicable reason codes",
               "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
}

Display

{
   "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": "Type of display",
               "type": "string",
               "enum": ["ALERT", "WARNING", "MESSAGE"]
           },
           "text": {
               "title": "Display Text",
               "type": "string",
               "description": "Text to be displayed"
           },
           "image": {
               "title": "Display Image URL",
               "description": "Url of image to be displayed",
               "type": "string"
           },
           "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": ["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
}

Doodle

{
   "name": "Doodle",
   "entityCode": "0014",
   "description": "To capture digital signature (fingertip trace)",
   "tag": [
       {
           "name": "usage",
           "value": "Utility"
       }
   ],
   "inputs": {
       "type": "object",
       "properties": {
           "resolution": {
               "title": "Resolution",
               "description": "Resolution of doodle image",
               "type": "object",
               "properties": {
                   "length": {
                       "title": "Length",
                       "description": "Length (in px)",
                       "type": "number",
                       "exclusiveMinimum": 0
                   },
                   "breadth": {
                       "title": "Breadth",
                       "description": "Breadth (in px)",
                       "type": "number",
                       "exclusiveMinimum": 0
                   }
               },
               "required": ["length", "breadth"]
           },
           "fileSizeLimit": {
               "title": "Max file size",
               "type": "number",
               "description": "Maximum Size limit (in kb) of doodle image",
               "exclusiveMinimum": 0
           },
           "penColor": {
               "title": "Pen color",
               "type": "string",
               "description": "Pen colour hex code",
               "pattern": "^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$"
           },
           "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": ["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
}

Deliver Cash

{
   "name": "DeliverCash",
   "entityCode": "0022",
   "description": "Ability to deposit cash",
   "tag": [
       {
           "name": "usage",
           "value": "Utility"
       }
   ],
   "inputs": {
       "type": "object",
       "properties": {
           "expectedAmount": {
               "title": "Amount",
               "description": "Amount to be collected (ISO 4217)",
               "type": "object",
               "properties": {
                   "value": {
                       "title": "Amount",
                       "description": "Amount to be 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"
               ]
           },
           "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"
           },
           "confirmCustodyExchange": {
               "title": "confirm custody exchange",
               "type": "boolean",
               "description": "confirm custody exchange"
           },
           "confirmAmount": {
               "title": "confirm amount",
               "type": "boolean",
               "description": "check if amount dropped needs to be confirmed"
           },
           "applicableReasons": {
               "title": "Applicable reasons",
               "description": "applicable reason codes",
               "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
}

Form

{
   "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": "Json schema used in react-jsonschema-form",
               "type": "object"
           },
           "uiSchema": {
               "title": "UI Schame",
               "description": "UI schema used in react-jsonschema-form",
               "type": "object"
           },
           "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": ["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
}

Scan

{
   "name": "Scan",
   "entityCode": "0016",
   "description": "To scan a barcode or QR code",
   "tag": [
       {
           "name": "usage",
           "value": "Utility"
       }
   ],
   "inputs": {
       "type": "object",
       "properties": {
           "scanType": {
               "title": "Scan Type",
               "description": "Type of scan",
               "type": "string",
               "enum": ["BARCODE", "QRCODE", "BOTH"]
           },
           "scanMode": {
               "title": "Scan Mode",
               "description": "Mode of scanning",
               "type": "string",
               "enum": ["SINGLE", "MULTI"]
           },
           "scanCountLimit": {
               "title": "Max scan count",
               "type": "number",
               "description": "Max limit of items to be scanned in multi-scan mode",
               "minimum": 1
           },
           "validationRegex": {
               "title": "Validation Regex",
               "type": "string",
               "description": "Regex to validate scanned strings"
           },
           "preSelectReasonCode": {
               "title": "pre select reason code",
               "type": "boolean",
               "description": "Whether to select reason code before submitting ET"
             },
           "shipments": {
               "minItems": 1,
               "maxItems":100,
               "uniqueItems": true,
               "type": "array",
               "description": "List of shipments to be scanned",
               "items": {
                 "type": "string",
                 "description": "WBN/Shipment ID to be scanned"
               }
             },
           "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": ["scanType", "scanMode", "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"
           },
           "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
}

Completed Success

{
   "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": "Can go back"
           },
           "applicableReasons": {
               "title": "Applicable reasons",
               "description": "applicable reason codes",
               "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
}

Completed Failure

{
   "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": "Can go back"
           },
           "applicableReasons": {
               "title": "Applicable reasons",
               "description": "applicable reason codes",
               "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
}

Init Payment

{
   "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": "Amount to be collected (ISO 4217)",
               "type": "object",
               "properties": {
                   "value": {
                       "title": "Amount",
                       "description": "Amount to be 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"]
           },
           "allowedModes": {
               "title": "Allowed Modes list",
               "type": "array",
               "description": "List of allowed Modes",
               "items": {
                   "type": "string",
                   "enum": ["CASH", "UPI", "PAYMENT_LINK"]
               },
               "minItems": 1,
               "uniqueItems": true
           },
           "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": ["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
}

Process Payment

{
   "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": "Amount to be collected (ISO 4217)",
               "type": "object",
               "properties": {
                   "value": {
                       "title": "Amount",
                       "description": "Amount to be 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"]
           },
           "paymentMode": {
               "title": "Payment mode",
               "description": "Payment mode",
               "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": "applicable reason codes",
               "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
}

Complete Payment

{
   "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": "Amount expected (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"]
           },
           "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"]
           },
           "transactionId": {
               "title": "Platform Transaction Id",
               "description": "Unique platform transaction id",
               "type": "string"
           },
           "tenantTransactionId": {
               "title": "Tenant Transaction Id",
               "description": "Unique tenant transaction id",
               "type": "string"
           },
           "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"
           },
           "paymentMode": {
               "title": "Payment mode",
               "description": "Payment mode",
               "type": "string",
               "enum": ["CASH", "UPI", "PAYMENT_LINK"]
           },
           "applicableReasons": {
               "title": "Applicable reasons",
               "description": "applicable reason codes",
               "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
}

Execution Macro Payload

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.

Collect Payment

{
  "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": []
            }
          }
        }
      }
    }
  }
}