ArchActionTransferToVoicemail(coreTransferToVoiceMailViewModel)

new ArchActionTransferToVoicemail(coreTransferToVoiceMailViewModel)

The Architect Scripting class for the Transfer to User action. Instances of this action should be created by calling ArchFactoryActions#addActionTransferToVoicemail In order to work with this action, the easiest thing is to do is set the transfer target type to the desired mode before attempting to set settings on the action as it will enable / disable the properties that can be set appropriately. See the transfer target type property on how to configure this action to transfer to a user's voicemail or a queue's voicemail.

Parameters:
Name Type Description
coreTransferToVoiceMailViewModel TransferVoicemailAction

( Internal ) an Architect core transfer to user action view model.

See:

Extends

Members

static, readonly displayTypeName :string

Returns the display type name string 'ArchActionTransferToVoicemail'.

static, readonly isArchActionTransferToVoicemail :boolean

Returns true indicating that this is an ArchActionTransferToVoicemail instance.

readonly callbackNumber :ArchValuePhoneNumber

The suggested phone number to use for the voicemail callback. This will be validated / used at runtime when the ArchActionTransferToVoicemail#transferTargetType is:

  • 'queue' Note: Do not attempt to set a value for this property if the transfer type is not set to a value listed above as it will not be writable and throw an error if you attempt to do so.

readonly calleeName :ArchValueString

The suggested phone number to use for the voicemail callback. This will be validated / used at runtime when the ArchActionTransferToVoicemail#transferTargetType is:

  • 'queue' Note: Do not attempt to set a value for this property if the transfer type is not set to a value listed above as it will not be writable and throw an error if you attempt to do so.

readonly failureOutputs :ArchNamedValueList

List of properties with error information about failed transfers

Inherited From:

readonly failureTransferAudio :ArchAudio

The failure transfer audio to play on the call in the even the transfer fails at runtime.

Inherited From:

readonly preTransferAudio :ArchAudio

The pre transfer audio to play on the call.

Inherited From:

readonly scriptInputs :ArchNamedValueList

The inputs for the Composer script configured on this action. See ArchActionTransferToVoicemail#setScriptByNameAsync or ArchActionTransferToVoicemail#setScriptByIdAsync to set the script. This will be validated / used at runtime when the ArchActionTransferToVoicemail#transferTargetType is:

  • 'queue' Note: Do not attempt to set a value inputs on the selected script the transfer type is not set to a value listed above as it will not be writable and throw an error if you attempt to do so.

readonly targetGroup :ArchValueGroup

The group whose voicemail you want to transfer to at runtime. This will be validated / used at runtime when the ArchActionTransferToVoicemail#transferTargetType is:

  • 'group' Note: Do not attempt to set a value for this property if the transfer type is not set to a value listed above as it will not be writable and throw an error if you attempt to do so.

readonly targetQueue :ArchValueQueue

The queue whose voicemail you want to transfer to at runtime. This will be validated / used at runtime when the ArchActionTransferToVoicemail#transferTargetType is:

  • 'queue' Note: Do not attempt to set a value for this property if the transfer type is not set to a value listed above as it will not be writable and throw an error if you attempt to do so.

readonly targetUser :ArchValueUser

The user whose voicemail you want to transfer to at runtime. This will be validated / used at runtime when the ArchActionTransferToVoicemail#transferTargetType is:

  • 'user' Note: Do not attempt to set a value for this property if the transfer type is not set to a value listed above as it will not be writable and throw an error if you attempt to do so.

transferTargetType :string

The transfer target type on the Transfer to Voicemail action. The string values in ArchEnums#VOICEMAIL_TRANSFER_TARGET_TYPES lists valid transfer target type values. The default setting will be to transfer to a user's voicemail.

readonly voicemailGreeting :ArchAudio

The voicemail audio to play on the call after the pre-transfer audio is played.

  • This will be validated / used at runtime when the ArchActionTransferToVoicemail#transferTargetType is:
  • 'queue' Note: Do not attempt to set a value for this property if the transfer type is not set to a value listed above as it will not be writable and throw an error if you attempt to do so.

Methods

isTargetTransferTypeAvailable(transferTargetType, allowAnyLanguageopt) → {boolean}

Checks to see if the supplied transfer target type is available for either the supported languages configured on the parent flow or for any Architect language. The string values in ArchEnums#VOICEMAIL_TRANSFER_TARGET_TYPES list valid voicemail target type values.

Parameters:
Name Type Attributes Description
transferTargetType string

a value from ArchEnums#VOICEMAIL_TRANSFER_TARGET_TYPES

allowAnyLanguage boolean <optional>

if true, the check is made against all Architect languages instead of flow supported languages.

Returns:
boolean

setScriptByIdAsync(scriptId, callbackFunctionopt) → {Promise.<ArchActionTransferToVoicemail>}

This sets the Composer script to associate with the voicemail transfer by the script id. Remember this script needs to be a script with the Voicemail feature set on it to be valid. This will be validated / used at runtime when the ArchActionTransferToVoicemail#transferTargetType is: 'queue'

Parameters:
Name Type Attributes Description
scriptId string

the name of the voicemail script to set.

callbackFunction callbackArchActionTransferToVoicemail <optional>

a function to call if the voicemail script is successfully looked up and configured on this action. The first parameter passed to the callback function will be this Transfer to Voicemail instance.

Returns:
Promise.<ArchActionTransferToVoicemail>

setScriptByNameAsync(scriptName, callbackFunctionopt) → {Promise.<ArchActionTransferToVoicemail>}

This sets the Composer script to associate with the voicemail transfer by the script name. Remember this script needs to be a script with the Voicemail feature set on it to be valid. This will be validated / used at runtime when the ArchActionTransferToVoicemail#transferTargetType is:

  • 'queue'
Parameters:
Name Type Attributes Description
scriptName string

the name of the voicemail script to set.

callbackFunction callbackArchActionTransferToVoicemail <optional>

a function to call if the voicemail script is successfully looked up and configured on this action. The first parameter passed to the callback function will be this Transfer to Voicemail instance.

Returns:
Promise.<ArchActionTransferToVoicemail>

setTargetGroupLiteralByGroupIdAsync(groupId, callbackFunctionopt) → {Promise.<ArchActionTransferToVoicemail>}

Sets the voicemail to transfer to the specified group by id and if the group exists then ArchActionTransferToVoicemail#transferTargetType will be set to 'group'. Note: Do not attempt to set a value for this property if the transfer type is not set to a value listed above as it will not be writable and throw an error if you attempt to do so.

Parameters:
Name Type Attributes Description
groupId string

the group id for the voicemail transfer.

callbackFunction callbackArchActionTransferToVoicemail <optional>

a callback function to call if the group is successfully looked up and configured on this action. The first parameter passed to the callback function will be this transfer to voicemail instance.

Returns:
Promise.<ArchActionTransferToVoicemail>

setTargetGroupLiteralByGroupNameAsync(groupName, callbackFunctionopt) → {Promise.<ArchActionTransferToVoicemail>}

Sets the voicemail to transfer to the specified group by name and if the group exists then ArchActionTransferToVoicemail#transferTargetType will be set to 'group'. Note: Do not attempt to set a value for this property if the transfer type is not set to a value listed above as it will not be writable and throw an error if you attempt to do so.

Parameters:
Name Type Attributes Description
groupName string

the group name for the voicemail transfer.

callbackFunction callbackArchActionTransferToVoicemail <optional>

a callback function to call if the group is successfully looked up and configured on this action. The first parameter passed to the callback function will be this transfer to voicemail instance.

Returns:
Promise.<ArchActionTransferToVoicemail>

setTargetQueueLiteralByQueueIdAsync(queueId, callbackFunctionopt) → {Promise.<any>}

Sets the voicemail to transfer to the specified queue by id and if the queue exists then ArchActionTransferToVoicemail#transferTargetType will be set to 'queue'. Note: Do not attempt to set a value for this property if the transfer type is not set to a value listed above as it will not be writable and throw an error if you attempt to do so. Also, the target queue cannot be set when this action is used within an in-queue call flow.

Parameters:
Name Type Attributes Description
queueId string

the queue id for the voicemail transfer.

callbackFunction callbackArchActionTransferToVoicemail <optional>

a callback function to call if the queue is successfully looked up and configured on this action. The first parameter passed to the callback function will be this transfer to voicemail instance.

Returns:
Promise.<any>

setTargetQueueLiteralByQueueNameAsync(queueName, callbackFunctionopt) → {Promise.<ArchActionTransferToVoicemail>}

Sets the voicemail to transfer to the specified queue by name and if the queue exists then ArchActionTransferToVoicemail#transferTargetType will be set to 'queue'. Note: Do not attempt to set a value for this property if the transfer type is not set to a value listed above as it will not be writable and throw an error if you attempt to do so. Also, the target queue cannot be set when this action is used within an in-queue call flow.

Parameters:
Name Type Attributes Description
queueName string

the queue name for the voicemail transfer.

callbackFunction callbackArchActionTransferToVoicemail <optional>

a callback function to call if the queue is successfully looked up and configured on this action. The first parameter passed to the callback function will be this transfer to voicemail instance.

Returns:
Promise.<ArchActionTransferToVoicemail>

setTargetUserLiteralByUserIdAsync(userId, callbackFunctionopt) → {Promise.<ArchActionTransferToVoicemail>}

Sets the voicemail to transfer to the specified user by id and if the user exists then ArchActionTransferToVoicemail#transferTargetType will be set to 'user'. Note: Do not attempt to set a value for this property if the transfer type is not set to a value listed above as it will not be writable and throw an error if you attempt to do so.

Parameters:
Name Type Attributes Description
userId string

the identifier of the user.

callbackFunction callbackArchActionTransferToVoicemail <optional>

a callback function to call if the user is successfully looked up and configured on this action. The first parameter passed to the callback function will be this transfer to voicemail instance.

Returns:
Promise.<ArchActionTransferToVoicemail>

setTargetUserLiteralByUserNameAsync(userName, callbackFunctionopt) → {Promise.<ArchActionTransferToVoicemail>}

Sets the voicemail to transfer to the specified user by name and if the user exists then ArchActionTransferToVoicemail#transferTargetType will be set to 'user'. Note: Do not attempt to set a value for this property if the transfer type is not set to a value listed above as it will not be writable and throw an error if you attempt to do so.

Parameters:
Name Type Attributes Description
userName string

the username for the user ( i.e. the user's email ).

callbackFunction callbackArchActionTransferToVoicemail <optional>

a callback function to call if the user is successfully looked up and configured on this action. The first parameter passed to the callback function will be this transfer to voicemail instance.

Returns:
Promise.<ArchActionTransferToVoicemail>