Adding variables with the flow-scripting-api-sdk

So, I've tried multiple ways of doing this but haven't yet been able to succeed, I even went so far as to switch back to typescript in case there was a trick I was missing

once I have a flow from loadFlowByFlowNameAsync I want to add a string variable with a default value.

I've been working on the assumption that's done with https://mypurecloud.github.io/purecloud-flow-scripting-api-sdk-javascript/ArchBaseFlow.html#addVariable

I've gotten lost with the dataType and actually setting the default value
https://mypurecloud.github.io/purecloud-flow-scripting-api-sdk-javascript/ArchValueString.html says Do not attempt to create instances of this class directly. They will be created automatically as needed by Architect Scripting but I can't see anywhere the Architect Scripting is creating it.

Similarly https://mypurecloud.github.io/purecloud-flow-scripting-api-sdk-javascript/ArchVariableString.html wants an internal variable if one makes it and doesn't have a datatype.

Am I missing a factory?

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.