Actions tell your assistant what to do when it retrieves a specific knowledge base topic. They can send SMS messages, run custom functions, or transfer users to a live agent.

What are actions?

Actions expand your assistant’s capabilities, allowing it to:

  • Send SMS messages: Share confirmations, links, or follow-up details.
  • Run custom functions: Perform advanced tasks like fetching real-time data or interacting with external systems.
  • Trigger handoffs: Seamlessly connect users to live agents for complex issues.

Actions make your assistant dynamic and better equipped to handle real-world scenarios.

Adding actions to the knowledge base

How to add actions

Actions are configured in the Actions field of a knowledge base topic. You can add them in three ways:

  1. Type /: Opens a command palette to select the desired action.
  2. Right-click: Shows a menu of available actions.
  3. Click the + icon: Use the dropdown menu to add an action like sending SMS, invoking a function, or triggering a handoff.

Example: Adding an SMS action

  1. Open a topic in the knowledge base (e.g., Store Hours).
  2. Go to the Actions field and type /send-sms.
  3. Choose the SMS template (e.g., StoreHoursTemplate).
  4. Configure the trigger to send the SMS when the topic is matched.

Common actions and use cases

Sending SMS

Use SMS actions to share essential details directly with users.

Example: A user asks for refund instructions. The assistant sends an SMS with a link to the refund portal.

Configuration:

  • Action: Send SMS
  • Trigger: User queries refund process
  • SMS Template: RefundPolicyTemplate

Learn more: How to send SMS

Invoking functions

Functions allow the assistant to perform advanced tasks, such as retrieving external data or performing calculations.

Example: A user asks for the weather forecast. The assistant runs a function to fetch the current weather details.

Configuration:

  • Action: Invoke Function
  • Function: getWeatherForecast
  • Trigger: User queries weather details

Learn more: How to invoke functions

Triggering handoffs

Use handoff actions to transfer users to live agents when they need human support.

Example: A user mentions a billing dispute. The assistant connects them to the billing department.

Configuration:

  • Action: Trigger Handoff
  • Destination: Billing Queue
  • Trigger: User mentions billing

Learn more: How to trigger handoffs

Best practices for actions

  1. Use precise triggers

    • Clearly define conditions for actions to avoid false triggers.
    • Example: Use specific phrases like User mentions refund instead of broad keywords.
  2. Write concise SMS templates

    • Keep messages short, professional, and easy to understand.
    • Example: “Your refund request is being processed. Visit [this link] for details.”
  3. Test custom functions thoroughly

    • Validate function performance across different user scenarios.
    • Add fallback actions to handle potential errors.
  4. Plan handoff workflows

    • Use polite, clear messages to inform users before transferring them.
    • Example: “Let me connect you to a billing specialist who can help further.”
  5. Combine actions for complex workflows

    • Chain multiple actions for advanced tasks.
    • Example: Fetch booking details using a function and send the information via SMS.

FAQs

Can I add multiple actions to one topic?

Yes, you can configure multiple actions under the same topic. For example, you can send an SMS and invoke a function in response to a single query.

What happens if an action fails?

Set up fallback actions, like redirecting to a global topic or retrying with a different template.

Do I need coding experience to add actions?

No, most actions can be configured using dropdown menus and predefined templates.

For further guidance, visit:

Need help? Check out our support guide and FAQ, or contact the support team.