Retrieve the conversation summary and wrap-up code that Virtual Agent generates for a bot interaction

Every time a Virtual Agent bot transfers an interaction to a human agent, it creates an AI-generated summary for the agent so the agent can understand the context of the interaction and identify the core customer issue more quickly. When a Virtual Agent bot autonomously handles a customer interaction without agent escalation, it also automatically generates the conversation summary and applies a wrap-up code to the completed bot interaction.

To retrieve the conversation summary and the auto-assigned wrap-up code via the Genesys Cloud Public API, you can invoke the /api/v2/conversations/{conversationId}/summaries endpoint based on the conversationId.

To retrieve the conversation summary and wrap-up code as after contact work (ACW) data and send that data to Salesforce or another customer relationship management (CRM) system, complete the following steps:

Set up a workflow

  1. From the Architect home page, click or hover over the Flows menu and select Workflow.
  2. Click  Add. The Create Flow dialog box opens.
  3. In the Name field, enter a unique name for the flow.
  4. (Optional) In the Description field, add a short sentence or phrase to describe this flow.
  5. Click the Default Language list and select the flow’s default supported language.
  6. Click the Divisions list and select the division in which to place the flow.
  7. Click Create Flow. The flow’s configuration page opens.
  8. Under Resources, click Data.
  9. As Genesys Cloud sends the input parameters to the workflow as a JSON object, under Add variable, configure an input variable named jsonData of type JSON.
    Note: The input parameters include the conversation summary, the reason for contact, resolution, wrap-up codes, contact ID, and so on.
  10. From the task editor Toolbox, expand the Data category and drag an Update Data action below Start in the state editor.
  11. In the Name field, add a meaningful name to describe the item.
  12. Click next to Update Statements and select JSON.
  13. In the Enter variable name field, type the label to identify the variable on tasks. For example, Flow.jsonsummary.
  14. In the Value To Assign field, click Expression Modes  next to Click to add a JSON literal value.
  15. To get the conversation summary, add the expression GetJsonObjectProperty(Flow.jsonData, "summary") inline or click the Large Expression Editor button to open the Edit Expression Editor and build your expression.
  16. Click next to Update Statements and select JSON.
  17. In the Enter variable name field, type the label to identify the variable on tasks. For example, Flow.jsonwrapupcode.
  18. In the Value To Assign field, click Expression Modes  next to Click to add a JSON literal value.
  19. To get the wrap-up codes, add the expression GetJsonObjectProperty(Flow.jsonData, "wrapUpCodes") inline or click the Large Expression Editor button to open the Edit Expression Editor and build your expression.

    After these steps, continue to customize your workflow according to your organization’s business needs. For example, if you have previously set up a Salesforce Data action under Admin > Integrations > Actions to push data to your Salesforce APIs, configure a Call Data action in your workflow to push the data you retrieved earlier.

    Set up a trigger

    1. Click Admin.
    2. Under Architect, click Triggers.
    3. Click Add Trigger.
    4. Enter a name and description for the trigger, and then click Add.
    5. Under Topic Name, select the v2.bot.conversation.{id}.conversations.summaries topic.
    6. Under Workflow Target, select the workflow that you have set up for the data retrieval.
    7. Under Data Format, select Json as the data format in which the input parameters route to your workflow.
    8. (Optional) You can specify the conditions that must be met to invoke the trigger. For example, if you want Architect to trigger the workflow only when a specific Virtual Agent flow runs. To add a condition, click Add Condition.
      1. Under JSON Path, enter the attribute of the event schema that you want to compare. For example, triggerSource if you want to compare the flow id of the flow that generated a summary to the id of the specific Virtual Agent flow.
      2. Under Operator, select an operator for comparing the JSON Path with the user-defined values. For example, Equals (==) if you want the flow id to match.
      3. Under Value, enter the values according to the type of operator you selected. For example, add
        {
        "sourceId": "03d578c6-69dd-49dd-8331-a6d1e9303640",
        "sourceType": "FLOW"
    9. Select the timing configuration for the trigger.
    10. Click Create.
    11. To activate the trigger, switch the toggle to Active.
    12. Click Save.