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. Desde la página de inicio de Architect, haga clic o coloque el cursor sobre el Flujos menú y seleccione Flujo de trabajo.
  2. Hacer clic Agregar. Se abre el cuadro de diálogo Crear flujo.
  3. En el Nombre campo, ingrese un nombre único para el flujo.
  4. (Opcional) En el Descripción campo, agregue una oración o frase corta para describir este flujo.
  5. Haga clic en el Idioma predeterminado lista y seleccione el idioma admitido predeterminado del flujo.
  6. Haga clic en el Divisiones lista y seleccione la división en la que colocar el flujo.
  7. Hacer clic Crear flujo. Se abre la página de configuración del flujo.
  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. En el Nombre campo, agregue un nombre significativo para describir el elemento.
  12. Haga clic en junto a Update Statements y seleccione 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. Haga clic en junto a Update Statements y seleccione 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. Hacer clic Administración.
    2. En Architect, haga clic en Triggers.
    3. Haga clic en Add Trigger.
    4. Introduzca un nombre y una descripción para el activador y, a continuación, haga clic en Añadir.
    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. Hacer clic Ahorrar.