ArchActionGetResponse(coreGetResponseViewModel)

new ArchActionGetResponse(coreGetResponseViewModel)

The Architect Scripting class for the Get Response action. Instances of this action should be created by calling ArchFactoryActions#addActionGetResponse

Parameters:
Name Type Description
coreGetResponseViewModel Object

( Internal ) an Architect core response view model.

See:

Extends

Members

static, readonly displayTypeName :string

Returns the display type name string 'ArchActionGetResponse'.

readonly isArchActionGetResponse :boolean

Returns true indicating that this is an ArchActionGetResponse instance.

readonly isSelectedResponseInSelectedResponseLibrary :boolean

Returns whether or not the response set on this action is in the response library set on this action. Both the response and the library have to be valid in order for this to return true.

readonly outputSuccess :ArchActionOutput

The success output for this action

Inherited From:

performSubstitutions :boolean

The perform substitutions boolean to determine if the substitution mappings should be used at execution time.

readonly responseBodyHandling :ArchValueString

Determines the response body handling behavior of the Get Response action at runtime when a canned response is retrieved and if formatting should be removed from the returned String value or converted to Markdown in a bot or digital bot flow. The string values in ArchEnums#STRING_BODY_HANDLING_TYPES list valid values.

readonly responseSubstitutions :ArchNamedValueList

The contents of this named value list come from the selected response's reported substitution schema. The name value pair items in this list will let you assign values that will be used as substitutions to the response at runtime. Note that this named value list may be undefined even if a valid response is specified on the action. If no response is specified on this action, this will return undefined.

readonly valueResponseBody :ArchValueString

The value that will hold the variable that receives the response body fetched at runtime.

Methods

setResponseBodyVariable(responseBodyVariable)

Helper method to set a variable on the valueResponseBody property.

Parameters:
Name Type Description
responseBodyVariable string | ArchVariableString

the variable to hold the caller entered data

setResponseByIdAsync(responseId, callbackFunctionopt) → {Promise.<ArchActionGetResponse>}

This sets the response to get at runtime by its identifier.

Parameters:
Name Type Attributes Description
responseId string

the identifier of the response.

callbackFunction callbackArchActionGetResponse <optional>

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

Returns:
Promise.<ArchActionGetResponse>

setResponseByNameAsync(responseName, callbackFunctionopt, responseLibraryNameopt) → {Promise.<ArchActionGetResponse>}

This sets the response to get at runtime by its name and optionally a containing response library name.

Parameters:
Name Type Attributes Description
responseName string

the name of the response. The name is not case sensitive on the lookup.

callbackFunction function <optional>

a callback function to call if the response is successfully looked up and configured on this action. The first parameter passed to the callback function will be this Architect Get Response action instance.

responseLibraryName string <optional>

if a non-blank string is supplied for the response library name, the response will be set only if it belongs to the specified library. Library name lookups are performed case sensitively. Additionally, if you have a scenario where multiple responses are named the same but reside in different libraries, use this parameter to specify the library to disambiguate the response you want.

Returns:
Promise.<ArchActionGetResponse>

setResponseLibraryByNameAsync(responseLibraryName, callbackFunctionopt) → {Promise.<ArchActionGetResponse>}

This sets the response library to get at runtime by its name.

Parameters:
Name Type Attributes Description
responseLibraryName string

the name of the response library.

callbackFunction callbackArchActionGetResponse <optional>

a callback function to call if the response library is successfully looked up and configured on this action. The first parameter passed to the callback function will be this Architect get response instance.

Returns:
Promise.<ArchActionGetResponse>