Legacy Dev Forum Posts

 View Only

Sign Up

Get external contact per ID within externalSystemUrl

  • 1.  Get external contact per ID within externalSystemUrl

    Posted 06-05-2025 18:43

    Mostafa_OUDDERHEM | 2021-12-07 08:11:18 UTC | #1

    Hi,

    I need to know if it is possible to create custom data action to get external contact per ID located on externalSystemUrl (as input), instead of contact ID, see an example below of externalSystemUrl:

    "externalSystemUrl": "http://vtomcat.myoffice.net/MiddleOffice/#/recherche-adherent?layout=partial&id=814633",

    It this example, I want to search per the ID in URL (814633) to printout all contact details (phone, email, name...etc.).

    Is it possible ?

    Thank you in advance for your help.


    Jerome.Saint-Marc | 2021-12-07 09:01:53 UTC | #2

    Hello,

    Yes, you can create a Web Services Data Actions integration to make a query to an external url, as long as your vtomcat.myoffice.net web service returns a JSON based response (i.e. response body with JSON content).

    Regards,


    Mostafa_OUDDERHEM | 2021-12-07 09:14:10 UTC | #3

    Hi Jerome, Thanks for your feedback, what I mean, is not integration with external application using URL, it is using only Genesys Cloud Data Action and instead of using the standard API: /api/v2/externalcontacts/contacts/{contactId}, which use contactID as input, I want to use the number located on externalurl (http://vtomcat.myoffice.net/MiddleOffice/#/recherche-adherent?layout=partial&id=814633") returned by the previous API (standard one) as input in another API. I hope that can be clear for you. Many thanks


    Jerome.Saint-Marc | 2021-12-07 10:02:58 UTC | #4

    Hello,

    If your question is if you can query and retrieve an External Contact from Genesys Cloud (stored in Genesys Cloud as External Contacts) using the id in your externalSystemUrl as input parameter, instead of the contact ID, the answer is no.

    If you have a way to define custom fields for your external contact, and if you can store this id in one of these custom fields (i.e. only 814633), you could search for the contact using this value and the GET /api/v2/externalcontacts/contacts request (q query parameter set to 814633).

    Regards,


    Mostafa_OUDDERHEM | 2021-12-08 11:38:13 UTC | #5

    Hi Jerome, Thanks for your help, this is a good idea. Do you know how we can search through custom field in API (Data Action) ?

    Thank you.


    Jerome.Saint-Marc | 2021-12-08 11:52:49 UTC | #6

    You can create a Genesys Cloud Data Action that invokes GET /api/v2/externalcontacts/contacts request (q query parameter set to 814633).


    Mostafa_OUDDERHEM | 2021-12-09 10:18:12 UTC | #7

    Hi Jerome,

    Do you know what the expression I can use in Architect to take only the number (814633) for this URL: http://vtomcat.myoffice.net/MiddleOffice/#/recherche-adherent?layout=partial&id=814633

    Many thanks for your help.


    Jason_Mathison | 2021-12-09 11:45:58 UTC | #8

    The easiest solution that I have come up with is something like

    split(url, "&id=")

    which should return an array of 2 strings, the second one being the number.


    Mostafa_OUDDERHEM | 2021-12-09 12:59:23 UTC | #9

    Hello Jason, thanks for your help, then how I can take only the second string (that contain only digit). Thank you.


    Jerome.Saint-Marc | 2021-12-09 13:30:42 UTC | #10

    Something like this: GetAt(Split(Flow.MyExternalSystemUrl, "id="), 1)

    Regards,


    Mostafa_OUDDERHEM | 2021-12-09 13:37:07 UTC | #11

    Hello Jerome, thanks for your help


    Ebenezer_Osei | 2021-12-13 19:04:57 UTC | #12


    This post was migrated from the old Developer Forum.

    ref: 12863