Saltar al contendio prinicipal

Bots Data Model

Advertencia

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

COTBot

Description

Bots initialize routines and can be triggered either through a survey or slash command. The COTBot data model contains the bot's settings and corresponding parametrized bot (routine stages).

JSON Sample

    {
"_id": "618a69512c7cae88b3aa2fe3", //ObjectId<COTBot>
"commands": [
{
"_id": "618a695a6359f4e3aef2f5a8", //Command ObjectId
"isActive": true,
"isSlash": true,
"isSurvey": false,
"slashCmd": "sendemail",
"surveyIds": []
}
],
"company": "618a696218446b289ab7b847", //ObjectId<COTCompany>
"createdAt": "2021-05-12T18:24:20.405Z",
"description": "Send an automated email",
"global": true,
"isActive": true,
"name": "Send Email",
"parametrizedBot": { //COTParametrizedBot
"maxIterations": 2,
"stages": [
{
"_id": "618a6968eec811dbba542170", //Routine stage objectId
"key": "email",
"name": "PBEmail",
"version": null,
"data": {
"subject": "Hey! We need to talk to you.",
"content": {
"recipientName": "",
"recipientEmail": "",
"companyName": "ACME",
"title": [
"Your team is looking for you."
],
"action": "",
"code": "",
"messageA": "$JOIN# #Your presence is requested in the #($VALUE#channel|nameDisplay)# channel.",
"messageB": ""
},
"targets": [
"$VALUE#cmdArgs"
]
},
"next": {
"DEFAULT": "message"
},
"customNetworkRequest": []
},
{
"_id": "618a6974b4b9f668deab7b3e", //Routine stage objectId
"key": "message",
"name": "PBMessage",
"data": {
"content": "📩 Email sent ✅",
"contentType": "text/system",
"sentBy": "$VALUE#user|_id",
"channelIds": "$VALUE#channel|_id"
},
"next": {},
"customNetworkRequest": []
}
],
"start": "email",
"version": "v3"
},
"version": 3
}

Fields

FieldDescriptionTypeNote
_idSystem generated bot ID.ObjectId<COTBot>
commandsBot trigger settings.object[ ]
commands[index]._idSystem generated command object ID.ObjectId
commands[index].isActivebooleanif false, setting will not be used.
commands[index].isSlashIndicates if the bot is triggered by a slash command or not.boolean
commands[index].isSurveyIndicates if the bot is triggered by a survey or not.boolean
commands[index].slashCmdIndicates the string that, along with a preceeding slash, triggers the bot, e.g., /string.stringisSlash must be true.
commands[index].surveyIdsPoints to the surveys that trigger that bot.[ObjectId<COTSurvey> ]isSurvey must be true.
companyThe ID of the company the bot is found in.ObjectId<COTCompany>
createdAtIndicates when the bot was created.ISODateYYYY-MM-DDTHH:mm:ss.SSSZ
descriptionA brief description of what the bot does.string
globalIndicates if the bot is available globally, i.e., in all the channels of the company.boolean
isActiveIndicates if the bot is active or not.boolean
modifiedAtIndicates the last time the property's configuration was modified.ISODateYYYY-MM-DDTHH:mm:ss.SSSZ
namestring
parametrizedBotContains the routine that is set off by the bot.COTParametrizedBot
versionIndicates the current version of the bot tool.numberThe version should be set at 3.

Deprecated

FieldDescriptionTypeNote
__vSystem generated version.DEPRECATED
commands[index].showHelpbooleanDEPRECATED
commands[index].descriptionstringDEPRECATED
commands[index].arguments[ ]DEPRECATED
extraDatastring[ ]DEPRECATED
processstringDEPRECATED

Additional Resources

Help