Does execute step in script in sync way

Hi

I called a custom call action in script,
this custom call action will return "authenticationFlag" which named as Auth_flag in script, and then I set the value of variable(IVRAuthResult) depend on value of "authenticationFlag".

as custom call action will spend some time to call API, does is execute in sync way ? do I need to add some delay to set the variable(IVRAuthResult) to make sure this step was executed after custom action or is there any callback function I can use ?

Good day
According to the help article I'll link below, the Delay action is used to delay the execution of the custom action, not to pause while the action is being executed and wait for the response.
Therefore you shouldn't need to delay or use a callback to capture the response from the custom data action. Admittedly I haven't tested this myself, but you can test this and make sure you're getting the response you need, and post back here if the issue persists.

hi, Jacobshaw

thank you for your reply.
I checked the article your post again, and found that there is no need to set delay for action.
instead I used try/on to execute the customer action.

Chengcheng