We are delighted to share our new EIC Delivery Methodology for efficiently managing Saviynt Implementations and delivering quick time to value. CLICK HERE.

REST Connector accountIdPath/responseColsToPropsMap Ignored

alanbixby
New Contributor III
New Contributor III

I am attempting to populate the account record via CREATEACCOUNTJSON in my custom REST integration; however I am encountering issues when I am trying to pass data back from the API response to populate the newly created account.

This configuration correctly provisions the account on the external platform, and does not throw any errors; a "blank" account is created within Saviynt with the accountIdPath and responseColsToPropsMap appearing to go unused. I do not see references to them being used via the Log Viewer.

 

{
  "showResponse": true,
  "accountIdPath": "call1.message?.id",
  "dateFormat": "yyyy-MM-dd'T'HH:mm:ssXXX",
  "responseColsToPropsMap": {
    "id": "call1.message?.id~#~char",
    "name": "call1.message?.id~#~char",
    "displayName": "#CONST#${call1.message?.workPhone?.extension ?: call1.message?.id}~#~char",
    "description": "#CONST#A PLATFORM NAME External Contact managed by Saviynt~#~char",
    "createdon": "call1.message?.createDate~#~date",
    "updatedate": "call1.message?.modifyDate~#~date"
  },
  "call": [
    {
      "name": "call1",
      "connection": "PLATFORMNAMEOAuth2",
      "httpMethod": "POST",
      "url": "https://.../api/v2/externalcontacts/contacts",
      "httpHeaders": {
        "Authorization": "${access_token}"
      },
      "httpContentType": "application/json",
      "httpParams": "{\"firstName\": \"${user.preferedFirstName ?: user.firstname ?: ''}\", \"middleName\": \"${user.middlename ?: ''}\", \"lastName\": \"${user.lastname ?: ''}\", \"title\": \"${user.title ?: ''}\", \"workPhone\": { \"display\": \"${user.phonenumber ?: ''}\", \"userInput\": \"${user.phonenumber ?: ''}\", \"acceptsSMS\": false }, \"address\": { \"countryCode\": \"US\" }, \"workEmail\": \"${user.email ?: ''}\",\"surveyOptOut\": true }",
      "successResponse": {
        "statusCode": [
          200
        ]
      }
    } 
  ]
}

 

 Example Response (per Provisioning Comments w/ showLogs: true):

 

{
  "call1": {
    "headers": {
      "Date": "Mon, 06 Nov 2023 21:37:53 GMT",
      "Content-Type": "application/json"
    },
    "message": {
      "id": "504e6543-ad36-40b9-be8e-3d39c845321f",
      "firstName": "John",
      "lastName": "Doe",
      "title": "Worker Level I",
      "workPhone": { "display": "12345", "acceptsSMS": false, "userInput": "12345" },
      "workEmail": "test@example.com",
      "address": { "countryCode": "US" },
      "modifyDate": "2023-11-06T21:37:53Z",
      "createDate": "2023-11-06T21:37:53Z",
      "surveyOptOut": true,
      "type": "Curated",
      "selfUri": "/api/v2/externalcontacts/contacts/504e6543-ad36-40b9-be8e-3d39c845321f"
    },
    "statusCode": 200,
    "description": null
  }
}

 

 What am I doing wrong?

1 REPLY 1

alanbixby
New Contributor III
New Contributor III

I opted to remove the optional chaining syntax (?.); replace id with accountID in the responseColsToPropsMap, and the issue seems to have resolved itself.

 

It's still odd to me that the Log Viewer was refusing to show any attempt at parsing responseColsToPropsMap, but Saviynt will never surprise me.