Genesys Cloud - Main

 View Only

Sign Up

  Thread closed by the administrator, not accepting new replies.
  • 1.  Update Column in Contact List

    Posted 02-03-2022 05:52
      |   view attached
    No replies, thread closed.
    Hi all,
    need some guidance with the below please.
    i need to update 1x column in a Contact List for Campaigns via a Data action in Architech.
    i have attached export of data action, changed to .txt,  i am using and below are all Contact List fields, attempting to update field "time", and only this field in Contact List

    "contactnumber":"", "fullname":"", "prevagent":"", "time": "123456"

    when executing the data action it returns successful but when i check the Contact List, it actually inserts a new record and does not update
    #Outbound

    ------------------------------
    Reginald
    ------------------------------


  • 2.  RE: Update Column in Contact List

    Posted 02-03-2022 13:51
    No replies, thread closed.
    any takers?

    ------------------------------
    Reginald
    ------------------------------



  • 3.  RE: Update Column in Contact List

    Posted 02-03-2022 13:57
    No replies, thread closed.
    You're doing a post not a put.  Post generally creates a thing, put is for updating it.  Also the contactId should not be a query parameter.  It's not a valid query parameter for the post, so it's being ignored.

    Like this, notice there is no ?
    /api/v2/outbound/contactlists/${input.contactListId}/contacts/${input.contactId}


    ------------------------------
    Melissa Bailey
    Genesys - Employees
    ------------------------------



  • 4.  RE: Update Column in Contact List

    Posted 02-03-2022 14:26
    No replies, thread closed.
    Thanks, will give it a go and advise

    ------------------------------
    Reginald
    ------------------------------



  • 5.  RE: Update Column in Contact List

    Posted 02-03-2022 14:43
      |   view attached
    No replies, thread closed.
    Hi there,
    made changes and receiving the below error

    "errors": [
        {
          "message": "REST call for action execute failed. Message:Request to backend service failed.  Response from web service: {\"message\":\"The request could not be understood by the server due to malformed syntax.\",\"code\":\"bad.request\",\"status\":400,\"contextId\":\"d0cacbce-3673-41ba-abce-a15e864e6777\",\"details\":[],\"errors\":[]} [b9fa296f-8d09-4c71-85aa-9dbf7e1ff42c]",
          "code": "BAD_REQUEST",
          "status": 400,
          "messageParams": {},
          "details": [],
          "errors": []


    ------------------------------
    Reginald
    ------------------------------



  • 6.  RE: Update Column in Contact List

    Posted 02-03-2022 16:26
    No replies, thread closed.
    Hi there, need this resolved urgently, any suggestions from anyone?

    ------------------------------
    Reginald
    ------------------------------



  • 7.  RE: Update Column in Contact List

    Posted 02-04-2022 11:00
    No replies, thread closed.
    Reginald, please refer to The API Documentation for the update contacts endpoint for the correct syntax.

    ------------------------------
    Sean Carter
    Lead Software Engineer - Outbound
    Genesys
    ------------------------------



  • 8.  RE: Update Column in Contact List

    Posted 02-04-2022 11:18
    No replies, thread closed.
    hi Sean,
    thanks had already looked at it.
    managed to fix it and working, just needed some guidance

    ------------------------------
    Reginald
    ------------------------------



  • 9.  RE: Update Column in Contact List

    Posted 02-08-2022 08:41
    No replies, thread closed.
    Hey Reginald,  what your doing shouldn't be difficult.
     I would recommend dry running your data action payloads through the developer site to make sure you don't have any syntax errors.

    In general I normally get the contact data using :


    then take everything from the [data] key and update the values I need, then feed the the whole [data] key back into this API



    For Example : 

    {
    "id": "10019f21e8797688e838a64284a00709",
    "contactListId": "358f66bd-c9a8-4074-b594-8ef62614e256",
    "data": {
    "Phone": "5132532731",
    "Priority": "1",
    "PID": "123130",
    "Last_Name": "Chris",
    "First_Name": "Martin",
    "Ins_Name": "Medic",
    "CallerID": "",
    "CallerID_Name": "",
    "Task": "Task wording",
    "Instruction": "These are your instructions",
    "ScheduledCallback": "",
    "Attempts": "",
    "Outcome": "",
    "Agent_Call_Start_Time": "",
    "Queue_Name": "",
    "Agent_Name": "",
    "PreAuth_Number": "12352112",
    "Request_Date": "44562"
    },
    "callable": true,
    "phoneNumberStatus": {
    "Phone": {
    "callable": true
    }
    },
    "selfUri": "/api/v2/outbound/contactlists/358f66bd-c9a8-4074-b594-8ef62614e256/contacts/10019f21e8797688e838a64284a00709"
    }

       Focus on the Data Object :
    In the Flow that's calling the data action, build new variables to hold each value from the contact list.
    Update the values you need to.
    {
    "Phone": "5132532731",
    "Priority": "1",
    "PID": "123130",
    "Last_Name": "Chris",
    "First_Name": "Martin",
    "Ins_Name": "Medic",
    "CallerID": "",
    "CallerID_Name": "",
    "Task": "Task wording",
    "Instruction": "These are your instructions",
    "ScheduledCallback": "",
    "Attempts": "",
    "Outcome": "",
    "Agent_Call_Start_Time": "",
    "Queue_Name": "",
    "Agent_Name": "",
    "PreAuth_Number": "12352112",
    "Request_Date": "44562"
    }



    Use this API and replace the Data object values with your variable from the flow.

    i.e.  updating
    "Last_Name": "My New Name Here",
    "First_Name": "My New Name Here",

    {
    "name": "CAM_Test1",
    "contactListId": "358f66bd-c9a8-4074-b594-8ef62614e256",
    "data": {
    "Phone": "5132532731",
    "Priority": "1",
    "PID": "123130",
    "Last_Name": "My New Name Here",
    "First_Name": "My New Name Here",
    "Ins_Name": "Medic",
    "CallerID": "",
    "CallerID_Name": "",
    "Task": "Task wording",
    "Instruction": "These are your instructions",
    "ScheduledCallback": "",
    "Attempts": "",
    "Outcome": "",
    "Agent_Call_Start_Time": "",
    "Queue_Name": "",
    "Agent_Name": "",
    "PreAuth_Number": "12352112",
    "Request_Date": "44562"
    },
    "callable": true,
    "phoneNumberStatus": {}
    }

    ------------------------------
    Chris Martin
    CCS Medical
    ------------------------------