Type: Edgetier Worker
An edgetier worker will route a conversation to a live agent in edgetier. If messages come in while the chat is offline a message will be returned to the user “Sorry - our contact center is currently closed. Please try again later.”
Note: Edgetier workers cannot be interacted with directly by users, they must be transferred from a flow worker first.
Save this json to a file and create a worker using the cli command sb-cli worker create file.json
. Note to replace the values for Api, FormsId, LanguageId, and SetupId.
{
"Data": {
"QueueUpdates": true/false,
"SetupId": 1,
"LanguageId": "en",
"FormsId": 1,
"Api": "https://your.edgetier.com",
},
"Config": {},
"Description": "Worker that routes to livechat agents in edgetier",
"Enabled": true,
"Name": "EdgetierWorker",
"Type": "edgetier-worker"
}
If you want to change the default email address that comes across in the create chat. You need to set the email in context. What ever email
is set to in context will appear as the customers email and if no name is set, it defaults to the “noreply@servisbot.com”.
Setting in flow
Add a setContext node and set the email
to your desired value.
If you want to allow agents to request files during chats you will need to configure a SlashCommand in your worker configuration.
Pre-requisites: You will need an API Key and URL for our link shortener service ‘Squeeze’. Please contact ServisBOT to request this. Once you have them, put the API key in a Token Auth secret.
{
"Data": {
"SetupId": 1,
"Api": "https://your.edgetier.com",
"Language": "en",
"FormsId": 1,
"ShortLinkConfig": {
"Config": {
"Api": "squeeze-api-url",
"ApiKey": "srn:vault::engineering:secret:squeeze"
},
"Type": "Squeeze"
},
"SlashCommands": {
"/fileUpload": {
"actions": [
{
"type": "markup",
"value": "<TimelineMessage> <SecureFileUpload promptText='Could you post a picture of the front of your drivers license?' promptButtonText='Upload Picture' retryButtonText='Replace' confirmButtonText='Complete' confirmationText='All set!' interactionType='event' preventRetries='true' version='2'> <UploadItem fileType='image/*' name='drivers-license-front'/> </SecureFileUpload> </TimelineMessage>"
}
]
}
}
},
"Config": {},
"Description": "Worker that routes to livechat agents in edgetier",
"Enabled": true,
"Name": "EdgetierWorker",
"Type": "edgetier-worker"
}
This configuration will allow agents to use the command /fileUpload
to send the secure file upload markup to the user. The markup in the example is for a drivers-license-front
document. Please see the SecureFileUpload documentation for more information.
When the user has uploaded their document the agent will received a message like this:
We have received the following files for the user
drivers-license-front: url https://sbot.ly/vV56d9ys
The link will show the document that the user has uploaded. It is only valid for 2 minutes
The chat token for edgetier is available in context. if you want to use it in flow it will be in msg.payload.context.edgetier.chatToken
If you want the conversation with an agent to get summarized and potentially categorized by OpenAI after it finishes, you do so by including the SummaryConfig object in the EdgeTier worker configuration.
Pre-requisites: You will need an OpenAI secret configured for your organization to take advantage of this feature.
{
"Data": {
"SetupId": 1,
"Api": "https://your.edgetier.com",
"Language": "en",
"FormsId": 1,
"SummaryConfig": {
"SummaryEnabled": true,
"DispositionErrorCode": "ER01", // optional - the fallback disposition code for if OpenAI fails to categorize. defaults to NONE
"Dispositions": [ // optional - a list of disposition codes to categorize the conversation into
{
"Code": "411",
"Description": "Refunds"
},
{
"Code": "532",
"Description": "Replacements"
},
{
"Code": "22A",
"Description": "Complaints"
}
]
},
},
"Config": {},
"Description": "Worker that routes to livechat agents in edgetier",
"Enabled": true,
"Name": "EdgetierWorker",
"Type": "edgetier-worker"
}
Once confgured, whenever a live chat completes for the configured worker the result will be available in context under latestLiveChatDetails
, and will include a summary, an externalConversationId and potentially a dispositionCode if you provided dispositions.
{
"latestLiveChatDetails": {
"summary": "A summary of your recent conversation",
"dispositionCode": "22A",
"externalConversationId": "edgetier-token"
}
}