Buttons in the chat

Content


Using the buttons in the widget chat, you can send the information you need to the client. By clicking on the button, the client can:
  • follow the link;
  • consistently select the topics of your message — for this, the button must activate the rule that will send the next pool of buttons. Depending on the selected buttons, you can, for example, configure the assignment of a ticket to a specific agent or group;
  • get the necessary information — for this, the button must activate a trigger that will send the specified text;
  • get a form to fill in the data — to do this, the text of the button must activate a trigger that will send a message with the form.
The buttons help automate part of the correspondence or even the entire dialog.

The button code can be added to any outgoing message — it can be inserted in the greeting message of a widget, in triggers, the usual response of the agent, macroses. You can send the client one button or several at once.


Creating buttons

To create a button, use this constructor:

text {{button:button name;link;link type;visibility}}


Parameters that can be passed:
  • text — any text that will be displayed before the button;
  • button name — the only required parameter — the text that will be displayed on the button;
  • link — a link that will open when you click on the button (if necessary);
  • link type — specify blank to open the link in a new tab or self (used by default) to open the link in the same tab;
  • visibility — specify noshow so that the text of the button name is cut from the block of text before the button, or specify show (used by default) so that nothing changes.
This is how the buttons will look in the widget:



And this is how these buttons look in text form:


Important! When creating a button, you can not use optional parameters, and then semicolons between them are also not needed. But if you want to pass the last parameter «visibility» without using the parameters «link» and «link type», you will need to put all semicolons — like this:

text {{button:button_name;;;visibility}}


Imagine a row of windows in a house. There may or may not be a person in each window, but the window frames remain unchanged. That is, we kind of «cut out» the parameters we don't need, and left semicolons between them.


Examples of buttons

All these button options will work correctly:

Text {{button:button name;https://usedesk.com;blank;show}}
Text {{button:button name;https://usedesk.com;blank}}
Text {{button:button name;https://usedesk.com}}
Text {{button:button name}}
{{button:button name}}
{{button:button name;;;noshow}}


We have a test widget — here you can see how the buttons are configured in it, and click on them.