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 Scriptingsession
is notconnected
or for an organization that does notsupport divisions
will return nothing. Attempting to set the default flow creation division when the Architect Scriptingsession
is notconnected
or an organization that does notsupport 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
-
static createFlowVoiceSurveyAsync(flowName, flowDescriptionopt, defaultSupportedLanguageopt, callbackFunctionopt, flowDivisionopt, creationDataopt, surveyFormNameopt, surveyFormIdopt, createNluFromSurveyFormopt, configureFlowFromSurveyFormopt) → {Promise.<ArchFlowVoiceSurvey>}
-
Creates a new
voiceSurvey
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 asArchBaseFlow#saveAsync
andArchBaseFlow#publishAsync
will create these flows in the cloud. Use theArchBaseFlow#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
function <optional>
a callback function to call if the voice survey 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 theArchFactoryFlows#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.
surveyFormName
string <optional>
The name of the survey form to generate the flow from. If a surveyFormName and surveyFormId is provided, flow creation will fail. If a survey form name is provided both here and in creationData, this will take priority.
surveyFormId
string <optional>
The ID of the survey form to generate the flow from. If a surveyFormName and surveyFormId is provided, flow creation will fail. If a survey form ID is provided both here and in creationData, this will take priority.
createNluFromSurveyForm
boolean <optional>
Whether to auto-generate the NLU domain version from the supplied survey form. If this parameter is not 'true', the supplied nluDomainVersion must contain a complete representation of a survey form, including all the necessary slots and slot types required for each question in the form. If a value of 'false' is supplied or this parameter is not set and the provided nluDomainVersion does not include all slots and slot types required by the survey, flow creation will fail.
configureFlowFromSurveyForm
boolean <optional>
Whether to auto-generate the flow configuration from the supplied survey form. If this parameter is 'true', the flow configuration will include actions configured in the flow automatically. If the parameter is not 'true', the flow configuration will not include any pre-configured actions and will need to be configured manually.
Returns:
Promise.<ArchFlowVoiceSurvey> --
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
ArchFlowVoiceSurvey
instance.
-
-
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.
- while this method returns a promise, you should use the callback function to perform any processing because the callback will be passed the
-
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.
- while this method returns a promise, you should use the callback function to perform any processing because that callback will be passed the
-
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.
- while this method returns a promise, you should use the callback function to perform any processing because the callback will be passed the
-
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.
- while this method returns a promise, you should use the callback function to perform any processing because the callback will be passed the
-
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.
- while this method returns a promise, you should use the callback function to perform any processing because the callback will be passed the
-
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 asArchBaseFlow#saveAsync
andArchBaseFlow#publishAsync
will create these flows in the cloud. Use theArchBaseFlow#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 calledArchBaseFlow#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 theArchFactoryFlows#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.
- 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
-
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 asArchBaseFlow#saveAsync
andArchBaseFlow#publishAsync
will create these flows in the cloud. Use theArchBaseFlow#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 theArchFactoryFlows#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.
- 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
-
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 asArchBaseFlow#saveAsync
andArchBaseFlow#publishAsync
will create these flows in the cloud. Use theArchBaseFlow#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 calledArchBaseFlow#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 theArchFactoryFlows#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.
- 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
-
createFlowFromDefinitionAsync(archDefinitionFlow, flowName, flowDescriptionopt, defaultSupportedLanguageopt, callbackFunctionopt, flowDivisionopt, creationDataopt, compatibleFlowTypesopt, createNluFromSurveyFormopt) → {Promise}
-
Creates a new flow instance in memory from the specified flow definition. Calling operations such as
ArchBaseFlow#saveAsync
andArchBaseFlow#publishAsync
will create these flows in the cloud. Use theArchBaseFlow#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 theArchFactoryFlows#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.
createNluFromSurveyForm
boolean <optional>
Whether to auto-generate the NLU domain version from the supplied survey form.
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.
- 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
-
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 asArchBaseFlow#saveAsync
andArchBaseFlow#publishAsync
will create these flows in the cloud. Use theArchBaseFlow#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 theArchFactoryFlows#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.
- 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
-
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 asArchBaseFlow#saveAsync
andArchBaseFlow#publishAsync
will create these flows in the cloud. Use theArchBaseFlow#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. thestartUpObject
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 theArchFactoryFlows#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.
- 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
-
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 asArchBaseFlow#saveAsync
andArchBaseFlow#publishAsync
will create these flows in the cloud. Use theArchBaseFlow#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. thestartUpObject
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 theArchFactoryFlows#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.
- 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
-
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 asArchBaseFlow#saveAsync
andArchBaseFlow#publishAsync
will create these flows in the cloud. Use theArchBaseFlow#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. thestartUpObject
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 theArchFactoryFlows#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.
- 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
-
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 asArchBaseFlow#saveAsync
andArchBaseFlow#publishAsync
will create these flows in the cloud. Use theArchBaseFlow#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 theArchFactoryFlows#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.
- 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
-
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 asArchBaseFlow#saveAsync
andArchBaseFlow#publishAsync
will create these flows in the cloud. Use theArchBaseFlow#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 theArchFactoryFlows#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.
- 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
-
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 asArchBaseFlow#saveAsync
andArchBaseFlow#publishAsync
will create these flows in the cloud. Use theArchBaseFlow#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 theArchFactoryFlows#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.
- 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
-
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 asArchBaseFlow#saveAsync
andArchBaseFlow#publishAsync
will create these flows in the cloud. Use theArchBaseFlow#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 theArchFactoryFlows#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.
- 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
-
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 asArchBaseFlow#saveAsync
andArchBaseFlow#publishAsync
will create these flows in the cloud. Use theArchBaseFlow#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 theArchFactoryFlows#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.
- 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
-
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 asArchBaseFlow#saveAsync
andArchBaseFlow#publishAsync
will create these flows in the cloud. Use theArchBaseFlow#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. thestartUpObject
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 theArchFactoryFlows#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.
- 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
-
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. thestartUpObject
property off of the flow. If you attempt to perform any operation such as aArchBaseFlow#saveAsync
orArchBaseFlow#createAsync
, Architect Scripting will exit with an error as they are not creatable in the cloud. TheArchDefinitionFlow#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 theArchFactoryFlows#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.
- 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
-
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 asArchBaseFlow#saveAsync
andArchBaseFlow#publishAsync
will create these flows in the cloud. Use theArchBaseFlow#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. thestartUpObject
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 theArchFactoryFlows#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.
- 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
-
createFlowWorkitemAsync(flowName, flowDescriptionopt, defaultSupportedLanguageopt, callbackFunctionopt, flowDivisionopt, creationDataopt, worktypeNameopt, worktypeIdopt, configureFlowFromWorktypeopt) → {Promise.<ArchFlowWorkitem>}
-
Creates a new
workitem
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 asArchBaseFlow#saveAsync
andArchBaseFlow#publishAsync
will create these flows in the cloud. Use theArchBaseFlow#isCreated
property to see if the flow is created within Genesys Cloud. The workitem flow will have an initial state that is already created which you can access via. thestartUpObject
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
callbackArchFlowWorkitem <optional>
a callback function to call if the workitem 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 theArchFactoryFlows#defaultFlowCreationDivision
will be used.creationData
WorkitemCreationData <optional>
An alternative way of passing the worktypeName or worktypeId for the worktype.
worktypeName
string <optional>
The name of the worktype to generate the workitem flow. If a worktypeName and worktypeId are provided, flow creation will fail. If a worktype name is provided both here and in creationData, this will take priority.
worktypeId
string <optional>
The ID of the worktype to generate the workitem from. If a worktypeName and worktypeId are provided, flow creation will fail. If a worktype ID is provided both here and in creationData, this will take priority.
configureFlowFromWorktype
boolean <optional>
Whether to auto-generate the flow configuration from the supplied worktype. If this parameter is 'true', the flow configuration will include actions configured in the flow automatically. If the parameter is not 'true', the flow configuration will not include any pre-configured actions and will need to be configured manually.
Returns:
Promise.<ArchFlowWorkitem> -- 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
ArchFlowWorkitem
instance.
- 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
-
getFlowInfoByFlowIdAsync(flowId, flowType, callbackFunctionopt) → {Promise.<ArchFlowInfo>}
-
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.<ArchFlowInfo> -- while this method returns a promise, you should use the callback function to perform any processing because the callback will be passed the
ArchFlowInfo
instance.
- while this method returns a promise, you should use the callback function to perform any processing because the callback will be passed the
-
getFlowInfoByFlowNameAsync(flowName, flowType, callbackFunctionopt) → {Promise.<ArchFlowInfo>}
-
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.<ArchFlowInfo> -- while this method returns a promise, you should use the callback function to perform any processing because the callback will be passed the
ArchFlowInfo
instance.
- while this method returns a promise, you should use the callback function to perform any processing because the callback will be passed the
-
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.
- while this method returns a promise, you should use the callback function to perform any processing because the callback will be passed the
-
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.
- while this method returns a promise, you should use the callback function to perform any processing because the callback will be passed the
-
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 whenArchLogging#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 whenArchLogging#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 whenArchLogging#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 whenArchLogging#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 whenArchLogging#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.
- while this method returns a promise, you should use the callback function to perform any processing because the callback will be passed the
-
unlockFlowByFlowInfoAsync(archFlowInfo, callbackFunctionopt) → {Promise}
-
Unlock the flow for a given
flow info basic
object. This function passes anArchFlowInfoBasic
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.
- while this method returns a promise, you should use the callback function to perform any processing because the callback will be passed the
-
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.
- while this method returns a promise, you should use the callback function to perform any processing because the callback will be passed the