Dialogflow Workers

A Dialogflow worker takes user input and sends it to a Dialogflow bot for natural language processing. A Dialogflow worker can be created through the CLI or through the Add Resource button on a bot’s detail page.

Dialogflow CX workers cannot have their intents managed in ServisBOT yet.

Type: NLP Worker

Secrets

An Google Dialogflow agent access key is required in order to access Dialogflow.

Other Dialogflow fields

  • projectId: ProjectId of the agent to be used. See our Dialogflow bot tutorial for more information.
  • secret: Google Dialogflow agent access key.
  • syncResponsesToNLP: Takes the responses in your ServisBot Intent and syncs (where possible) the values to Dialogflow.
  • enableML: Turns on the ML feature for all intents in this bot in Dialogflow.

Creating Dialogflow worker through cli

Save this json to a file and create a worker using the cli command sb-cli worker create file.json

{
  "Data": {
    "NluConfiguration": {
      "Secret": "SRN:::HERE",
      "Language": "en",
      "ProjectId": "steve-343ss",
      "EnableML": true,
      "NluConfidenceThresholdOverride": 0.8
    },
    "NluType": "Dialogflow"
  },
  "Organization": "ORGANIZATION",
  "Config": {
    "Avatar": "default-bot"
  },
  "Enabled": true,
  "Updated": 1608652074324,
  "Description": "A Dialogflow worker",
  "Id": "4685b16c-a305-4b0c-b33d-8ae12b81ff9a",
  "Type": "nlp-worker",
  "Name": "DialogflowNlpWorker",
  "Created": 1608652074324,
  "Status": "published",
  "Srn": "srn:botnet:REGION:ORGANIZATION:worker:4685b16c-a305-4b0c-b33d-8ae12b81ff9a"
}


Once you have created the worker using the CLI, it will return an ID for you. You need to then update/create a bot and place the filter worker at the top with the id and the type of nlp-worker

Language support

If you have a language set inside the config of your worker we will sync any sb intents to dialog flow under that language code. If none is set we will default this to en (english). A list of language codes can be found here.