Edgetier Worker

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.

Creating an edgetier worker through cli

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": {
    "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"
}

Setting the customers email

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.

Secure File Upload Request

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