Skip to main content

Context filtering in Genesys Agent Copilot

Genesys Agent Copilot can use the context to filter the knowledge it surfaces during conversations. It processes contextual data from active intents and conversation custom attributes.

Administrators can create custom context attributes that automatically filter the knowledge articles Agent Copilot presents to agents. Agent Copilot extracts context source values during conversation from conversation attributes and active intent. Active intent is always part of the context after you define the intents.

To use context filtering, you must perform the following setup steps.

  1. Define conversation schemas. These schemas determine the data structure and type. For more information, see .
    Note: Agent Copilot only supports string attributes.
  2. Update conversation attributes through the API. During the conversation, you can update the conversation attributes through the following APIs.
    • PATCH /api/v2/conversations/{conversationId}/customattributes
    • PUT /api/v2/conversations/{conversationId}/customattributes
  3. Configure data actions. Data actions provide a way to interact with runtime data through the Genesys Cloud Platform API. For more information, see .
    1. In the HTTP Method list, select PUT.
    2. In the Request URL Template field, enter /api/v2/conversations/{conversationId}/customattributes.
    3. In the Execution Timeout field, enter the value 60.
    4. In the Request Body Template field, enter the following variables:
      • id: an arbitrary UUID
      • organizationId
      • schemaId
      • product (from Architect or Scripter)
      • brand (from Architect or Scripter)
  4. Set conversation custom attributes using an Architect flow, using the data action created in the previous step. For more information, see .
  5. Set up data actions in Scripter. For more information, see .
    When the script page loads, you need a data action to query the conversation attribute API. The API is GET /api/v2/conversations/{conversationId}/customattributes. When the initial state query is complete, then you must wire the value to a variable or input field.
    You can change the initial value through an input field or a drop-down, and connect the data that updates the conversation attribute when a change occurs.
  6. Configure knowledge articles and labels. For more information, see and .
  7. Set up context and add context filters to the knowledge base for Agent Copilot. For more information, see .