CamiloVacaHernande | 2024-01-11 13:48:13 UTC | #1
Hi all!
I am trying to use the api to insert records through actions in genesys cloud, but when I try to create the action it gives me the following error:
I have previously generated the contract as an array and it still gives me an error.
My question is the following: I have read in some posts here in the forum where it says that it is possible "Data Actions only allow a very simple input schema of a root object with key/value pairs, where the values are simple types like string/number /boolean.
To handle more complicated situations like this you will need to setup your input to have a root object with contactListId and phone number fields. Then use a request template to setup the basic body, and insert the values into the right spots.
Documentation for this is here: https://help.mypurecloud.com/articles/request-configuration-data-actions/"
But I don't understand, do I finally need a middleware to make this request? or is it not necessary?
My JSON request is the following:
[{ "data": { "PHONE": "3208012311", "NAME": "camilo", "TTS" : "Test Operation", "SCOPE" : "", "RECORDDATE": "today", "EVENT" : "Massive", "LEVEL1" : "3227620093", "LEVEL2" : "3227620093", "LEVEL3" : "3227620093", "LEVEL4" : "3227620093", "LEVEL_5" : "3227620093", "ACCEPTED": "", "TIMEZONE": "America/Bogota" } }]
The api I am using is: /api/v2/outbound/contactlists/509885fa-fc34-4a9b-a5f6-c3a843a5122d/contacts?priority=true&doNotQueue=true
CamiloVacaHernande | 2024-01-11 15:24:39 UTC | #2
I have already found the solution, the problem was in the output of my contract, it was just leaving an array as output and it worked!
system | 2024-02-11 15:24:50 UTC | #3
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 24070