ArchFactoryFlows()

new ArchFactoryFlows()

A factory instance that lets you create Architect flows or get information about existing flows. When creating a flow, the factory will create an Architect flow scripting instance which is a local in-memory object that you can then use and configure the flow contents. The flow itself will have methods to save, check-in, validate or publish. You must check-in or publish a flow to make it available in the Architect UI. Do not attempt to create an instance of this class. Architect Scripting will create the factory instance as needed.

Extends

Members

static, readonly displayTypeName :string

Returns the display type name string 'ArchFactoryFlows'.

static, readonly isArchFactoryFlows :boolean

Returns true indicating that this is an ArchFactoryFlows instance.

defaultFlowCreationDivision :ArchDivision

The default division to use for flow creation calls like ArchFactoryFlows#createFlowInboundCallAsync if no division is specified in the flowDivision parameter. Attempting to get the default flow creation division when the Architect Scripting session is not connected or for an organization that does not support divisions will return nothing. Attempting to set the default flow creation division when the Architect Scripting session is not connected or an organization that does not support divisions will throw an error.

readonly logStr :string

A logging string for the Architect Factory Flows instance.

Overrides:

readonly logStrTypeOnly :string

This is a string suitable for logging information about this object where it's just the object's type. This is normally used when logging errors that occur in constructor parameter checking because the scripting object isn't set up and the normal logging str contents wouldn't be set up.

Inherited From:

Methods

checkoutAndLoadFlowByFlowIdAsync(flowId, flowType, forceUnlockopt, flowVersionopt, callbackFunctionopt) → {Promise}

Check out and load the flow for the given flow id to the current user.

Parameters:
Name Type Attributes Default Description
flowId string

the flow identifier.

flowType string

the flow type. The string values in ArchEnums#FLOW_TYPES list valid values.

forceUnlock boolean <optional>
false

whether to force an unlock of the flow. Remember, the architect:flow:unlock permission is needed to unlock a flow locked to another user.

flowVersion string <optional>
"latest"

the version of the flow to get. Valid values are "latest" to get the latest saved configuration of a flow, a version value such as "2.0" or "2", "debug" to get the currently published debug version configuration of a flow, or "published" to get the currently published version configuration of a flow. If you do not specify a version, then the latest saved configuration will be loaded.

callbackFunction callbackArchBaseFlow <optional>

a callback function to call if the flow can be found on the server by id and type. The first parameter passed to the callback function will be the Architect Scripting flow instance.

Returns:
Promise -
  • while this method returns a promise, you should use the callback function to perform any processing because that callback will be passed the ArchBaseFlow instance.

checkoutAndLoadFlowByFlowInfoAsync(archFlowInfo, forceUnlockopt, flowVersionopt, callbackFunctionopt) → {Promise}

Check out and load the flow for a given flow info object to the current user.

Parameters:
Name Type Attributes Default Description
archFlowInfo ArchFlowInfo

flow information for the flow which you wish to load and edit.

forceUnlock boolean <optional>
false

whether to force an unlock of the flow. Remember, the architect:flow:unlock permission is needed to unlock a flow locked to another user.

flowVersion string <optional>
"latest"

the version of the flow to get. Valid values are "latest" to get the latest saved configuration of a flow, a version value such as "2.0" or "2", "debug" to get the currently published debug version configuration of a flow, or "published" to get the currently published version configuration of a flow. If you do not specify a version, then the latest saved configuration will be loaded.

callbackFunction callbackArchBaseFlow <optional>

a callback function to call if the flow can be found on the server by name. The first parameter passed to the callback function will be the Architect Scripting flow instance.

Returns:
Promise -
  • while this method returns a promise, you should use the callback function to perform any processing because the callback will be passed the ArchBaseFlow instance.

checkoutAndLoadFlowByFlowNameAsync(flowName, flowType, forceUnlockopt, flowVersionopt, callbackFunctionopt) → {Promise}

Checkout and load a flow for the given flow name and type to the current user.

Parameters:
Name Type Attributes Default Description
flowName string

name of the flow.

flowType string

the flow type. The string values in ArchEnums#FLOW_TYPES list valid values.

forceUnlock boolean <optional>
false

whether to force an unlock of the flow. Remember, the architect:flow:unlock permission is needed to unlock a flow locked to another user.

flowVersion string <optional>
"latest"

the version of the flow to get. Valid values are "latest" to get the latest saved configuration of a flow, a version value such as "2.0" or "2", "debug" to get the currently published debug version configuration of a flow, or "published" to get the currently published version configuration of a flow. If you do not specify a version, then the latest saved configuration will be loaded.

callbackFunction callbackArchBaseFlow <optional>

a callback function to call if the flow can be found on the server by name. The first parameter passed to the callback function will be the Architect Scripting flow instance.

Returns:
Promise -
  • while this method returns a promise, you should use the callback function to perform any processing because that callback will be passed the ArchBaseFlow instance.

checkoutFlowByFlowIdAsync(flowId, flowType, forceUnlockopt, callbackFunctionopt) → {Promise}

Check out the flow for the given flow id to the current user. This function passes an ArchFlowInfoBasic instance for it to the supplied callback function.

Parameters:
Name Type Attributes Default Description
flowId string

the flow identifier.

flowType string

the flow type. The string values in ArchEnums#FLOW_TYPES list valid values.

forceUnlock boolean <optional>
false

whether to force an unlock of the flow. Remember, the architect:flow:unlock permission is needed to unlock a flow locked to another user.

callbackFunction callbackArchFlowInfoBasic <optional>

a callback function to call if the flow can be found on the server by id and type. The first parameter passed to the callback function will be the Architect Scripting flow basic information instance.

Returns:
Promise -
  • while this method returns a promise, you should use the callback function to perform any processing because the callback will be passed the ArchFlowInfoBasic instance.

checkoutFlowByFlowInfoAsync(archFlowInfo, forceUnlockopt, callbackFunctionopt) → {Promise}

Check out a flow for the supplied flow info to the current user. This function passes an ArchFlowInfoBasic instance for it to the supplied callback function.

Parameters:
Name Type Attributes Default Description
archFlowInfo ArchFlowInfo

flow information for the flow which you wish to edit.

forceUnlock boolean <optional>
false

whether to force an unlock of the flow. Remember, the architect:flow:unlock permission is needed to unlock a flow locked to another user.

callbackFunction callbackArchFlowInfoBasic <optional>

a callback function to call if the flow can be found on the server by flow info. The first parameter passed to the callback function will be the Architect Scripting flow basic information instance.

Returns:
Promise -
  • while this method returns a promise, you should use the callback function to perform any processing because the callback will be passed the ArchFlowInfoBasic instance.

checkoutFlowByFlowNameAsync(flowName, flowType, forceUnlockopt, callbackFunctionopt) → {Promise}

Check out a flow with a given name to the current user. This function passes an ArchFlowInfoBasic instance for it to the supplied callback function.

Parameters:
Name Type Attributes Default Description
flowName string

name of the flow.

flowType string

the flow type. The string values in ArchEnums#FLOW_TYPES list valid values.

forceUnlock boolean <optional>
false

whether to force an unlock of the flow. Remember, the architect:flow:unlock permission is needed to unlock a flow locked to another user.

callbackFunction callbackArchFlowInfoBasic <optional>

a callback function to call if the flow can be found on the server by name. The first parameter passed to the callback function will be the Architect Scripting flow basic information instance.

Returns:
Promise -
  • while this method returns a promise, you should use the callback function to perform any processing because the callback will be passed the ArchFlowInfoBasic instance.

createFlowBotAsync(flowName, flowDescriptionopt, defaultSupportedLanguageopt, callbackFunctionopt, flowDivisionopt, creationDataopt) → {Promise}

Creates a new bot flow flow in memory. Upon successful creation the callback function that's passed in will be called with the newly created Architect flow scripting object. Calling operations such as ArchBaseFlow#saveAsync and ArchBaseFlow#publishAsync will create these flows in the cloud. Use the ArchBaseFlow#isCreated property to see if the flow is created within Genesys Cloud.

The bot flow will have a bot that is already created which you can access via. the startUpObject property off of the flow. It's important to note that when you create a bot flow, unlike other flow types, Architect Scripting will have already called ArchBaseFlow#createAsync on the flow because we require additional setup for bot flows that require creation up front.

Parameters:
Name Type Attributes Default Description
flowName string

the name for the new flow.

flowDescription string <optional>

the description for the new flow.

defaultSupportedLanguage ArchLanguage <optional>
ArchLanguages#englishUnitedStates

the default language to use for the flow.

callbackFunction callbackArchFlowBot <optional>

a callback function to call if the bot flow is successfully created. The first parameter passed to the callback function will be the created in-memory flow.

flowDivision ArchDivision <optional>

if specified, the division in which to create the flow. This must be a division where the division's ArchDivision#canAddFlow property returns true. If not specified, the division stored in the ArchFactoryFlows#defaultFlowCreationDivision will be used.

creationData object <optional>

if specified, the supplied JSON object will contain a natural language understanding configuration. Similar to exporting the Natural Language Understanding configuration in Architect's UI, the JSON object must have an nluDomainVersion property at the root to be valid and then subsequent natural language configuration meta data underneath it. Slot names within the JSON object should be compliant with Architect variable naming standards. If not specified, a default blank Natural Language Understanding configuration will be used by Architect Scripting.

Returns:
Promise -
  • while this method returns a promise, you should use the callback function to perform any processing because the callback will be passed the newly created ArchFlowBot instance.

createFlowCommonModuleAsync(flowName, flowDescriptionopt, defaultSupportedLanguageopt, callbackFunctionopt, flowDivisionopt, compatibleFlowTypesopt) → {Promise}

Creates a new common module flow in memory. Upon successful creation the callback function that's passed in will be called with the newly created Architect flow scripting object. Calling operations such as ArchBaseFlow#saveAsync and ArchBaseFlow#publishAsync will create these flows in the cloud. Use the ArchBaseFlow#isCreated property to see if the flow is created within Genesys Cloud.

Parameters:
Name Type Attributes Description
flowName string

the name for the new flow.

flowDescription string <optional>

the description for the new flow.

defaultSupportedLanguage ArchLanguage <optional>

the default language to use for the flow.

callbackFunction callbackArchFlowCommonModule <optional>

A callback function to call if the inbound call flow is successfully created. The first parameter passed to the callback function will be the created in-memory flow.

flowDivision ArchDivision <optional>

if specified, the division in which to create the flow. This must be a division where the division's ArchDivision#canAddFlow property returns true. If not specified, the division stored in the ArchFactoryFlows#defaultFlowCreationDivision will be used.

compatibleFlowTypes Array.<string> <optional>

the flow types that can call the common module using a Call Common Module action.

Returns:
Promise -
  • While this method returns a promise, you should use the callback function to perform any processing because the callback will be passed the newly created ArchFlowInboundCall instance.

createFlowDigitalBotAsync(flowName, flowDescriptionopt, defaultSupportedLanguageopt, callbackFunctionopt, flowDivisionopt, creationDataopt) → {Promise}

Creates a new digital bot flow flow in memory. Upon successful creation the callback function that's passed in will be called with the newly created Architect flow scripting object. Calling operations such as ArchBaseFlow#saveAsync and ArchBaseFlow#publishAsync will create these flows in the cloud. Use the ArchBaseFlow#isCreated property to see if the flow is created within Genesys Cloud.

The bot flow will have a bot that is already created which you can access via. the startUpObject property off of the flow. It's important to note that when you create a bot flow, unlike other flow types, Architect Scripting will have already called ArchBaseFlow#createAsync on the flow because we require additional setup for bot flows that require creation up front.

Parameters:
Name Type Attributes Default Description
flowName string

the name for the new flow.

flowDescription string <optional>

the description for the new flow.

defaultSupportedLanguage ArchLanguage <optional>
ArchLanguages#englishUnitedStates

the default language to use for the flow.

callbackFunction callbackArchFlowDigitalBot <optional>

a callback function to call if the bot flow is successfully created. The first parameter passed to the callback function will be the created in-memory flow.

flowDivision ArchDivision <optional>

if specified, the division in which to create the flow. This must be a division where the division's ArchDivision#canAddFlow property returns true. If not specified, the division stored in the ArchFactoryFlows#defaultFlowCreationDivision will be used.

creationData object <optional>

if specified, the supplied JSON object will contain a natural language understanding configuration. Similar to exporting the Natural Language Understanding configuration in Architect's UI, the JSON object must have an nluDomainVersion property at the root to be valid and then subsequent natural language configuration meta data underneath it. Slot names within the JSON object should be compliant with Architect variable naming standards. If not specified, a default blank Natural Language Understanding configuration will be used by Architect Scripting.

Returns:
Promise -
  • while this method returns a promise, you should use the callback function to perform any processing because the callback will be passed the newly created ArchFlowDigitalBot instance.

createFlowFromDefinitionAsync(archDefinitionFlow, flowName, flowDescriptionopt, defaultSupportedLanguageopt, callbackFunctionopt, flowDivisionopt, creationDataopt, compatibleFlowTypesopt) → {Promise}

Creates a new flow instance in memory from the specified flow definition. Calling operations such as ArchBaseFlow#saveAsync and ArchBaseFlow#publishAsync will create these flows in the cloud. Use the ArchBaseFlow#isCreated property to see if the flow is created within Genesys Cloud.

Parameters:
Name Type Attributes Default Description
archDefinitionFlow ArchDefinitionFlow

the flow definition that specifies the flow type you wish to create.

flowName string

the name for the new flow.

flowDescription string <optional>

the description for the new flow.

defaultSupportedLanguage ArchLanguage <optional>
ArchLanguages#englishUnitedStates

the default language to use for the flow. If the flow type specified does not have supported languages, you do not need to supply a value for this parameter.

callbackFunction callbackArchBaseFlow <optional>

a callback function to call if the flow is successfully created. The first parameter passed to the callback function will be the created in-memory flow.

flowDivision ArchDivision <optional>

if specified, the division in which to create the flow. This must be a division where the division's ArchDivision#canAddFlow property returns true. If not specified, the division stored in the ArchFactoryFlows#defaultFlowCreationDivision will be used.

creationData object <optional>

if specified, this is additional data used for the creation of the flow from its definition. To see what you can specify in creation data, look at the specific flow type creation call and what is documented for the expected data on the creationData parameter ( if applicable ). You can see if a flow supports creation data by accessing the ArchDefinitionFlow#supportsFlowCreationData property. If you specify creation data to a flow type that does not support creation data, this method will error.

compatibleFlowTypes Array.<string> <optional>

the flow types that can call the common module using a Call Common Module action.

Returns:
Promise -
  • while this method returns a promise, you should use the callback function to perform any processing because the callback will be passed the newly created ArchBaseFlow instance.

createFlowInboundCallAsync(flowName, flowDescriptionopt, defaultSupportedLanguageopt, callbackFunctionopt, flowDivisionopt) → {Promise}

Creates a new inbound call flow in memory. Upon successful creation the callback function that's passed in will be called with the newly created Architect flow scripting object. Calling operations such as ArchBaseFlow#saveAsync and ArchBaseFlow#publishAsync will create these flows in the cloud. Use the ArchBaseFlow#isCreated property to see if the flow is created within Genesys Cloud.

Parameters:
Name Type Attributes Default Description
flowName string

the name for the new flow.

flowDescription string <optional>

the description for the new flow.

defaultSupportedLanguage ArchLanguage <optional>
ArchLanguages#englishUnitedStates

the default language to use for the flow.

callbackFunction callbackArchFlowInboundCall <optional>

a callback function to call if the inbound call flow is successfully created. The first parameter passed to the callback function will be the created in-memory flow.

flowDivision ArchDivision <optional>

if specified, the division in which to create the flow. This must be a division where the division's ArchDivision#canAddFlow property returns true. If not specified, the division stored in the ArchFactoryFlows#defaultFlowCreationDivision will be used.

Returns:
Promise -
  • while this method returns a promise, you should use the callback function to perform any processing because the callback will be passed the newly created ArchFlowInboundCall instance.

createFlowInboundChatAsync(flowName, flowDescriptionopt, defaultSupportedLanguageopt, callbackFunctionopt, flowDivisionopt) → {Promise}

Creates a new inbound chat flow in memory. Upon successful creation the callback function that's passed in will be called with the newly created Architect flow scripting object. Calling operations such as ArchBaseFlow#saveAsync and ArchBaseFlow#publishAsync will create these flows in the cloud. Use the ArchBaseFlow#isCreated property to see if the flow is created within Genesys Cloud. The inbound chat flow will have an initial state that is already created which you can access via. the startUpObject property off of the flow. In Scripting the "Inbound Chat" flow type you see in the UI is an inbound chat flow.

Parameters:
Name Type Attributes Default Description
flowName string

the name for the new flow.

flowDescription string <optional>

the description for the new flow.

defaultSupportedLanguage ArchLanguage <optional>
ArchLanguages#englishUnitedStates

the default language to use for the flow.

callbackFunction callbackArchFlowInboundChat <optional>

a callback function to call if the inbound chat flow is successfully created. The first parameter passed to the callback function will be the created in-memory flow.

flowDivision ArchDivision <optional>

if specified, the division in which to create the flow. This must be a division where the division's ArchDivision#canAddFlow property returns true. If not specified, the division stored in the ArchFactoryFlows#defaultFlowCreationDivision will be used.

Returns:
Promise -
  • while this method returns a promise, you should use the callback function to perform any processing because that callback will be passed the newly created ArchFlowInboundChat object instance.

createFlowInboundEmailAsync(flowName, flowDescriptionopt, defaultSupportedLanguageopt, callbackFunctionopt, flowDivisionopt) → {Promise}

Creates a new inbound email flow in memory. Upon successful creation the callback function that's passed in will be called with the newly created Architect flow scripting object. Calling operations such as ArchBaseFlow#saveAsync and ArchBaseFlow#publishAsync will create these flows in the cloud. Use the ArchBaseFlow#isCreated property to see if the flow is created within Genesys Cloud. The inbound email flow will have an initial state that is already created which you can access via. the startUpObject property off of the flow.

Parameters:
Name Type Attributes Default Description
flowName string

the name for the new flow.

flowDescription string <optional>

the description for the new flow.

defaultSupportedLanguage ArchLanguage <optional>
ArchLanguages#englishUnitedStates

the default language to use for the flow.

callbackFunction callbackArchFlowInboundEmail <optional>

a callback function to call if the inbound email flow is successfully created. The first parameter passed to the callback function will be the created in-memory flow.

flowDivision ArchDivision <optional>

if specified, the division in which to create the flow. This must be a division where the division's ArchDivision#canAddFlow property returns true. If not specified, the division stored in the ArchFactoryFlows#defaultFlowCreationDivision will be used.

Returns:
Promise -
  • while this method returns a promise, you should use the callback function to perform any processing because the callback will be passed the newly created ArchFlowInboundEmail instance.

createFlowInboundShortMessageAsync(flowName, flowDescriptionopt, defaultSupportedLanguageopt, callbackFunctionopt, flowDivisionopt) → {Promise}

Creates a new inbound message flow in memory. Upon successful creation the callback function that's passed in will be called with the newly created Architect flow scripting object. Calling operations such as ArchBaseFlow#saveAsync and ArchBaseFlow#publishAsync will create these flows in the cloud. Use the ArchBaseFlow#isCreated property to see if the flow is created within Genesys Cloud. The inbound message flow will have an initial state that is already created which you can access via. the startUpObject property off of the flow. In Scripting the "Inbound Message" flow type you see in the UI is an inbound short message flow.

Parameters:
Name Type Attributes Default Description
flowName string

the name for the new flow.

flowDescription string <optional>

the description for the new flow.

defaultSupportedLanguage ArchLanguage <optional>
ArchLanguages#englishUnitedStates

the default language to use for the flow.

callbackFunction callbackArchFlowInboundShortMessage <optional>

a callback function to call if the inbound message flow is successfully created. The first parameter passed to the callback function will be the created in-memory flow.

flowDivision ArchDivision <optional>

if specified, the division in which to create the flow. This must be a division where the division's ArchDivision#canAddFlow property returns true. If not specified, the division stored in the ArchFactoryFlows#defaultFlowCreationDivision will be used.

Returns:
Promise -
  • while this method returns a promise, you should use the callback function to perform any processing because that callback will be passed the newly created ArchFlowInboundShortMessage object instance.

createFlowInQueueCallAsync(flowName, flowDescriptionopt, defaultSupportedLanguageopt, callbackFunctionopt, flowDivisionopt) → {Promise}

Creates a new in-queue call flow in memory. Upon successful creation the callback function that's passed in will be called with the newly created Architect flow scripting object. Calling operations such as ArchBaseFlow#saveAsync and ArchBaseFlow#publishAsync will create these flows in the cloud. Use the ArchBaseFlow#isCreated property to see if the flow is created within Genesys Cloud.

Parameters:
Name Type Attributes Default Description
flowName string

the name for the new flow.

flowDescription string <optional>

the description for the new flow.

defaultSupportedLanguage ArchLanguage <optional>
ArchLanguages#englishUnitedStates

the default language to use for the flow.

callbackFunction callbackArchFlowInQueueCall <optional>

a callback function to call if the in-queue call flow is successfully created. The first parameter passed to the callback function will be the created in-memory flow.

flowDivision ArchDivision <optional>

if specified, the division in which to create the flow. This must be a division where the division's ArchDivision#canAddFlow property returns true. If not specified, the division stored in the ArchFactoryFlows#defaultFlowCreationDivision will be used.

Returns:
Promise -
  • while this method returns a promise, you should use the callback function to perform any processing because the callback will be passed the newly created ArchFlowInQueueCall instance.

createFlowInQueueEmailAsync(flowName, flowDescriptionopt, defaultSupportedLanguageopt, callbackFunctionopt, flowDivisionopt) → {Promise}

Creates a new in-queue email flow in memory. Upon successful creation the callback function that's passed in will be called with the newly created Architect flow scripting object. Calling operations such as ArchBaseFlow#saveAsync and ArchBaseFlow#publishAsync will create these flows in the cloud. Use the ArchBaseFlow#isCreated property to see if the flow is created within Genesys Cloud.

Parameters:
Name Type Attributes Default Description
flowName string

the name for the new flow.

flowDescription string <optional>

the description for the new flow.

defaultSupportedLanguage ArchLanguage <optional>
ArchLanguages#englishUnitedStates

the default language to use for the flow.

callbackFunction callbackArchFlowInQueueEmail <optional>

a callback function to call if the workItem is successfully created. The first parameter passed to the callback function will be the created in-memory flow.

flowDivision ArchDivision <optional>

if specified, the division in which to create the flow. This must be a division where the division's ArchDivision#canAddFlow property returns true. If not specified, the division stored in the ArchFactoryFlows#defaultFlowCreationDivision will be used.

Returns:
Promise -
  • while this method returns a promise, you should use the callback function to perform any processing because the callback will be passed the newly created ArchFlowInQueueEmail instance.

createFlowInQueueShortMessageAsync(flowName, flowDescriptionopt, defaultSupportedLanguageopt, callbackFunctionopt, flowDivisionopt) → {Promise}

Creates a new in-queue short message flow in memory. Upon successful creation the callback function that's passed in will be called with the newly created Architect flow scripting object. Calling operations such as ArchBaseFlow#saveAsync and ArchBaseFlow#publishAsync will create these flows in the cloud. Use the ArchBaseFlow#isCreated property to see if the flow is created within Genesys Cloud.

Parameters:
Name Type Attributes Default Description
flowName string

the name for the new flow.

flowDescription string <optional>

the description for the new flow.

defaultSupportedLanguage ArchLanguage <optional>
ArchLanguages#englishUnitedStates

the default language to use for the flow.

callbackFunction callbackArchFlowInQueueShortMessage <optional>

a callback function to call if the workItem is successfully created. The first parameter passed to the callback function will be the created in-memory flow.

flowDivision ArchDivision <optional>

if specified, the division in which to create the flow. This must be a division where the division's ArchDivision#canAddFlow property returns true. If not specified, the division stored in the ArchFactoryFlows#defaultFlowCreationDivision will be used.

Returns:
Promise -
  • while this method returns a promise, you should use the callback function to perform any processing because the callback will be passed the newly created ArchFlowInQueueShortMessage instance.

createFlowOutboundCallAsync(flowName, flowDescriptionopt, defaultSupportedLanguageopt, callbackFunctionopt, flowDivisionopt) → {Promise}

Creates a new outbound call flow in memory. Upon successful creation the callback function that's passed in will be called with the newly created Architect flow scripting object. Calling operations such as ArchBaseFlow#saveAsync and ArchBaseFlow#publishAsync will create these flows in the cloud. Use the ArchBaseFlow#isCreated property to see if the flow is created within Genesys Cloud.

Parameters:
Name Type Attributes Default Description
flowName string

the name for the new flow.

flowDescription string <optional>

the description for the new flow.

defaultSupportedLanguage ArchLanguage <optional>
ArchLanguages#englishUnitedStates

the default language to use for the flow.

callbackFunction callbackArchFlowOutboundCall <optional>

a callback function to call if the outbound call flow is successfully created. The first parameter passed to the callback function will be the created in-memory flow.

flowDivision ArchDivision <optional>

if specified, the division in which to create the flow. This must be a division where the division's ArchDivision#canAddFlow property returns true. If not specified, the division stored in the ArchFactoryFlows#defaultFlowCreationDivision will be used.

Returns:
Promise -
  • while this method returns a promise, you should use the callback function to perform any processing because the callback will be passed the newly created ArchFlowOutboundCall instance.

createFlowSecureCallAsync(flowName, flowDescriptionopt, defaultSupportedLanguageopt, callbackFunctionopt, flowDivisionopt) → {Promise}

Creates a new secure call flow in memory. Upon successful creation the callback function that's passed in will be called with the newly created Architect flow scripting object. Calling operations such as ArchBaseFlow#saveAsync and ArchBaseFlow#publishAsync will create these flows in the cloud. Use the ArchBaseFlow#isCreated property to see if the flow is created within Genesys Cloud.

Parameters:
Name Type Attributes Default Description
flowName string

the name for the new flow.

flowDescription string <optional>

the description for the new flow.

defaultSupportedLanguage ArchLanguage <optional>
ArchLanguages#englishUnitedStates

the default language to use for the flow.

callbackFunction callbackArchFlowSecureCall <optional>

a callback function to call if the secure call flow is successfully created. The first parameter passed to the callback function will be the created in-memory flow.

flowDivision ArchDivision <optional>

if specified, the division in which to create the flow. This must be a division where the division's ArchDivision#canAddFlow property returns true. If not specified, the division stored in the ArchFactoryFlows#defaultFlowCreationDivision will be used.

Returns:
Promise -
  • while this method returns a promise, you should use the callback function to perform any processing because the callback will be passed the newly created ArchFlowSecureCall instance.

createFlowSurveyInviteAsync(flowName, flowDescriptionopt, defaultSupportedLanguageopt, callbackFunctionopt, flowDivisionopt) → {Promise}

Creates a new survey invite flow in memory. Upon successful creation the callback function that's passed in will be called with the newly created Architect flow scripting object. Calling operations such as ArchBaseFlow#saveAsync and ArchBaseFlow#publishAsync will create these flows in the cloud. Use the ArchBaseFlow#isCreated property to see if the flow is created within Genesys Cloud. The survey invite flow will have an initial state that is already created which you can access via. the startUpObject property off of the flow.

Parameters:
Name Type Attributes Default Description
flowName string

the name for the new flow.

flowDescription string <optional>

the description for the new flow.

defaultSupportedLanguage ArchLanguage <optional>
ArchLanguages#englishUnitedStates

the default language to use for the flow.

callbackFunction callbackArchFlowSurveyInvite <optional>

a callback function to call if the in survey invite flow is successfully created. The first parameter passed to the callback function will be the created in-memory flow.

flowDivision ArchDivision <optional>

if specified, the division in which to create the flow. This must be a division where the division's ArchDivision#canAddFlow property returns true. If not specified, the division stored in the ArchFactoryFlows#defaultFlowCreationDivision will be used.

Returns:
Promise -
  • while this method returns a promise, you should use the callback function to perform any processing because the callback will be passed the newly created ArchFlowSurveyInvite instance.

createFlowVoicemailAsync(flowName, flowDescriptionopt, defaultSupportedLanguageopt, callbackFunctionopt, flowDivisionopt) → {Promise}

Creates a new voicemail flow in memory. Upon successful creation the callback function that's passed in will be called with the newly created Architect flow scripting object. The voicemail flow will have an initial state that is already created which you can access via. the startUpObject property off of the flow. If you attempt to perform any operation such as a ArchBaseFlow#saveAsync or ArchBaseFlow#createAsync, Architect Scripting will exit with an error as they are not creatable in the cloud. The ArchDefinitionFlow#isCreatable property returns whether a flow type is creatable in the cloud.

Parameters:
Name Type Attributes Default Description
flowName string

the name for the new flow.

flowDescription string <optional>

the description for the new flow.

defaultSupportedLanguage ArchLanguage <optional>
ArchLanguages#englishUnitedStates

the default language to use for the flow.

callbackFunction callbackArchFlowVoicemail <optional>

a callback function to call if the voicemail flow is successfully created. The first parameter passed to the callback function will be the created in-memory flow.

flowDivision ArchDivision <optional>

if specified, the division in which to create the flow. This must be a division where the division's ArchDivision#canAddFlow property returns true. If not specified, the division stored in the ArchFactoryFlows#defaultFlowCreationDivision will be used.

Returns:
Promise -
  • while this method returns a promise, you should use the callback function to perform any processing because the callback will be passed the newly created ArchFlowVoicemail instance.

createFlowWorkflowAsync(flowName, flowDescriptionopt, defaultSupportedLanguageopt, callbackFunctionopt, flowDivisionopt) → {Promise}

Creates a new workflow flow in memory. Upon successful creation the callback function that's passed in will be called with the newly created Architect flow scripting object. Calling operations such as ArchBaseFlow#saveAsync and ArchBaseFlow#publishAsync will create these flows in the cloud. Use the ArchBaseFlow#isCreated property to see if the flow is created within Genesys Cloud. The workflow will have an initial state that is already created which you can access via. the startUpObject property off of the flow.

Parameters:
Name Type Attributes Default Description
flowName string

the name for the new flow.

flowDescription string <optional>

the description for the new flow.

defaultSupportedLanguage ArchLanguage <optional>
ArchLanguages#englishUnitedStates

the default language to use for the flow.

callbackFunction callbackArchFlowWorkflow <optional>

a callback function to call if the workflow is successfully created. The first parameter passed to the callback function will be the created in-memory flow.

flowDivision ArchDivision <optional>

if specified, the division in which to create the flow. This must be a division where the division's ArchDivision#canAddFlow property returns true. If not specified, the division stored in the ArchFactoryFlows#defaultFlowCreationDivision will be used.

Returns:
Promise -
  • while this method returns a promise, you should use the callback function to perform any processing because the callback will be passed the newly created ArchFlowWorkflow instance.

getFlowInfoByFlowIdAsync(flowId, flowType, callbackFunctionopt) → {Promise}

Searches for a flow with a given id and type. If found, this returns a flow information instance for it to the supplied callback function.

Parameters:
Name Type Attributes Description
flowId string

the identifier of the flow to find.

flowType string

the flow type. The string values in ArchEnums#FLOW_TYPES list valid values.

callbackFunction callbackArchFlowInfoBasic <optional>

a callback function to call if the flow can be found on the server by id. The first parameter passed to the callback function will be the Architect Scripting flow basic information instance.

Returns:
Promise -
  • while this method returns a promise, you should use the callback function to perform any processing because the callback will be passed the ArchFlowInfoBasic instance.

getFlowInfoByFlowNameAsync(flowName, flowType, callbackFunctionopt) → {Promise}

Searches for a flow with a given name and if found returns a flow information instance for it to the supplied callback function.

Parameters:
Name Type Attributes Description
flowName string

name of the flow.

flowType string

the flow type. The string values in ArchEnums#FLOW_TYPES list valid values.

callbackFunction callbackArchFlowInfoBasic <optional>

a callback function to call if the flow can be found on the server by name. The first parameter passed to the callback function will be the Architect Scripting flow basic information instance.

Returns:
Promise -
  • while this method returns a promise, you should use the callback function to perform any processing because the callback will be passed the ArchFlowInfoBasic instance.

isFilterMatch(archFilterObject) → {boolean}

Returns whether or not this Architect Scripting object is a match for the supplied ArchFilterObject instance.

Parameters:
Name Type Description
archFilterObject ArchFilterObject

the object filter to use to determine if it's a match.

Returns:
boolean
Inherited From:

loadFlowByFlowIdAsync(flowId, flowType, flowVersionopt, callbackFunctionopt) → {Promise}

Loads a flow with a given id and if found returns an ArchBaseFlow instance for it to the supplied callback function.

Parameters:
Name Type Attributes Default Description
flowId string

the flow identifier.

flowType string

the flow type. The string values in ArchEnums#FLOW_TYPES list valid values.

flowVersion string <optional>
"latest"

the version of the flow to get. Valid values are "latest" to get the latest saved configuration of a flow, a version value such as "2.0" or "2", "debug" to get the currently published debug version configuration of a flow, or "published" to get the currently published version configuration of a flow. If you do not specify a version, then the latest saved configuration will be loaded.

callbackFunction callbackArchBaseFlow <optional>

a callback function to call if the flow can be found on the server by id and type. The first parameter passed to the callback function will be the Architect Scripting flow instance.

Returns:
Promise -
  • while this method returns a promise, you should use the callback function to perform any processing because that callback will be passed the ArchBaseFlow instance.

loadFlowByFlowInfoAsync(archFlowInfo, flowVersionopt, callbackFunctionopt) → {Promise}

Loads a flow given an ArchFlowInfo and returns an ArchBaseFlow instance for it to the supplied callback function.

Parameters:
Name Type Attributes Default Description
archFlowInfo ArchFlowInfo

flow information for the flow which you wish to load.

flowVersion string <optional>
"latest"

the version of the flow to get. Valid values are "latest" to get the latest saved configuration of a flow, a version value such as "2.0" or "2", "debug" to get the currently published debug version configuration of a flow, or "published" to get the currently published version configuration of a flow. If you do not specify a version, then the latest saved configuration will be loaded.

callbackFunction callbackArchBaseFlow <optional>

a callback function to call if the flow can be found on the server by flow info. The first parameter passed to the callback function will be the Architect Scripting flow instance.

Returns:
Promise -
  • while this method returns a promise, you should use the callback function to perform any processing because the callback will be passed the ArchBaseFlow instance.

loadFlowByFlowNameAsync(flowName, flowType, flowVersionopt, callbackFunctionopt) → {Promise}

Loads a flow with a given name and if found returns an ArchBaseFlow instance for it to the supplied callback function.

Parameters:
Name Type Attributes Default Description
flowName string

name of the flow.

flowType string

the flow type. The string values in ArchEnums#FLOW_TYPES list valid values.

flowVersion string <optional>
"latest"

the version of the flow to get. Valid values are "latest" to get the latest saved configuration of a flow, a version value such as "2.0" or "2", "debug" to get the currently published debug version configuration of a flow, or "published" to get the currently published version configuration of a flow. If you do not specify a version, then the latest saved configuration will be loaded.

callbackFunction callbackArchBaseFlow <optional>

a callback function to call if the flow can be found on the server by name and type. The first parameter passed to the callback function will be the Architect Scripting flow instance.

Returns:
Promise -
  • while this method returns a promise, you should use the callback function to perform any processing because the callback will be passed the ArchBaseFlow instance.

loadFlowDefaultInQueueCallAsync(flowVersionopt, callbackFunctionopt) → {Promise}

Loads the default in-queue call flow and if successful returns an ArchFlowInQueueCall instance for it to the supplied callback function.

Parameters:
Name Type Attributes Default Description
flowVersion string <optional>
"latest"

the version of the default in-queue flow to get. Valid values are "latest" to get the latest saved configuration of a flow, a version value such as "2.0" or "2", "debug" to get the currently published debug version configuration of a flow, or "published" to get the currently published version configuration of a flow. If you do not specify a version, then the latest saved configuration will be loaded.

callbackFunction callbackArchFlowInQueueCall <optional>

a callback function to call if the flow can be loaded. The first parameter passed to the callback function will be the Architect Scripting flow instance.

Returns:
Promise -
  • while this method returns a promise, you should use the callback function to perform any processing because that callback will be passed the ArchFlowInQueueCall instance.

loadFlowDefaultVoicemailAsync(flowVersionopt, callbackFunctionopt) → {Promise}

Loads the default voicemail flow and if successful returns an ArchFlowVoicemail instance for it to the supplied callback function.

Parameters:
Name Type Attributes Default Description
flowVersion string <optional>
"latest"

the version of the flow to get. Valid values are "latest" to get the latest saved configuration of a flow, a version value such as "2.0" or "2", "debug" to get the currently published debug version configuration of a flow, or "published" to get the currently published version configuration of a flow. If you do not specify a version, then the latest saved configuration will be loaded.

callbackFunction callbackArchFlowVoicemail <optional>

a callback function to call if the flow can be found on the server by id and type. The first parameter passed to the callback function will be the Architect Scripting flow instance.

Returns:
Promise -
  • while this method returns a promise, you should use the callback function to perform any processing because that callback will be passed the ArchBaseFlow instance.

logError(errorStr)

Logs an error to the logging service with a log header from this object's logStr property value when ArchLogging#logErrors is true.

Parameters:
Name Type Description
errorStr string

the error string to log.

Inherited From:

logErrorAndThrow(errorStr)

Logs an error to the logging service with a log header from this object's logStr property value when ArchLogging#logErrors is true and then throws the string in the errorStr parameter.

Parameters:
Name Type Description
errorStr string

the error string to log. This should be a non-blank string.

Throws:
  • Throws the submitted error string.
Inherited From:

logNote(noteStr)

Logs a note to the logging service with a log header from this object's logStr property value when ArchLogging#logNotes is true.

Parameters:
Name Type Description
noteStr string

the note string to log. This should be a non-blank string.

Inherited From:

logNoteVerbose(noteStr)

Logs a note to the logging service with a log header from this object's logStr property value when ArchLogging#logNotesVerbose is true.

Parameters:
Name Type Description
noteStr string

the note string to log. This should be a non-blank string.

Inherited From:

logWarning(warningStr)

Logs a warning to the logging service with a log header from this object's logStr property value when ArchLogging#logWarnings is true.

Parameters:
Name Type Description
warningStr string

the warning string to log. This should be a non-blank string.

Inherited From:

unlockFlowByFlowIdAsync(flowId, flowType, callbackFunctionopt) → {Promise}

Unlock a flow with a given id. This function passes an ArchFlowInfoBasic instance for it to the supplied callback function.

Parameters:
Name Type Attributes Description
flowId string

the flow identifier.

flowType string

the flow type. The string values in ArchEnums#FLOW_TYPES list valid values.

callbackFunction callbackArchFlowInfoBasic <optional>

a callback function to call if the flow can be found on the server by id and type. The first parameter passed to the callback function will be the Architect Scripting flow basic information instance.

Returns:
Promise -
  • while this method returns a promise, you should use the callback function to perform any processing because the callback will be passed the ArchFlowInfoBasic instance.

unlockFlowByFlowInfoAsync(archFlowInfo, callbackFunctionopt) → {Promise}

Unlock the flow for a given flow info basic object. This function passes an ArchFlowInfoBasic instance for it to the supplied callback function.

Parameters:
Name Type Attributes Description
archFlowInfo ArchFlowInfo

flow information for the flow which you wish to edit.

callbackFunction callbackArchFlowInfoBasic <optional>

a callback function to call if the flow can be found on the server by flow info. The first parameter passed to the callback function will be the Architect Scripting flow basic information instance.

Returns:
Promise -
  • while this method returns a promise, you should use the callback function to perform any processing because the callback will be passed the ArchFlowInfoBasic instance.

unlockFlowByFlowNameAsync(flowName, flowType, callbackFunctionopt) → {Promise}

Unlock a flow for the given flow name. This function passes an ArchFlowInfoBasic instance for it to the supplied callback function.

Parameters:
Name Type Attributes Description
flowName string

name of the flow.

flowType string

the flow type. The string values in ArchEnums#FLOW_TYPES list valid values.

callbackFunction callbackArchFlowInfoBasic <optional>

a callback function to call if the flow can be found on the server by name. The first parameter passed to the callback function will be the Architect Scripting flow basic information instance.

Returns:
Promise -
  • while this method returns a promise, you should use the callback function to perform any processing because the callback will be passed the ArchFlowInfoBasic instance.