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

ImportAccEnt JSON Payload Format Change

Srinidhan
New Contributor
New Contributor

We have been trying to run the ImportAccEnt JSON using a REST API Connection. We are getting an invalid payload format error from the API Service. Upon inspection with the beeceptor tool we found that the payload body of ImportAccEnt JSON is being sent in a x-www-form-urlencoded format but the service is capable only of accepting RAW Format. The Create Account JSON is working as expected and the payload is being sent in raw format. I have attached the screenshot from the beeceptor tool for each JSON Type.

Additionally, The job seems to fail when escape characters are added to httpparamas even though it is configured similar to the Create Account JSON.

Please find the ImportAccEnt JSON below

{

  "accountParams": {

    "connection": "userAuth",

    "createUsers": true,

    "adminName": "admin",

    "processingType": "SequentialAndIterative",

"doNotChangeIfFailed":true,

    "statusAndThresholdConfig": {

      "deleteLinks": false,

      "accountThresholdValue": 30,

      "correlateInactiveAccounts": true,

      "inactivateAccountsNotInFile": false,

      "deleteAccEntForActiveAccounts": false

    },

    "call": {

      "call1": {

        "callOrder": 0,

        "stageNumber": 0,

        "http": {

          "url": "https://qwertytest.free.beeceptor.com",

          "httpHeaders": {

            "Authorization": "${access_token}",

"Content-Type": "application/json",

"Accept": "*/*",

"accesskey": "***"

        },

        "httpParams":{"includeTotal": true,"limit": 25,"page": 0,"select":["gsid","email"],"where":{"conditions":[{"name":"Email","alias":"A","value":["xxxx.xxxx@xxxx.com"],"operator":"EQ"}],"expression":"A"}},

          "httpMethod": "POST"

        },

        "listField": "data.users",

        "keyField": "accountID",

        "colsToPropsMap": {

"customproperty1": "Gsid~#~char",

"accountID":"email~#~char",

"customproperty3": "ProfilePicture~#~char",

"customproperty4": "Status~#~char"

          },

        "disableDeletedAccounts": false

      }

}   }

  }

Please find the Create Account JSON below

{
"call":[
{
"name":"call1",
"connection":"userAuth",
"url":"https://qwertytest.free.beeceptor.com",
"httpMethod":"POST",
"httpParams":"{\"records\": [{\"Name\":\"${user.firstname} ${user.lastname}\",\"Email\":\"${user.email}\",\"SFDCUserName\":\"${user.email}\"}]}",
"httpHeaders":{
"Authorization":"${access_token}",
"contentType":"application/json",
"accept":"application/json, text/plain, */*",
"accept-language":"en-GB,en-US;q=0.9,en;q=0.8",
"accesskey":"74e883ff-a2e9-4b43-a537-82ff3341b4d8"
},
"httpContentType":"application/json",
"colsToPropsMap": {
"customproperty1": "data.records[3].gsid"
},
"successResponses":{
"statusCode":[
200
]
}
}
]
}

ImportAccEnt JSON Beeceptor Payload Format

Srinidhan_1.png

CreateAccount JSON Beeceptor Payload Format (Working as expected)

Srinidhan_2.png

Also tried after matched all the request headers from Postman

Srinidhan_3.png

POSTMAN Beeceptor Payload Format - RAW

Srinidhan_4.png

POSTMAN Beeceptor Payload Format - x-www-form-urlencoded

Srinidhan_5.png

Is there anyway the payload format of the ImportAccEntJSON can be modified? or is there some other alternative or mistake with the JSON.

2 REPLIES 2

sk
All-Star
All-Star

@Srinidhan : First of remove the sensitive information from your post. Also try below JSON format and replace the URL and email values accordingly.

{
    "accountParams": {
        "connection": "userAuth",
        "createUsers": true,
        "adminName": "admin",
        "processingType": "SequentialAndIterative",
        "doNotChangeIfFailed": true,
        "statusAndThresholdConfig": {
            "deleteLinks": false,
            "accountThresholdValue": 30,
            "correlateInactiveAccounts": true,
            "inactivateAccountsNotInFile": false,
            "deleteAccEntForActiveAccounts": false
        },
        "call": {
            "call1": {
                "callOrder": 0,
                "stageNumber": 0,
                "http": {
                    "url": "<>",
                    "httpHeaders": {
                        "Authorization": "${access_token}",
                        "httpContentType": "application/json",
                        "Accept": "*/*",
                        "accesskey": "***"
                    },
                    "httpParams": "{\"includeTotal\": true,\"limit\": 25,\"page\": 0,\"select\":[\"gsid\",\"email\"],\"where\":{\"conditions\":[{\"name\":\"Email\",\"alias\":\"A\",\"value\":[\"<>.com\"],\"operator\":\"EQ\"}],\"expression\":\"A\"}}",
                    "httpMethod": "POST"
                },
                "listField": "data.users",
                "keyField": "accountID",
                "colsToPropsMap": {
                    "customproperty1": "Gsid~#~char",
                    "accountID": "email~#~char",
                    "customproperty3": "ProfilePicture~#~char",
                    "customproperty4": "Status~#~char"
                },
                "disableDeletedAccounts": false
            }
        }
    }
}

 


Regards,
Saathvik
If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.

Srinidhan
New Contributor
New Contributor

Hey Saathvik,

Updated the article to remove sensitive information. Had edited the article previously once too but the changes were not reflected in the article. All sensitive values in the JSON are dummy values and void. The current URL in the JSON is for a Endpoint testing tool. Please let me know incase some permalink needs to used to modify the article and I can remove them too.

Also tried the suggestion, and as mentioned the the job fails when adding escape characters.

Srinidhan_0-1696940674905.png

After removing the escape characters the runs fine

Srinidhan_1-1696940967338.png