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.
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
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 tooMessageStrings
: A object of custom keyed strings that can be used if combined with Amazon ConnectBotLink
: Availble variable in the delivery templates
Target
Template
: A string that can be templated to provide custom endpoint resolutionParameters
: Parameters to be used in the BotLink TemplateLinkShortener
Type
: The link shortener type, currently ServisBOT squeeze is the only available typeConfig
: The configuration for the link shortenerDelivery
Type
: The type of message delivery, currently SMS & EMAIL are the available optionsSMS 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}}"
]
}
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,
"Version": 2,
"AllowedMimeTypes": [
"image/gif",
"image/jpg",
"image/jpeg"
]
}
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 completedSecurity
: The security confiugration on the delivery URLValidationWebhook
Url
: A URL to validate the details of the uploadSecurity
: The security confiugration on the validation URLAdapterMessage
: Custom messages to be sentProcessingEnabled
: Turn on document processing. Passports and Driving licenses are currently supportedAllowedMimeTypes
: An optional array of mime types to allow. If present, the document will fail unless it is of a type in included in the array.