Legacy Dev Forum Posts

 View Only

Sign Up

Get Transcription data under single output contract

  • 1.  Get Transcription data under single output contract

    Posted 06-05-2025 18:29

    adesh.jadhav | 2023-12-28 22:55:09 UTC | #1

    Hello Team,

    Greeting !!

    I'm quite new to Genesys and am attempting to fetch transcription URL data using the web service data action. I just want to retrieve all transcript data under the VoiceTranscript contract. I'm not sure about the syntax to use to concatenate this data.

    Response:

    {
      "translationMap": {
        "var_VoiceTranscript": "$.transcripts[2].phrases[0].text",
        "var_VoiceTranscript1": "$.transcripts[2].phrases[1].text",
        "var_VoiceTranscript2": "$.transcripts[2].phrases[2].text",
        "var_VoiceTranscript3": "$.transcripts[2].phrases[3].text",
        "var_VoiceTranscript4": "$.transcripts[2].phrases[4].text",
        "var_VoiceTranscript5": "$.transcripts[2].phrases[5].text",
        "var_VoiceTranscript6": "$.transcripts[2].phrases[6].text",
        "var_VoiceTranscript7": "$.transcripts[2].phrases[7].text",
        "var_VoiceTranscript8": "$.transcripts[2].phrases[8].text",
        "var_VoiceTranscript9": "$.transcripts[2].phrases[9].text",
        "var_VoiceTranscript10": "$.transcripts[2].phrases[10].text"
      },
      "translationMapDefaults": {
      "var_VoiceTranscript": "\"UNKNOWN\"",
        "var_VoiceTranscript1": "\"UNKNOWN\"",
        "var_VoiceTranscript2": "\"UNKNOWN\"",
        "var_VoiceTranscript3": "\"UNKNOWN\"",
        "var_VoiceTranscript4": "\"UNKNOWN\"",
        "var_VoiceTranscript5": "\"UNKNOWN\"",
        "var_VoiceTranscript6": "\"UNKNOWN\"",
        "var_VoiceTranscript7": "\"UNKNOWN\"",
        "var_VoiceTranscript8": "\"UNKNOWN\"",
        "var_VoiceTranscript9": "\"UNKNOWN\"",
        "var_VoiceTranscript10":"\"UNKNOWN\""
      },
      "successTemplate": "{\"VoiceTranscript\": ${var_VoiceTranscript},\"VoiceTranscript1\": ${var_VoiceTranscript1},\"VoiceTranscript2\": ${var_VoiceTranscript2},\"VoiceTranscript3\": ${var_VoiceTranscript3},\"VoiceTranscript4\": ${var_VoiceTranscript4},\"VoiceTranscript5\": ${var_VoiceTranscript5},\"VoiceTranscript6\": ${var_VoiceTranscript6},\"VoiceTranscript7\": ${var_VoiceTranscript7},\"VoiceTranscript8\": ${var_VoiceTranscript8},\"VoiceTranscript9\": ${var_VoiceTranscript9},\"VoiceTranscript10\": ${var_VoiceTranscript10}}"
    }

    Output Contract:

    {
      "type": "object",
      "properties": {
        "VoiceTranscript": {
          "type": "string"
        },
        "VoiceTranscript1": {
          "type": "string"
        },
        "VoiceTranscript2": {
          "type": "string"
        },
        "VoiceTranscript3": {
          "type": "string"
        },
        "VoiceTranscript4": {
          "type": "string"
        },
        "VoiceTranscript5": {
          "type": "string"
        },
        "VoiceTranscript6": {
          "type": "string"
        },
        "VoiceTranscript7": {
          "type": "string"
        },
        "VoiceTranscript8": {
          "type": "string"
        },
        "VoiceTranscript9": {
          "type": "string"
        },
        "VoiceTranscript10": {
          "type": "string"
        }
      },
      "additionalProperties": true
    }

    IntegrationsRUs | 2024-01-13 23:33:18 UTC | #2

    I put together three data actions in order which will get you the transcript text dynamically into a array of strings.

    1. Query the conversation to get the customer session id.

    Get-Customer-Participant-Session-ID-20240113163245.custom.json|attachment (1.4 KB)

    1. Using the Conversation Id and Session Id returned from #1, call the Get Transcript URL action.

    Get-Transcript-URL-20240113163304.custom.json|attachment (1.2 KB)

    1. The URL returned from #2 is not an API call but a generic Web services call. Call this data action to get back an array of text messages and purposes. The purposes can be used to determine if it was the customer or the agent.

    Get-Transcript-Messages-20240113163312.custom.json|attachment (1.4 KB)

    Alex Johnson https://achievecx.com/


    adesh.jadhav | 2024-01-14 06:10:39 UTC | #3

    adesh.jadhav, post:1, topic:23879
    {
      "type": "object",
      "properties": {
        "VoiceTranscript": {
          "type": "string"
        },
        "VoiceTranscript1": {
          "type": "string"
        },
        "VoiceTranscript2": {
          "type": "string"
        },
        "VoiceTranscript3": {
          "type": "string"
        },
        "VoiceTranscript4": {
          "type": "string"
        },
        "VoiceTranscript5": {
          "type": "string"
        },
        "VoiceTranscript6": {
          "type": "string"
        },
        "VoiceTranscript7": {
          "type": "string"
        },
        "VoiceTranscript8": {
          "type": "string"
        },
        "VoiceTranscript9": {
          "type": "string"
        },
        "VoiceTranscript10": {
          "type": "string"
        }
      },
      "additionalProperties": true
    }

    Thank you for the solution


    system | 2024-02-13 06:10:59 UTC | #4

    This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 23879