Saltar al contendio prinicipal

Parametrized Bot Data Model

Advertencia

Esta página aún no se encuentra traducida al español.

COTParametrizedBot

Description

A parametrized bot is an automated routine with a bot that executes a task in each stage.

The COTParametrizedBot data model contains a routine's settings. This data model is used within other data models, such as COTSMStateMachine, COTSMState, COTSMSLA, COTBot, among others.

JSON Sample

Sample taken from an SLA Routine:

{
"_id": "61829b0ecc13e1ff490c8547",
"maxIterations": 10,
"stages": [
{
"_id": "61829b17bfbdc5e41e3fb653",
"key": "email",
"name": "PBEmail",
"data": {
"subject": "Task Reminder",
"content": {
"recipientName": "($CODE#users#_id#($OUTPUT#task_request#data|assignee))|name|names",
"recipientEmail": "",
"companyName": "ACME",
"title": [
"Pending Task"
],
"action": "",
"code": "",
"messageA": "$JOIN# #(Task number)#($OUTPUT#task_request#data|serial)#($OUTPUT#task_request#data|name)#is still pending.",
"messageB": "Please complete the task or modify its end-date."
},
"targets": [
"($CODE#users#_id#($OUTPUT#task_request#data|assignee))|email"
],
"singleRecipient": true
},
"next": {
"DEFAULT": ""
},
"customNetworkRequest": []
},
{
"_id": "61829b287076806e3559a796",
"key": "task_request",
"name": "NWRequest",
"data": {
"url": "$JOIN#/#($ENV#BASEURL)#api#tasks#($VALUE#taskGroupId)#task#($VALUE#taskId)",
"method": "GET",
"defaultAuth": true,
"headers": {
"admin": true
}
},
"next": {
"SUCCESS": "email",
"ERROR": ""
},
"customNetworkRequest": []
}
],
"start": "task_request",
"version": "v3"
},

Fields

FieldDescriptionTypeNote
maxIterationsSpecifies the maximum number of stages the routine can go through.numberMake sure looping stages are taken into account when specifying the maximum number of iterations.
stagesRepresents the different stages or steps the routine goes through. Each routine stage is designated a stage type or bot that is called upon to carry out a specific task.object[ ]A complete list of stage types can be found here.
stages[index].customNetworkRequestIndicates the parameters for making a customized network request within the routine stage.object[ ]
stages[index].dataContains the stage type parameters or configuration. The required data format depends on the stage type and its version.objectFormat example: Wait stage type data includes time with the following format: { milliseconds: number }
stages[index].keyIndicates the stage's custom code name.stringMaximum 60 characters; only lowercase letters, numbers, and underscore allowed; must be unique.
stages[index].nameIndicates the standard name of the stage type (bot), e.g., PBMessage, PBCreateTask, etc..string
stages[index].nextnext is a custom {[key]: string} object that indicates the next step in the routine. key is defined by the stage type.objectObject keys usually follow IF/ELSE logic and can include keys such as SUCCESS, ERROR, or DEFAULT.
stages[index].versionStage version.stringFor internal use only.
startIndicates the stage the routine initiates in.stringValid options include any routine stages[index].key value.
versionThe routine's version number.numberFor internal use only.

Deprecated

FieldDescriptionTypeNote
stages[index].customNetworkRequest[index].bodyThe customized network request's body.objectDEPRECATED
stages[index].customNetworkRequest[index].endpointThe customized network request's endpoint.string[ ]DEPRECATED
stages[index].customNetworkRequest[index].findOnebooleanDEPRECATED
stages[index].customNetworkRequest[index].keyOutputstringDEPRECATED
stages[index].customNetworkRequest[index].methodIndicates the request method. Enum: ["GET", "POST"]stringDEPRECATED
stages[index].customNetworkRequest[index].queryobjectDEPRECATED

Additional Resources

Help