Pathways

Pathways are how settings are managed for some advanced features like File Processor and Channel Shift. At the moment, pathway configuration is only available using the CLI.

Commands

Pathway configuration is service-specific meaning that you need to specify the service you are working with when creating, updating and deleting a pathway. Listing of pathways can be done accross all services.

sb-cli pathway list -s all

Channel Shift

For Channel Shift configuration, use channel-shift in your service specification

sb-cli pathway create --service channel-shift file.json

Channel Shift Fields

{
  "AdditionalPath": "/additionalPathway",
  "Operational": {
    "CountryCode": "IE", 
    "MessageStrings": { 
      "EnterMobileNumber": "Please enter your mobile number and we'll text you a link to use our virtual assistant.",
      "GenericErrorMessage": "Something has gone wrong with your call. Goodbye.",
      "InvalidPhoneNumber": "That is not a valid phone number.",
      "MessageSentConfirmation": "Thanks! a message is on its way."
    }
  },
  "BotLink": {
    "Target": {
      "Template": "https://url.com", 
      "Parameters": { 
        "botname": "bot",
        "org": "organization"
      }
    },
    "LinkShortener": { // The link shortener service, squeeze or rebrandly
      "Type": "squeeze",
      "Config": {
        "ApiKey": "API_KEY",
        "SbRegion": "us1",
        "Timeout": "3000"
      }
    }
  },
  "Delivery": {
    "Type": "SMS",
    "Templates": [ // An array of possible SMS messages to send
      "message {{botlink}}", // One of these messages will be selected at random, with {{botlink}} replaced by a shortlink
      "{{botlink}} different message"
    ],
    "Config": {
      "SenderId": "Sender", // The sender ID to show on the SMS
      "OriginationNumber": "+18563228595" // The long code number for a message to always come from
    }
  }
}
  • AdditionalPath: The alias used to identify this pathway beyond a ‘default’ configuration. The pathway is specificed when calling the channel shift service to allow for different configurations.
  • Operational
    • CountryCode: The ISO_3166 country code this pathway applies too
    • MessageStrings: A object of custom keyed strings that can be used if combined with Amazon Connect
  • BotLink: Availble variable in the delivery templates
    • Target
      • Template: A string that can be templated to provide custom endpoint resolution
      • Parameters: Parameters to be used in the BotLink Template
    • LinkShortener
      • Type: The link shortener type, currently ServisBOT squeeze is the only available type
      • Config: The configuration for the link shortener
  • Delivery
    • Type: The type of message delivery, currently SMS & EMAIL are the available options

SMS Delivery Example:

"Delivery": {
    "Type": "SMS",
    "Templates": [ // An array of possible SMS messages to send
      "message {{botlink}}", // One of these messages will be selected at random, with {{botlink}} replaced by a shortlink
      "{{botlink}} different message"
    ],
    "Config": {
      "SenderId": "Sender", // The sender ID to show on the SMS
      "OriginationNumber": "+18563228595" // The long code number for a message to always come from
    }
  }

Email Delivery Example:

  "Delivery": {
    "Type": "EMAIL",
    "Config": {
      "SenderId": "no-reply@servisbot.com"
    },
    "HTMLTemplates": [
      "<html><head></head><body><h1>HTML</h1><p>Thank you for choosing to interact with our Virtual Assistant. To begin, please click the link below. {{botlink}}</p></body></html>"
    ],
    "Subjects": [
      "Test Subject"
    ],
    "TextTemplates": [
      "Thank you for choosing to interact with our Virtual Assistant. To begin, please click the link below. {{botlink}}"
    ]
  }

FileProcessor

For FileProcessor configuration, use fileprocessor in your service specification

sb-cli pathway create --service fileprocessor file.json

FileProcessor Fields

{
    "AdditionalPath":"/Additional",
    "Delivery":{
        "Security":{
            "Type":"ApiKey",
            "Value":"KEY"
        },
        "Url":"https://url.com"
    },
    "ValidationWebhook":{
        "Url":"https://url.com",
        "Security":{
            "Type":"ApiKey",
            "Value":"KEY"
        },
        "AdapterMessage":{
            "OnFailure":"Failed to create processed document. To view your original uploaded document click [here]({{{documentUrl}}})",
            "OnSuccess":"A new processed document has been created. To view your processed document click [here]({{{documentUrl}}})"
        }
    },
    "ProcessingEnabled":false
}
  • AdditionalPath: The alias used to identify this pathway beyond a ‘default’ configuration. The pathway is specificed when calling the channel shift service to allow for different configurations.
  • Delivery
    • Url: A URL to notify when a file upload is completed
    • Security: The security confiugration on the delivery URL
  • ValidationWebhook
  • Url: A URL to validate the details of the upload
  • Security: The security confiugration on the validation URL
  • AdapterMessage: Custom messages to be sent
  • ProcessingEnabled: Turn on document processing. Passports and Driving licenses are currently supported