Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

REST Connector - ImportAccountEntJSON callCondition not working

HenryMK
New Contributor III
New Contributor III

Hi,

I want to decide whether to call call2 based on the value returned from previous call1 .
So set callCondition value to call2.
Only the successResponses value was set without the unsuccess responses section.
No matter what value is entered, call2 is called.

.TEST Case ( When data.hasMore== false )

1. "callCondition": "${response.call1.message.data.hasMore==true}"
2. "callCondition": "${response.call1.message.data.hasMore}"
3. "callCondition": "${false}"
4. "callCondition": "false"
5. "callCondition": false

 

- ResponseData

{
    "data": {
        "employeesTotal": 10,
        "hasMore": false,
        ...
   }
}

 

ImportAccountEntJSON

{
  "accountParams": {
    "connection": "acctAuth",
    "processingType": "SequentialAndIterative",
    "statusAndThresholdConfig": {
      "activeStatus": [
        "true"
      ],
      "deleteLinks": false,
      "accountThresholdValue": 2000,
      "correlateInactiveAccounts": false,
      "inactivateAccountsNotInFile": false,
      "deleteAccEntForActiveAccounts": true
    },
    "call": {
      "call1": {
        "callOrder": 0,
        "stageNumber": 0,
        "http": {
          "url": "<URL>",
          "httpHeaders": {
            "Authorization": "${access_token}",
            "Accept": "application/json",
            "Content-Type": "application/json"
          },
          "httpContentType": "application/json;charset=UTF-8",
          "httpMethod": "GET",
          "successResponses": {
            "statusCode": [
              200
            ]
          }
        },
        "listField": "data.employeeData",
        "keyField": "accountID",
        "colsToPropsMap": {
          "accountID": "employeeId~#~char",
          "name": "alternateId~#~char",
          "displayName": "alternateId~#~char",
          "status": "employmentInfo.employmentStatus~#~char"
        },
        "statusConfig": {
          "active": "A",
          "inactive": "T"
        }
      },
      "call2": {
        "callOrder": 0,
        "stageNumber": 0,
        "http": {
          "url": "<URL>",
          "httpHeaders": {
            "Authorization": "${access_token}",
            "Accept": "application/json",
            "Content-Type": "application/json"
          },
          "httpContentType": "application/json;charset=UTF-8",
          "callCondition": "${response.call1.message.data.hasMore==true}"
          "httpMethod": "GET",
          "successResponses": {
            "statusCode": [
              200
            ]
          }
        },
        "listField": "data.employeeData",
        "keyField": "accountID",
        "colsToPropsMap": {
          "accountID": "employeeId~#~char",
          "name": "alternateId~#~char",
          "displayName": "alternateId~#~char",
          "status": "employmentInfo.employmentStatus~#~char"
        },
        "statusConfig": {
          "active": "A",
          "inactive": "T"
        }
      }
    }
  }
}

 

 

 

3 REPLIES 3

SB
Saviynt Employee
Saviynt Employee

I am not sure if this works in Import as well but definitely does work in Provisioning scenario. You can definitely try with the import though. There is a parameter (callListPath) I see is missing in your JSON. 

Below is the link to the REST Connector guide. You can refer the same for JSON construction example. 

https://docs.saviyntcloud.com/bundle/REST-v23x/page/Content/Developers-Handbook.htm


Regards,
Sahil

HenryMK
New Contributor III
New Contributor III

Basically, we proceed by referring to the REST Connector guide.
The test has already been completed as follows.
Forum inquiries are basically inquiring because they are not processed after referring to the guide, but it is not understandable that only a guide link is provided for each inquiry.

 

"callCondition": "${response.call1.message.data.hasMore==true}",
"callListPath": "response.call1.message.data"

Is there anything that guarantees normal operation?
I can't judge if it works because I can't see anything about the callCondition check in the log.

It should operate with the true and false values of callCondition, but I don't understand why it doesn't work even when you set false directly, not as a condition.

 

 

SB
Saviynt Employee
Saviynt Employee

I have checked this and callCondition is only supported for CreateAccount and will not be supported for Import JSON. Unfortunately there is no way to stop/make 2nd call based on the 1st call response in Import. 

You can definitely raise this as a requirement in Ideas portal. https://ideas.saviynt.com


Regards,
Sahil