How to add a custom button to response documents in the KB chat?

Tabla de contenidos

Athento allows adding 2 types of buttons to the quick actions bar in the document view:

  • Link type: so that when clicking the user is redirected to a specific link
  • Button type: to execute an operation

These buttons are added and configured from advanced administration, in Action Buttons.

Screenshot 2024-07-28 at 16.23.17.png

Create a new Action Button using the Add Action Button option.

 

Next, you must configure the following options:

  • Target content type: Select the value “knowledge_base | knowledge base”.
  • Target object id: The id of the knowledge base in which you want these buttons to appear per document.
  • Label: The help text that appears when hovering the mouse over the button.
  • Style: (in json format) The custom icon that we want this button to have :

    • icon: icon that we want to appear.
{"icon" : "fal fa-star"}
  • Place: The place where the button will appear. You must select “KB – Document knowledge base actions”.
  • Operations: The operations that will be executed when pressing the button(if it is of type button).
  • Type: Select the type of button we want in the document view.

    • button: Executes the selected operations
    • link: Adds the link that we want to redirect to when clicking
  • Params: In case it is a Link-type button, the URL must be added here in JSON format.

In addition, the KB prompt must include the information that each <a> tag with an “id” attribute that has the document UUID, a name attribute with the value “kb-document-link”,  and an “href” attribute with the document URL, for example like this:

I am going to provide you with a list of documents with content, metadata and link. I need you to answer the question with as much information as you can deduce about these documents and a link to the document where you found the information using the URL given. Each <a> has to have documents UUID as “id” attribute, “kb-document-link” as “name” attribute, and URL as “href” attribute: