Genesys Cloud - Main

 View Only
Discussion Thread View
  • 1.  JSON Query filter syntax

    Posted 06-22-2022 13:31

    We are attempting to call our Dynamics endpoint with a Filter that uses a Variable set in the Contracts portion of the Data Action. The Variable, MEMBER_ID, will be the value in the mvp_memberid field of our endpoint table. Here is one of the test API calls we've tried to accomplish this:

    /api/data/v8.1/hsl_policymembers?${esc.dollar}select=_hsl_client_value,hsl_name,createdon,mvp_effectivedate,mvp_terminationdate&${esc.d}filter=$esc.url(mvp_memberid eq $input.MEMBER_ID)

     

    The Data Action produced an error when testing – I've attached the error message for reference. Essentially, it is complaining about the syntax the call is using around the filter portion of the call.

     

    We have tried lots of variations of syntax to try and get the call to work with no success. If you could help us to identify correct syntax for the call we would greatly appreciate it. 

    Is there any documentation or training available on how to write the format the OData calls used in Data actions. They don't follow the standard syntax
    #Integrations

    ------------------------------
    Velmani Natarajan
    MVP Health Plan, Inc.
    ------------------------------


  • 2.  RE: JSON Query filter syntax

    Posted 06-22-2022 13:59
    I did something similar for a Dynamics Data Action call. mine looks like this:

    api/data/v9.0/phonecalls?${esc.dollar}select=activityid,actualstart,createdon&${esc.dollar}orderby=$esc.url("createdon asc")&${esc.dollar}top=1&${esc.d}filter=$esc.url("(isgc_interactionid eq '${input.id}')")

    Where my goal is to get the activity ID in Dynamics, filtering by a specific Interaction ID, which is an input value. Maybe try this? $esc.url("(isgc_interactionid eq '${input.id}')")

    Thanks,
    Peter

    ------------------------------
    Peter Stoltenberg
    Avtex Solutions, LLC
    ------------------------------



  • 3.  RE: JSON Query filter syntax

    Posted 06-22-2022 14:34
    Hi Peter,
    Thanks for your quick response. Your hint was a great help. We were able to get the syntax right. It is working now. 
    Really appreciate it. 
    Is there any documentation available for these JSON query. 

    /api/data/v8.1/hsl_policymembers?${esc.dollar}select=_hsl_client_value,hsl_name,createdon,mvp_effectivedate,mvp_terminationdate&${esc.dollar}filter=$esc.url("mvp_memberid eq '${input.MEMBER_ID}'")

    Thanks again.

    ------------------------------
    Velmani Natarajan
    MVP Health Plan, Inc.
    ------------------------------



  • 4.  RE: JSON Query filter syntax

    Posted 06-22-2022 14:50
    You're welcome.

    This is generally helpful, https://docs.microsoft.com/en-us/power-apps/developer/data-platform/webapi/query-data-web-api. 

    Though, it doesn't have the perfect syntax for exactly everything you need.

    Thanks,
    Peter

    ------------------------------
    Peter Stoltenberg
    Avtex Solutions, LLC
    ------------------------------



Need Help finding something?

Check out the Genesys Knowledge Network - your all-in-one access point for Genesys resources