@interaction::runInteractionScript

This method will execute a new interpreter session and block it until it completes.

Note: There are two ways to use this script object method.

Option One:

The context of the calling script is passed into the interaction script being run.

Syntax:

@interaction::runInteractionScript(long notificationID, String interactionScript, ScriptObject scriptObj, UserSessionObject sessionObj, ContentObject contentObj, RecipientObject recipientObj, PhoneScriptObject phoneObj)

Parameters:

Returns:

(Boolean) true if a context is available for this notification, otherwise false.

Note: context is not available for terminated events, and the return value may be ignored.

Option Two:

This option needs to be used in conjunction with the retrieveInteractionContext method. First retrieve the interaction context, and then call runInteractionScript.

Syntax:

@interaction::runInteractionScript(ScriptObject scriptObj, UserSessionObject sessionObj, RecipientObject recipientObj, PhoneScriptObject phoneObj)

Parameters:

Returns:

(Boolean) true if a context is available for this notification, otherwise false.

Note: context is not available for terminated events, and the return value may be ignored.