Chapters

Chapter 5

Content and data

Connect the bot to your systems and documents, and prepare its content for every language you serve.

API connections

A connection stores the base URL and credentials for one external service. Connections belong to the workspace, so every bot can use them, and credentials are never copied into a bot.

  1. Open Global settings → API connections.
  2. Select Add connection.
  3. Enter the name, base URL, and authentication details, then save.
Note

Connections are managed by API Integrators and Administrators. Other roles do not see Global settings.

Workspace API connections.
Figure 12. Workspace API connections.

API library

Define each request once in the bot’s APIs section, then pick it in any API Call step. Changing a saved API updates every step that uses it.

  1. Open APIs in the bot menu and select New API.
  2. Enter a name, choose a folder, and choose the connection.
  3. Set the method, the path and query, the timeout, and, if needed, the request body and headers. Use Insert variable to add conversation values.
  4. Test the API with sample values. Check the status and the shape of the response.
  5. In the flow, add an API Call step, select the saved API, and connect both its Success and Failure branches.
Note

Creating, changing, and testing saved APIs needs the API Integrator or Administrator role. Bot Designers can open the library and use any saved API in an API Call step, but cannot change it. An assistant proposal that adds or changes an API is also refused for a Bot Designer.

The API library with a saved request open.
Figure 13. The API library with a saved request open.

Scripts

A script transforms data inside a flow, for example picking one value out of an API response. Open Scripts in the bot menu, select New script, and write JavaScript in the editor. Then use it in a Run Script step.

The script library with the editor and test panel.
Figure 14. The script library with the editor and test panel.

Knowledge sources

Knowledge sources are the documents the bot answers from in a Knowledge step.

  1. Open Knowledge in the bot menu and select Add source.
  2. Upload a document or paste text, and give it a clear title.
  3. Wait until the source shows as ready.
Knowledge sources for a sample bot.
Figure 15. Knowledge sources for a sample bot.

Translations

The Translations section lists every customer-facing text in the bot. The source language stays the text you see in the designer.

  1. Select Add language and choose the language.
  2. Enter the translation beside each source text. Use the search box, or the Missing and Needs review filters, to find what is left.
  3. Keep every {{variable}} placeholder unchanged in the translation.
Translations, before a second language is added.
Figure 16. Translations, before a second language is added.