Legacy Dev Forum Posts

 View Only

Sign Up

Error while adding contacts to a contact list

  • 1.  Error while adding contacts to a contact list

    Posted 06-05-2025 18:12

    anil.kumar | 2017-08-29 13:11:31 UTC | #1

    Hi,

    I am working on a outbound dialer campaign. All the necessary steps to create a contact list and campaign are done. I am now trying to add contacts into the contact list from the IVR by exposing a rest service to be called as a bridge action in the IVR.

    I am using outboundApi.postContactlistsContactlistIdContacts API to add the contacts. When I add the contacts with enough details, I get this error. FYI, the campaign is not even started when calling this. can some one provide some information on why this is happening ?

    {
      "status": 400,
      "code": "referential.integrity.error",
      "message": "Referential integrity is not satisfied",
      "messageWithParams": "Referential integrity is not satisfied",
      "messageParams": {
        "Referencing Entities": "[ab47c436-f106-44f0-becb-5725fd9b3eb6]",
        "Referencing Entity names": "[Outbound Campaign]",
        "Referencing Entity type": "Campaign"
      },
      "contextId": "88d6ae11-1eaf-4cfb-860f-d464dd4a4fb4",
      "details": [],
      "errors": []
    }

    tim.smith | 2017-08-29 13:18:20 UTC | #2

    Looking at the logs, that error is not coming from outboundApi.postContactlistsContactlistIdContacts. You're making a request to DELETE https://api.mypurecloud.com.au:443/api/v2/outbound/contactlists/4056435a-9a25-4fce-922e-d05d76cd0f61. This error is because campaign ab47c436-f106-44f0-becb-5725fd9b3eb6 is using this contact list.


    anil.kumar | 2017-08-30 01:54:53 UTC | #3

    The delete request is a different request, I do not have any problems with it. But to add to contacts, I am sure I am using outboundApi.postContactlistsContactlistIdContacts as I see that in my application logs.. can you look for the addition requests to contact list with Id 4056435a-9a25-4fce-922e-d05d76cd0f61 in your logs ?

    Thanks


    anil.kumar | 2017-08-31 04:27:34 UTC | #4

    Hi ,

    Could you let me know whether we can add contacts to a contact list which is being used by a campaign, when the campaign is not running ?

    I am trying to add contacts to a contact list which is being used by a campaign. I was able to do this until last week, but everytime I do it now, I get a referential integrity error saying that the list is already in use by a campaign.

    Thanks, Anil


    anil.kumar | 2017-08-31 06:17:02 UTC | #5

    Hi,

    I just now found out that the API that I am using outboundApi.postContactlistsContactlistIdContacts() is actually deleting the contact list and then trying to add the contact to the list... or something wrong is happening with this API which I am not aware of... Can you please investigate this.. I am sure that I am using API, outboundApi.postContactlistsContactlistIdContacts(). Here is the error that I get from my service. I was using the same service to add contacts to the for last two weeks and I am facing this problem as reported earlier from this week.

    com.teve.service.impl.purecloud.IVRActionServiceImpl - Adding contacts to List: a62c279d-cfb7-4455-bf1f-81c538fa2ac8 with data: {Mobile=tel:+61410244384, Name=Contact Name, Phone=tel:+61410244384, Queue=TestCall, TimeZone=Australia/Melbourne, VCBRequestTime=2017-08-31T05:51:29.055Z, callable=true, contactListId=a62c279d-cfb7-4455-bf1f-81c538fa2ac8, contactListName=Callback List} , env=, uid=, agent= DEBUG 2017-08-31 15:51:29,883 [http-nio-8080-exec-4] com.teve.service.impl.purecloud.IVRActionServiceImpl - Error while adding contacts to the contact list : com.mypurecloud.sdk.ApiException: {"status":404,"code":"contact.list.not.found","message":"A ContactList with id a62c279d-cfb7-4455-bf1f-81c538fa2ac8 could not be found","messageWithParams":"A {entity} with id {id} could not be found","messageParams":{"id":"a62c279d-cfb7-4455-bf1f-81c538fa2ac8","entity":"ContactList"},"contextId":"3e7019c3-3ce5-4c5b-9337-58fcf06ec41e","details":[],"errors":[]} , env=, uid=, agent=


    tim.smith | 2017-08-31 14:06:01 UTC | #6

    The latest error is because the contact list you're trying to add contacts to doesn't exist, hence the message A ContactList with id a62c279d-cfb7-4455-bf1f-81c538fa2ac8 could not be found. Make sure you're using the ID of an active contact list.


    system | 2017-10-06 16:08:36 UTC | #7

    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: 1728