Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

Multiple API call in Soap Connector

smithamg
Regular Contributor
Regular Contributor
Hi team,
 
I have a requirement to update firstname and lastname of the user in target.
To achieve this, we need to fetch the unique identifier of the user - Business Card in first call and pass it as input in second API call. (as we don't have recon from target)
 
Attached is the JSON we tried with. This JSON works fine if I hardcode the "Business Card" value in second call. But its failing with error "Error while UPDATE ACCOUNT for account ****** - SUCCESSCRITERIA not matched" if I pass it as ${BUSINESSCARD} obtained from Call 1.
 
These two calls working fine if I run individually on SOAP UI.
 
I build this JSON referring below documents, nothing helped me out.
 
Thanks,
Smitha
15 REPLIES 15

SB
Saviynt Employee
Saviynt Employee

Can you share the json you are using and the error you get for the same in logs


Regards,
Sahil

smithamg
Regular Contributor
Regular Contributor

Hi Sahil,

Please find the JSON and logs attached.

Thanks,
Smitha

smithamg
Regular Contributor
Regular Contributor

Few observations while we are troubleshooting this issue,

  • Instead of directly passing the response from Call 1, we tried to store it in accounts customproperty1 (Please refer call1.txt for JSON). Below is the value saved in CP1
    "TestAcountA LastUpdate - H277864"
  • Call2 failed when we send ${account.customproperty1} as is for Business card value. (Please refer Call2.txt)
  • Then we removed double quotes from CP1 value and updated it manually in account profile. Call2 worked! it updated first name in target.

Now am facing difficulties to remove double quotes in JSON. Below are the few things I tried

  • ${account.customproperty1.replaceAll('\\\\\\\"','')}
  • ${account.customproperty1.replaceAll('\\\"','')}
  • ${account.customproperty1.replaceAll('\"',' ').trim()}
  • ${account.customproperty1.replace('"','\\"')}

SB
Saviynt Employee
Saviynt Employee

Can you try with the below and see if it works

${account.customproperty1.replace('\"','')


Regards,
Sahil

smithamg
Regular Contributor
Regular Contributor

I tried with above expression, task is still failing.

SB
Saviynt Employee
Saviynt Employee

Looks like there is a typo in the previous expression I shared. It should be ${account.customproperty1.replace('\"','')}

Can you confirm if you did add } at the end or tested without it. 


Regards,
Sahil

smithamg
Regular Contributor
Regular Contributor

I noticed the typo. I tested with } i.e. ${account.customproperty1.replace('\"','')}

smithamg
Regular Contributor
Regular Contributor

Hi Team, 

Any help on this issue is appreciated. Please let us know the syntax for removing double quotes in SOAP connector JSON.

Thanks,
Smitha

SB
Saviynt Employee
Saviynt Employee

Can you share the latest JSON you used with the replace function for ".


Regards,
Sahil

smithamg
Regular Contributor
Regular Contributor

Please find JSON attached.

SB
Saviynt Employee
Saviynt Employee

The below should ideally work. If this still does not work, can you create a ticket with Support to troubleshoot further.

{account.customproperty1.replaceAll('\"','')}


Regards,
Sahil

smithamg
Regular Contributor
Regular Contributor

@SB, thanks for your response.

${account.customproperty1.replaceAll('\"','')} dint work. I created a support ticket on the same.

smithamg
Regular Contributor
Regular Contributor
Somehow, I figured out syntax for replace function. Below is working fine for me.
${account.customproperty1.replaceAll(\"\\\\\"\",\"\")
 
Please find the attached for individual (call1 and call2) working JSON. But still update task is failing when I combine these 2 into one JSON. Please refer - trialJson.txt for all tries I did.
 
I referred Cerner connector document but those are giving me JSON parsing error.
 
Kindly let me know if am missing something while making multiple API calls.
 
Thanks,
Smitha
 
 

smithamg
Regular Contributor
Regular Contributor

Hi Team,

Any help on this is appreciated. Please let me know the correct syntax for making multiple API calls in SOAP connector.

Thanks,
Smitha

SB
Saviynt Employee
Saviynt Employee

This appears to be an issue and is now being worked by support.


Regards,
Sahil