Enhanced Bot Endpoint Method

Enhanced Bots

This feature allows you to specify a bot to be used with VA the pipeline feature, without requiring the construction of a VA.

To configure an enhanced bot, when creating an endpoint instead of specifying either a TargetVAReference or a TargetBotReference, you will instead specify an EnhancedBot configuration. For example, our endpoint could be as follows:

{
    "Address": "someaddress",                   /* Required */
    "Name": "somename",                         /* Required */
    "Status": "online",                         /* Required */
    "EnhancedBot": {                            /* Required */
       "BotName": "LexOne",                     /* Required, the name of the bot to be enhanced */
        "PipelineConfiguration": {              /* Required */
          "IngressPipeline": [],                /* Required, see below */
          "EgressPipeline": [],                 /* Required, see below */
          "Events": {}                          /* Required, see below */
        }
      }
    },      
    "Useragent": "useragent",                   /* Required */
}

BotName should contain the target Bot, and PipelineConfiguration should contain the pipelines to be used. For details on configuring pipelines, see the virtual assistant page

An example of a PipelineConfiguration with a SessionStart event which sends a message, and an input pipeline for credit card redaction.

{
  "IngressPipeline": [
        {
          "Id": "CreditCardRedact",
          "Type": "REGEX_REDACT",
          "Properties": {
            "Regex": "(?:5[1-5][0-9]{2}|222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}"
          }
        }
      ],
  "EgressPipeline": [],
  "Events": {
    "@SessionStart": [
          {
            "Id": "sessionStartMessage",
            "Type": "SEND_MESSAGE",
            "Properties": {
              "Message": "Hi! How can we help?"
            }
          }
        ]
  }
}

Supported actions

The following bot actions are supported by enhanced bots, other actions present in your bot may result in unexpected behaviour.

  • SEND_MESSAGE
  • ASSIGN_BOT
  • FALLBACK
  • FORWARD
  • DONE
  • EXECUTE_API
  • SEND_MARKUP
  • EXECUTE_FLOW
  • RAISE_EVENT
  • TRANSFER
  • SET_PUBLIC_DATA
  • SEND_HOST_NOTIFICATION

Troubleshooting

When troubleshooting errors or unexpected behavior, be sure to check the logs of both the target bot used and the organization level logs. You may find logs which would usually appear as a VA log under EnhancedBotVA-BotName.