For the complete documentation index, see llms.txt. This page is also available as Markdown.

Complaint Agent

The Complaint Agent is designed to streamline how customer complaints are handled.

The Complaint Agent is a prebuilt solution provided by Emporix as part of the Agents Library. Like other prebuilt agents, it runs in the background and integrates into existing business workflows. It steps in when needed, reducing the need for manual intervention in complaint management.

Purpose

The Complaint Agent aims to solve common business challenges immediately related to customer complaints. By automating aspects of complaint handling, it helps to reduce manual work and workflows, thereby saving time and contributing to a more efficient and customer-friendly operation.

Key benefits

Enabling the Complaint Agent offers several benefits.

Benefit
Description

Streamlined complaint management

It is specifically designed to make the process of handling customer complaints more efficient.

Reduced manual work

It helps reduce the manual effort required from your team, freeing them to focus on other areas.

Increased efficiency

The agent contributes to a more efficient operation by handling routine tasks automatically.

Enhanced customer experience

It helps merchants deliver a more customer-friendly operation.

Immediate solution

As a prebuilt agent, it provides a ready-to-use solution to address complaint management challenges promptly.

Scalability

It enables businesses to scale operations without adding complexity to their complaint handling processes.

How it works

The Complaint Agent template creates three collaborating generic agent instances:

Instance
Role

Complaint Categorization

Analyzes the complaint source and assigns a category.

Complaint Agent

Applies the category rules, runs automatic actions, and, when human collaboration is required, starts collaboration and assigns the Support Agent to the channel.

Complaint Audit

Persists records of each complaint case in the COMPLAINT_AGENT_CONTEXT with all the relevant details. If collaboration is started, it also creates the SUPPORT_AGENT_CONTEXT.

These instances collaborate with each other as a team. You trigger the complaint flow by API calls, typically as part of a value stream in your own environment.

Triggers

Trigger the Complaint Agent flow, for example, when:

  • an email arrives in the customer support inbox

  • a support ticket is created in Jira or Zendesk, or other tool

  • a new customer issue is detected by another tool or workflow you integrate with

You have full freedom to integrate the Complaint Agent into your existing processes and tools.

Custom entities

Upon the installation, the Complaint Agent template automatically creates two custom entity types with corresponding mixin schemas defined:

  • Complaint Agent Context

  • Support Agent Context

Custom Entities

For more information about custom entities, see the Custom Entities.

For more information about mixin schemas, see the Mixin Schemas.

Whenever the Complaint Agent flow comes into action, the instances of these entities are created and stored in the system for monitoring purposes.

Complaint Agent Context

Each time a Complaint Agent flow is triggered in any of your workflows, for example in a value stream, the Complaint Audit records this event in a created instance of the Complaint Agent Context. Thanks to that, you are able to check when and how the agent was invoked, and what was the undertaken activity. The Complaint Agent Context stores the following information about complaints:

  • Action Input - The source of the incoming complaint, for example, email content.

  • Action Summary - The action generated by the agent.

  • Automatic Action - The indicator whether the action was automatically resolved by the agent or required some collaboration from other agents or humans in the loop.

  • Category - The categorization of the complaint. The agent analyzes the information included in the complaint source and assigns a specific category according to the prompt in the agent definition.

Complaint Agent Context

Support Agent Context

If the Complaint Agent flow requires human collaboration, Complaint Audit creates a Support Agent Context instance and stores it in the Custom Instances. The Support Agent Context keeps the following information:

  • Collaboration tool used

  • Slack or MS Teams Channel ID created for the complaint case

  • Conversation history

  • Invited participants

Support Agent Context

Contact Info mixin

Additionally, installing the Complaint Agent adds the Contact Info mixin to the Company entity. This mixin stores information about the contacts within a company.

The Complaint Agent uses the details from the Contact Info mixin to invite company contacts as participants to a collaboration channel. Invitation depends on the attached communication tool and its Allowed operations.

Company Contact Info

Agent configuration

The Complaint Agent offers flexibility in the way how the customer complaints are handled. You can define automatic actions that the agent is able to handle by itself. For more complex use cases that require involving human interactions through the communication tool (Slack, MS Teams), you can define semi-automatic agent actions.

User Prompt

The User Prompt is editable. The default prompt defines the following behavior for the Complaint Agent:

Default User Prompt for Complaint Agent

When creating an agent from the Complaint Agent template, configure the agent by adjusting the rules for the agent's behavior in the User Prompt field.

Using the prompt <rules>, define the expected categories of the complaints that might occur and specify the corresponding agent's actions for each category. For instance, you can add new complaint categories, disable automatic actions (such as invoice resending), or even extend the custom entities with new fields.

Categories

The categories define the agent's responses to certain triggers. The category recognition is first handled by Complaint Categorization subagent in the complaint source. Based on the result, the agent undertakes a specific action as defined for a particular category.

The predefined categories:

  • Missing Invoice – The agent automatically resends the invoice using the send-invoice tool. The invoice is sent to the email address associated with the order, not to the sender’s email. Then, the complaint if handed over to the Complaint Audit subagent to record the complaint case.

  • Incorrect Invoice / Delivery Too Late / Product Damaged – These categories follow the same escalation flow:

    1. Retrieve order, legal entity, and customer details.

    2. Start collaboration: create a channel, invite participants from company Contact Info, and post a case message.

    3. If collaboration is in place, assign the Support Agent to the channel.

    4. Hand off to Complaint Audit to persist the Complaint Agent Context and, because collaboration started, the Support Agent Context.

    5. Participants communicate with the Support Agent in the created channel.

  • Other Complaints – The agent takes no action. This prevents unnecessary collaboration or automation for unrelated emails. The complaint goes to the Complaint Audit to record the complaint case.

Use the predefined categories as a starting point to configure your Complaint Agent to your needs.

Scopes

Select the scopes required to trigger the agent. If you want the agent to be triggered by your existing ticketing system, use the Integration scope.

AI Tools

The Complaint Agent flow requires the connection to the Slack AI Tool or MS Teams AI Tool when human collaboration is needed. First, create the communication tool bot in the Agentic AI -> AI Tools.

For more information on how to create a bot, see the Communication Tools.

Once the communication tool is ready, establish the connection with the bot by selecting the right AI communication tool in the Native Tools. Channel creation depends on the tool's Allowed operations.

Adding native communication tool and scoping capabilities

This way, the Complaint Agent can hand off to the Support Agent, which acts directly within the Slack workspace or MS Teams team.

The capabilities of the Complaint Agent require MCP server tools. Upon creation, the agent is equipped with the tools for Customer and Order entities management.

Default toolset for Complaint Agent:

Tool
Capabilities

Customer MCP Tools

get-customer

Retrieves customer details.

get-legal-entity

Fetches details of a specific legal entity.

Order MCP Tools

get-order

Retrieves a specific order.

get-orders

Lists all orders.

send-invoice

Resends an invoice.

Default toolset for Complaint Categorization:

Tool
Capabilities

Frontend MCP Tools

get-customer-orders

Retrieves customer orders made on the storefront by a customer.

get-returns

Fetches returns.

Order MCP Tools

get-customer-orders

Retrieves orders assigned to a customer.

get-order

Retrieves a specific order.

get-orders

Lists all orders.

get-return

Retrieves details of a return.

get-returns

Fetches returns.

Default toolset for Complaint Audit:

Tool
Capabilities

Extensibility MCP

upsert-custom-type-instance

Required for handling custom entities and collaboration contexts.

Extend or limit the tools according to your needs in the Tools tab. Add or remove the tools from the list.

Collaboration

The Complaint Agent template instances (Complaint Audit, Complaint Categorization, and Complaint Agent) are predefined to collaborate with each other. When human involvement is required, the Complaint Agent fetches the required data, starts collaboration (creates the channel, invites participants, and posts a message), and assigns the Support Agent to the channel. Complaint Audit then persists the Complaint Agent Context and, if collaboration was started, the Support Agent Context. Participants use the channel to communicate with the Support Agent. You can attach additional agents when configuring your Complaint Agent instances to extend the team for different cases.

All Agents operations are tracked in the AI Logs view. You can check the details of the requests, jobs, and sessions for monitoring and evaluation purposes. For more information, see the AI Logs.

Last updated

Was this helpful?