Genesys Cloud - Developer Community!

 View Only

Sign Up

Expand all | Collapse all

External Contacts API – Linking Contact to Organisation via externalId Instead of Genesys Cloud id

  • 1.  External Contacts API – Linking Contact to Organisation via externalId Instead of Genesys Cloud id

    Posted 08-15-2025 05:25
    Hi all,
     
    We're integrating Microsoft Dynamics 365 with Genesys Cloud using the External Contacts API (/organizations/enrich and /contacts/enrich).
     
    We've set up our flow so that Dynamics account records create/update organisations in Genesys Cloud with the externalId set to the Dynamics account's unique identifier (accountID/customerID) along with our externalSource.
     
    Organisation creation example
     
    Endpoint:
     
    POST /api/v2/externalcontacts/organizations/enrich
     
     
    Body:
     
    {
      "division": { "id": "*" },
      "matchingIdentifiers": [
        {
          "division": { "id": "*" },
          "type": "ExternalId",
          "value": "123", // MSD Account Unique Identifier
          "externalSource": {
            "id": "d9b55e37-03a3-4b31-b050-980f9bfe10ac",
            "active": true
          }
        }
      ],
      "action": "Upsert",
      "externalOrganization": {
        "name": "Test Organisation 123",
        "schema": { "id": "8c811cc6-003e-40c0-a35c-c38a72534bff", "version": 1, "enabled": true },
        "customFields": {
          "customer_type_text": "Retail",
          "order_day_text": "Tuesday"
        },
        "externalIds": [
          {
            "value": "12345", // MSD Account Unique Identifier
            "externalSource": {
              "id": "d9b55e37-03a3-4b31-b050-980f9bfe10ac",
              "active": true
            }
          }
        ]
      }
    }
     
    Contact creation example
     
    Endpoint:
     
    POST /api/v2/externalcontacts/contacts/enrich
     
     
    Body:
     
    {
      "division": { "id": "*" },
      "matchingIdentifiers": [
        {
          "division": { "id": "*" },
          "type": "ExternalId",
          "value": "77777745", // MSD Contact Unique Identifier
          "externalSource": {
            "id": "d9b55e37-03a3-4b31-b050-980f9bfe10ac",
            "active": true
          }
        }
      ],
      "action": "Upsert",
      "contact": {
        "externalOrganization": {
          "externalIds": [
            {
              "externalSource": {
                "id": "d9b55e37-03a3-4b31-b050-980f9bfe10ac",
                "name": "MSD Data Lake"
              },
              "value": "12345" // Currently Genesys Cloud Org ID here
            }
          ]
        },
        "firstName": "Test Link",
        "workPhone": { "display": "+27 11 111 1111", "e164": "+27 11 111 1111", "countryCode": "ZA" },
        "externalIds": [
          {
            "externalSource": {
              "name": "MSD Data Lake",
              "id": "d9b55e37-03a3-4b31-b050-980f9bfe10ac",
              "active": true
            },
            "value": "77777745"
          }
        ],
        "schema": { "id": "c4efdd7b-4631-45d7-8a54-e0ca710031e1", "version": 3, "enabled": true },
        "customFields": { "contactfunction_text": "Payer" },
        "options": { "promote": true }
      }
    }
     
    The question
     
    When linking the contact to its organisation (contact.externalOrganization), can we supply the organisation's externalId (with the correct externalSource) instead of the Genesys Cloud-generated id?
     
    Goal:
    Avoid querying Genesys Cloud for the organisation's id before linking, which would add unnecessary latency and complexity.
     
    Summary of ask:
     
    Does /contacts/enrich support externalOrganization.externalIds lookup, or is externalOrganization.id mandatory for association?
     
    If supported, is there a specific structure or field name needed to resolve by externalId?

    #API/Integrations

    ------------------------------
    Princess Maseko
    Technical Consultant
    ------------------------------


  • 2.  RE: External Contacts API – Linking Contact to Organisation via externalId Instead of Genesys Cloud id

    Posted 08-18-2025 07:04

    Hi Princess,

    I am going to move this across to the Genesys Cloud Developer Community to see if they can help answer this question.



    ------------------------------
    Sam Jillard
    Online Community Manager/Moderator
    Genesys - Employees
    ------------------------------



  • 3.  RE: External Contacts API – Linking Contact to Organisation via externalId Instead of Genesys Cloud id

    Posted 08-21-2025 15:11
    Edited by Ewomazino Onokpise 08-25-2025 10:52

    Hi Princess, 

    Currently the External Contacts APIs do not offer this functionality. It will be a good feature for later iterations and the External Contacts team does acknowledge that. Raising this idea to the Ideas portal  could expedite that process as well and help to track the feature requests



    ------------------------------
    Ewomazino Onokpise
    Software Engineer
    ------------------------------