Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Koji is polite, so all users get a welcome message when they open the chatbot. You can edit this message to make it match your organization’s style.

Editing modes

There are 2 modes of editing a message: plain text and HTML.

  • If you plan to add images, switch to the HTML mode.

  • If you want to keep a message rather simple, stick to the plain mode.

Buttons

You can enrich messages with buttons. When adding a button, you must type the button’s label, specify the action the button should perform, and its modifier.

Basically, this is the structure of a button:

%(<button label>|<message that is sent to the server>)<modifier>

Thus, a typical button looks like this:

%(<Chat help>|<#help>)b

Label

Label is the button’s text.

Action

The button’s purpose. What’s going to happen when a user clicks it?

Modifier

Modifiers define a button’s behavior and how it is displayed. There are 3 modifiers:

  • b for inline buttons that are displayed in the message itself.

  • ra for required actions that are displayed in column. They are called required, because a user cannot skip these buttons and must select one. The bot expects a user to select one option, but a user can type something similar as well.

  • sa for suggested actions that are displayed in a row. These options are pre-built, so you cannot edit them. Users can skip suggested actions.

Personalizing

You can make welcome messages personalized by using keys. When a key is used, Koji replaces it with the actual value, making a message more vivid. For instance, a username key is replaced with the person’s name. Simple and effective.

To use a key in the message, use the following syntax: %(<username>)s

For example, to give someone a nice welcome, use the message of the following kind:

Hello, %(firstname)s! Hope you are doing fine today!

Keys that you can use:

  • username

  • firstname

  • surname

  • channel

  • lang

  • No labels