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

retryWaitSeconds - Two blocks of calls

Huddos
Regular Contributor
Regular Contributor

Hi,

In the developer's documentation it states the below:

retryWaitSeconds - Use this attribute to specify the sleep time interval between the two blocks of calls, so that the dependent second call is processed after completing the calls in the first block.

How do I define two blocks of calls in createticketjson as the retryWaitSeconds is not working when added to connectionjson for SNOW REST connection.

I currently have below, I need a delay between each call, in particular submit_order needs to wait a number of seconds after order_now adds the item to the SNOW cart. 

{
"ticketidPath": "call3.message.result.request_number",
"cartidPath": "call2.message.result.cart_id",
"usersysidPath": "call1.message.result.sys_id",
"call": [
{
"name": "call1",
"callOrder": 0,
"connection": "userAuth",
"url": "https://xxx.service-now.com/api/now/table/sys_user?sysparm_query=user_name%3D${user.username}&syspar...",
"httpMethod": "GET",
"httpParams": "{}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200
]
},
"unsuccessResponses": {
"statusCode": [
500,
403,
409,
412
]
}
},
{
"name": "call2",
"callOrder": 1,
"connection": "${response.call1.message.result[0].size() == 0 ? '' : 'userAuth'}",
"url": "${(task.tasktype==3 || task.tasktype==6) ? 'https://xxx.service-now.com/api/sn_sc/servicecatalog/items/498cb9f3e0e206000f720ccf56a5bb52/order_no...' : 'https://xxx.service-now.com/api/sn_sc/servicecatalog/items/0c9883e4db8d79504775be32f3961954/order_no...'}",
"httpMethod": "POST",
"httpParams": "{\"sysparm_quantity\":\"1\",\"variables\":{\"SomeoneElse\":\"Someone Else\",\"RequestedFor\":\"${response.call1.message.result[0].sys_id}\",\"sysparm_requested_for\":\"${response.call1.message.result[0].sys_id}\",\"action\":\"${(task.tasktype==3 || task.tasktype==6) ?'Request access':''}\",\"Software_PC_Serial\":\"${(task.tasktype==3 || task.tasktype==6) ? 'NA' : ''}\",\"Short Description\":\"${(task.tasktype==3 || task.tasktype==6) ? 'HR21 Kiosk':''}\",\"TellUsAbout\":\"${(task.tasktype==3 || task.tasktype==6) ?'Automatically raised by Saviynt Joiner workflow' : 'Automatically raised by Saviynt Leaver workflow'}\",\"UserAccountManagement_workflow\":\"${(task.tasktype==3 || task.tasktype==6) ? '' : 'pre_delete'}\"}}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200
]
},
"unsuccessResponses": {
"message": "",
"statusCode": [
500,
400,
401
]
}
},
{
"name": "call3",
"callOrder": 2,
"connection": "${response.call1.message.result[0].size() == 0 ? '' : 'userAuth'}",
"url": "https://xxx.service-now.com/api/sn_sc/servicecatalog/cart/submit_order",
"httpMethod": "POST",
"httpParams": "",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200
]
},
"unsuccessResponses": {
"statusCode": [
500,
400,
401
]
}
}
]
}

This is comms from Servicenow Support:

The submit_order API calls should have at least 3 secs of time interval to avoid this scenario of duplicate requests being created for the same user. Which will eventually help servicenow to pass the checks points (if any), process the existing submit_cart API call in progress before another submit_cart API call being made.

 

TIA Huddos

6 REPLIES 6

stalluri
Valued Contributor
Valued Contributor

@Huddos 

 You can introduce the below configuration to the limit; It's only supported in seconds.

      "apiRateLimitConfig": {
        "retryAfterCalls": 60,
        "retryWaitSeconds": 30
      }


 


Best Regards,
Sam Talluri
If you find this a helpful response, kindly consider selecting Accept As Solution and clicking on the kudos button.

Huddos
Regular Contributor
Regular Contributor

Hi @stalluri ,

Thanks for your reply, I have not been able to get it to work, no matter what seconds it is set in connectjson the SNOW tickets are always roughly 3 seconds apart. I have 3 calls in one block, the setting states it performs the pause between a block of calls, not between calls.   

rushikeshvartak
All-Star
All-Star

retryWaitSeconds  needs to be added in ConfigJSON

{
  "apiRateLimitConfig": {
    "maxApiCapacityPercentage": 70,
    "maxRefreshTryCount": 5,
    "retryWaitSeconds": 8
  }
}

https://docs.saviyntcloud.com/bundle/Okta-v24x/page/Content/Creating-an-integration.htm


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Hi Rushikesh,

From my understanding and commentary in forums that was only for OKTA and not for REST, has that changed? And why does the dev handbook say use to delay between blocks of calls?

thanks

 

NM
Honored Contributor II
Honored Contributor II

Hi @Huddos , yes it works .. just add that in rest connection json

Huddos
Regular Contributor
Regular Contributor

Hi @NM,

Thanks for your reply, I have not been able to get it to work, no matter what seconds it is set in connectjson the SNOW tickets are always roughly 3 seconds apart. I have 3 calls in one block, the setting states it performs the pause between a block of calls, not between calls.   Thanks