Genesys Cloud - Main

 View Only

Discussion Thread View
Expand all | Collapse all

Read the output from json response to output variables in Data action contract.

  • 1.  Read the output from json response to output variables in Data action contract.

    Posted 07-30-2024 11:22
    Edited by Karthik Ageer 07-31-2024 09:16

    Hi All,

    We have a table in Google BigQuery that contains a list of orders. I am working on fetching the list of orders and their attributes for a particular customer using Data action. Since one customer can have multiple orders, the API will return multiple rows.

    I am able to make the API request using a Data Action and retrieve the list of order IDs for a particular customer. However, I am unable to parse the JSON response and assigning it to an output variable/contract. 

    Can you please guide me on this. 

    {
      "rows.f.v": [
        [
          "test@test.com",
          "112335",
          "2024-04-15",
          "Pending",
          "Visa Card ending 1234",
          "2S100023546785",
          "CustomerName"
        ],
        [
          "test@test.com",
          "657845",
          "2024-03-15",
          "Shipped",
          "Visa Card ending 1234",
          "2S100023546785",
          "CustomerName"
        ],
        [
          "test@test.com",
          "566542",
          "2024-03-25",
          "Shipped",
          "Visa Card ending 1234",
          "2S100023546785",
          "CustomerName"
        ]
      ]
    }


    #API/Integrations
    #Implementation

    ------------------------------
    Karthik Ageer
    Computer Generated Solutions, Inc.
    ------------------------------



  • 2.  RE: Read the output from json response to output variables in Data action contract.

    GENESYS
    Posted 07-30-2024 17:41

    Hello Karthik,

    Are you getting any errors when you try to parse the JSON response with a Data Action?



    ------------------------------
    Jason Kleitz
    Genesys - Employees
    ------------------------------



  • 3.  RE: Read the output from json response to output variables in Data action contract.

    Posted 07-31-2024 09:38