Category

How to Trigger an AI Agent in a Chat Workflow

Updated:

The Trigger AI Agent action enables chat workflows to use AI-powered analysis and decision-making. It provides conversation context and workflow-specific instructions to a selected AI Agent, then applies the generated response to subsequent workflow actions.
Depending on the configured response mappings, AI-generated values can be used to:

  • Update chat system fields or custom fields.
  • Add a private note or customer reply.
  • Store values in temporary fields.
  • Support conversation classification, summarization, prioritization, information extraction, routing, and other workflow decisions.

For example, when a conversation is transferred from an AI Agent to a human agent, the workflow can generate a concise summary and add it as a private note. The human agent can then continue assisting the customer without reviewing the complete conversation history.

Prerequisite

Before configuring the Trigger AI Agent action:

  • Create and publish the AI Agent that will process the request.
  • Ensure that your account has sufficient AI credits.
  • Determine what the AI Agent should analyze or generate.
  • Identify the chat system fields, custom fields, or temporary fields that should be provided as context.
  • Decide whether the complete conversation history is required.
  • Decide whether private notes should be included.
  • Determine how the response should be applied in the workflow.
  • Define at least one response mapping.

Every Response Key configured under Response Mapping must also be referenced in Additional Instructions. This ensures the AI Agent knows which values to generate and return for each configured key.

How the Trigger AI Agent Action Works

When a conversation reaches a Trigger AI Agent block:

  1. The workflow collects the configured conversation context.
  2. If enabled, the complete conversation history and private messages are included.
  3. The selected AI Agent processes the information by using:
    • The instructions configured in the AI Agent.
    • The workflow-specific Additional Instructions configured in the block.
  4. The AI Agent returns the requested response fields.
  5. The workflow applies the returned values according to the configured Response Mapping.
  6. The workflow continues to the next configured block.

The AI Agent can process textual conversation content, including the conversation messages, and selected field values. Attachments and uploaded documents are not included in the AI analysis.

Additional Instructions complement the instructions already configured in the selected AI Agent. They do not replace or override the AI Agent’s existing instructions. Use them to provide workflow-specific requirements, such as output keys, categorization rules, summary requirements, or escalation criteria.

When to Use Trigger AI Agent

Use the Trigger AI Agent action when you want to:

  • Analyse incoming customer conversations.
  • Automatically categorise customer requests.
  • Identify urgency or priority levels.
  • Extract information such as order numbers or account details.
  • Generate internal notes for agents.
  • Generate customer-facing replies.
  • Store AI-generated values in temporary fields.
  • Automate routing and workflow decisions.

How to Generate a Summary During an AI-to-Human Handoff

The following configuration uses the AI-to-human handoff example. In this scenario, a Conversation Summarization Agent analyses the complete conversation and adds the generated summary as a private note for the human agent.

Step 1. Open Workflows

  • Go to Admin → Chat → Automation → Chat Automation → Workflows.

  • Select the workflow trigger that should contain the Trigger AI Agent action, such as Transferred from AI to Agent.

    Open Workflow.png

Step 2. Create or Open a Workflow

  • Create: Click Add Workflow under the required trigger (Transferred from AI to Agent).

  • Edit: Open an existing workflow where you want to trigger an AI Agent.

    Create or Open a Workflow.png

Configure Workflow Details

In the Create New Workflow dialog:

  • Confirm the Trigger Type.

  • Enter a Workflow Name.

  • Select the required Brand and Source.

  • Optionally, add conditions under All or At Least One.

  • Click Next.

    Workflow details.png

The selected brand, source, and conditions determine which conversations the workflow processes.

Step 3. Build the Workflow Path

In the Workflow Designer, build the workflow path that should occur before the AI Agent processes the conversation.
For example, the handoff workflow can follow this sequence:

  • The customer interacts with the initial AI Agent.
  • The AI Agent collects the required customer information.
  • The conversation reaches the handoff path.
  • The Trigger AI Agent block generates a conversation summary.
  • The summary is stored as a private note.
  • The conversation is assigned or transferred to a human agent.
  • The human agent reviews the private note and continues the conversation.

Place the Trigger AI Agent action at the point where AI analysis should occur. For the handoff scenario, place it before the conversation is assigned or transferred to the human agent.

Step 4. Add the Trigger AI Agent Action

  • In the required workflow path, click Add Action.

  • Select Trigger AI Agent.

  • The Trigger AI Agent configuration dialog opens.

    Trigger AI Agent.png

Step 5. Configure the Trigger AI Agent

  • Block Name

    • Enter a descriptive name for the block.
    • For the example use case, enter: Generate Handoff Summary
  • Choose AI Agent

    • Select the AI Agent that will process the conversation.

The AI Agent must be available and published before it can be selected. If the configured AI Agent is later deleted or becomes unavailable during execution, the Trigger AI Agent block is skipped and the workflow continues.

  • Chat Context Fields
    • Select the chat fields to share with the AI Agent.
    • The latest customer message is included automatically.
    • Select only the fields required for the task.

For the handoff example, select: Requester Email ID. This helps the summarization AI Agent identify the customer when generating the handoff summary. Select only the fields that are relevant to the AI Agent’s task. Providing unrelated context can reduce the accuracy of the generated response.

  • Additional Instructions
    • Specify what the AI Agent should analyze.
    • Define the exact response keys and expected values.
    • Example:
Analyze and summarize the complete conversation between the AI Agent and
the customer.

Generate a concise but comprehensive summary that enables a human agent to
continue assisting the customer without reviewing the complete chat.

Include the customer's main request, relevant details already provided,
actions already taken, unresolved questions, and the expected next step.

Return the generated summary in the Add_Private_Note response field. 

Additional Instructions work together with the instructions configured in the selected AI Agent. They do not replace or override the AI Agent’s instructions.

  • Include Entire Chat Conversation
    • Enable this option when the AI Agent requires earlier messages for context. For the handoff summary example, enable this option because the AI Agent must analyze the full interaction before creating the summary.
    • Include Private Notes
      • Enable this option to also share private notes and internal comments with the AI Agent.
      • This option is available when Include Entire Chat Conversation is enabled.
      • Include private notes only when they are relevant to the AI Agent’s task.

Private notes can contain internal or sensitive information. Include them only when they are required for the AI Agent’s task.

  • Response Mapping

    • Map each response key to an action:
      • Update Chat Field: Updates a selected chat field.
      • Add Note or Reply: Adds a private note or customer reply.
      • Set Temp Field: Stores a value for later workflow steps.
    • Ensure each Response Key exactly matches the key returned by the AI Agent.
    • Select Add new action to add more mappings.

    For the handoff example, configure the mapping as follows:

    • Action: Add Note or Reply
    • Details: Add Private Note
    • Response Key: Add_Private_Note

This mapping instructs the workflow to take the value returned in Add_Private_Note and add it to the conversation as a private note.

  • Save the Block
    • Click Add to complete the configuration.

      Trigger AI Agent.png

This configuration reduces agent effort, improves handoff efficiency, and helps ensure that important customer information is retained in the conversation.

Test the block before publishing. Share only the conversation details and private notes required for the AI Agent’s task.

Step 6. Complete the Handoff Path

After adding the Trigger AI Agent block, add the action that assigns or transfers the conversation to the human agent or team.
The completed path should perform the following actions:

  1. Generate the conversation summary.
  2. Add the summary as a private note.
  3. Assign or transfer the conversation to a human agent.
  4. Allow the human agent to use the summary to continue assisting the customer.

Because the summary is created before the handoff, it is available when the human agent opens the conversation.

Step 7. Save and Activate the Workflow

After completing the configuration:

  • Review the workflow settings and response mappings.
  • Save the workflow.
  • Publish and activate the workflow.

When a conversation reaches the Trigger AI Agent block, the selected information is sent to the AI Agent, and the returned values are applied according to the configured response mappings.

Additional Common Use Cases

Trigger Use Case Description
Conversation Created Auto Priority Detection When a new conversation is created, AI analyzes the customer’s initial message and automatically determines the appropriate priority level. This helps support teams focus on critical issues first and reduces manual triage effort.
Conversation Status Changed (Closed) Closure Quality Check After a conversation is closed, AI reviews the entire interaction to verify that the issue was resolved and all required information was collected. If any gaps are identified, it can flag the conversation for review.
SLA Breached Escalation Recommendation When an SLA is breached, AI evaluates the conversation context, customer sentiment, and issue severity to determine whether escalation is required. The workflow can then automatically notify a supervisor or specialized team.
Conversation Status Changed (On Hold) Pending Conversation Review When a conversation is moved to On Hold, AI analyzes the latest discussion and identifies any missing information required from the customer. A summary note can be added to help agents quickly understand why the conversation is awaiting action.
Conversation Reopened Reopen Reason Analysis When a customer reopens a previously closed conversation, AI analyzes the latest message to determine why the issue resurfaced. It can categorize the reason as unresolved issue, new issue, clarification request, or follow-up requirement and route it appropriately.

Important Considerations and Edge Cases

Deleting the Trigger AI Agent Block

Removing the Trigger AI Agent block deletes its AI configuration, context selection, additional instructions, and response mappings from the workflow.

Deleting a Mapped Field

If a chat field, custom field, or temporary field used in AI response mapping is deleted, the corresponding mapping becomes invalid. The workflow author must update the mapping before saving the workflow.

Deleting the Selected AI Agent

If the configured AI Agent is deleted or becomes unavailable:

  • The block is skipped during execution.
  • The workflow author must select a valid AI Agent before the workflow can be published or executed successfully.

AI Service Failures

If the AI service:

  • Is unavailable,
  • Experiences a timeout,
  • Returns an invalid response, or
  • Encounters processing errors,

then:

  • No applicable AI mappings are performed.
  • Workflow execution continues without interruption.
  • Failure details are recorded for troubleshooting and auditing.

Empty or Invalid AI Responses

Empty responses, malformed JSON, or responses that do not match the expected structure are ignored. The workflow proceeds to the next block without applying invalid values.

Concurrent Workflow Executions

Multiple workflow executions can invoke the same AI Agent simultaneously. Each execution processes its own conversation independently and applies mappings only to its associated workflow instance.

Troubleshooting

The AI Agent Is Not Available in the Dropdown

Verify that the AI Agent has been created and published.

The Conversation Property Is Not Updated

  • Confirm that AI Response Mapping is configured correctly.
  • Confirm that the selected action supports the returned value.
  • Verify that the AI returned a value compatible with the mapped field.

The AI Output Is Not Accurate

  • Review the selected Chat Context Fields and remove unrelated context.
  • Update Additional Instructions to make the AI Agent’s task more specific.
  • Include the complete conversation history when additional context is required.

Frequently Asked Questions

  1. What information is sent to the AI Agent?
    By default, the latest customer message and selected chat context fields are sent to the AI Agent. If Include Entire Chat Conversation is enabled, the complete conversation history is also included.

  2. Is selecting an AI Agent required?
    Yes. You must select an AI Agent before the Trigger AI Agent action can be saved.

  3. Are Chat Context Fields required?
    Yes. Chat Context Fields provide additional information that helps the AI Agent analyze the conversation accurately.

  4. What are Additional Instructions used for?
    Additional Instructions tell the AI Agent what to analyze, what decisions to make, and what information to return.

  5. What is a Response Key?
    A Response Key is a unique identifier that connects a value returned by the AI Agent to a workflow action.

  6. Can I configure multiple response actions?
    Yes. You can add multiple response mappings, each with its own Response Key.

Related Articles

  1. Understanding Workflow Action Blocks
  2. How to Create and Manage Chat Workflows in BoldDesk
Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied
Access denied
Access denied

No articles or sections found
No articles or sections found