See related
No related articles

Start a conversational assistant on an open chat

Last Update: Oct 2024 • Est. Read Time: 6 MIN
To check plan availability, see the pricing page.

Conversational assistants are a powerful tool that promote customer self-service, boost agent productivity, and speed up response times.

On rare occasion, a chat customer might experience a network issue or reach out using an outdated link which could cause the conversational assistant to be skipped. In this article, we'll discuss how to set up a workflow automation that allows agents to apply a tag to a conversation to retroactively start an assistant. This will allow conversations under these circumstances to be given the same support experience as normal chat messages.

Who can access this feature?
User typesAdmins and users with permissions to access workflows.


In this article

Prerequisites

Before following this guide, you should already be comfortable with the basics of using workflows. Workflows overview

We also recommend being familiar with creating and using conversational assistants.

For this process, you must have already created the conversational assistant, which you will modify during this guide.

Copy the assistant ID

First, you'll use the Kustomer settings to find the conversational assistant's public ID.

To locate the assistant ID:

  1. Go to Settings and select Kustomer IQ > Conversational Assistants.
  2. Locate the desired assistant.
  3. Select to copy the assistant ID to your clipboard.
  4. Save the assistant public ID to a secure location so you can access it later in this guide.

Copy the tag ID

Next, you'll find the ID for the tag you want to use to trigger the workflow. Agents will add this tag to a conversation to start the assistant, so we recommend setting up a tag with an easily understood name like Launch Assistant.

To locate the tag ID:

  1. Go to Settings and select Workspace > Tags.
  2. Locate the desired tag and select Edit .
  3. Look at the URL in your browser's address bar. The tag ID is the alphanumeric code after /tags/edit/.
  4. Copy the tag’s ID from the end of the URL, and save it to a secure location so you can access it later in this guide.

Create the workflow

Then, create the workflow using the provided template, which should set up most of the automation.

To create the workflow:

  1. Go to Settings and select Platform > Workflows.
  2. Select Add Workflow.
  3. Select Custom Workflow.
  4. Fill out the Name and Description of this workflow. We always recommend as a best practice that you use clear and illustrative names and descriptions, so that it's easy to know what function this automation performs if another member of your team reviews this rule at a later date.
  5. Leave Callable Workflow off and then select Create.
  6. Open the Workflow Options menu in the toolbar and select Edit Workflow JSON.
  7. A modal appears where you can edit the code for this workflow. Select and delete all the current JSON code.
  8. Copy the code block below and paste it into the JSON text field in your Workflow Editor.
  9. Then, select Update to save the changes to the workflow and dismiss the JSON editor.
{
  "description": "",
  "name": "launch-assistant",
  "steps": [
    {
      "transitions": [],
      "errorCases": [],
      "id": "UN5BKgSYD",
      "action": "kustomer.assistant.launch",
      "params": {
        "publicId": "",
        "messageId": "/#steps.1.lastMessageIn.id",
        "conversationId": "/#steps.1.id"
      },
      "appVersion": "kustomer-^1.9.2"
    },
    {
      "transitions": [
        {
          "target": "QEt_FXrHX",
          "condition": {
            "op": "and",
            "values": [
              {
                "op": "eq",
                "values": [
                  "/#steps.1.lastMessageDirection",
                  "in"
                ]
              },
              {
                "op": "eq",
                "values": [
                  "/#steps.1.messageCount",
                  "1"
                ]
              }
            ]
          },
          "meta": {
            "name": "Initial-Inbound Message"
          }
        }
      ],
      "errorCases": [],
      "id": "LiLssS9QM"
    },
    {
      "transitions": [
        {
          "target": "UN5BKgSYD",
          "condition": {
            "op": "contains",
            "values": [
              "/#steps.1.changes.attributes.tags.after",
              ""
            ]
          },
          "meta": {
            "name": "Tag added"
          }
        }
      ],
      "errorCases": [],
      "id": "QEt_FXrHX"
    }
  ],
  "trigger": {
    "transitions": [
      {
        "target": "LiLssS9QM",
        "condition": {
          "op": "contains",
          "values": [
            "/#steps.1.channels",
            "chat"
          ]
        },
        "meta": {
          "name": "Continue if chat"
        }
      }
    ],
    "eventName": "kustomer.conversation.update",
    "id": "1",
    "appVersion": "kustomer-^1.9.2"
  }
}

Customize the workflow

As the last step, you will customize the workflow created from the JSON template.

To customize the workflow:

  1. In the conditional step Tag added, add the tag ID you found earlier as the condition value.
  2. In action step 4 Assistant Launch, add the assistant public ID you found earlier in the PublicId (string) field.
  3. Save your workflow and turn it on.

Agents will now be able to add the conversation tag Launch Assistant to any chat with no assistant containing 1 inbound message from a customer. This will launch the conversational assistant and allow the customer to go through the standard prompts in that assistant.