

# Actions in the Amazon Connect Flow Language
Actions

An Action is a single step of a flow's run. This topic describes the fields that must be defined.

## Identifier


A string that must be unique among all Actions within the same Flow. This Identifier can be up to 50 characters long, and can include any characters (including unicode and spaces). They can be opaque or user-friendly.

**Important**  
The following characters are not allowed in the Identifier field: (% : ( \$1 / ) = \$1 , ; [ ] \$1 \$1)
The following strings are not allowed in the Identifier field: \$1\$1proto\$1\$1, constructor, \$1\$1defineGetter\$1\$1, \$1\$1defineSetter\$1\$1, toString, hasOwnProperty, isPrototypeOf, propertyIsEnumerable, toLocaleString, and valueOf. 

## Type


A string that identifies the type of action being performed for a particular step of the Flow. This type must be one of a list of allowable Types, which are covered later.

## Parameters


An object that defines the customizable behavior of a particular Action block. Each Action has its own format of this Parameters object, which is detailed in the individual Actions definition.

The Parameters object defines customizable behavior for the Action. For example, it defines which Attributes to set or which AWS Lambda function to run. The format differs for each Action type. To find the specific format of a specific Action's Parameter object, see the individual Action's definition below.

## Transitions


An object that defines the behavior for choosing the next Action after the current Action completes. Certain Actions terminate, meaning that they finish running the flow when they're run. This is because Transitions must be defined as an empty object.

The Transitions object defines how to proceed to the next Action during flow runtime. This object must have the following fields specified:

### NextAction


NextAction is a string that contains the Identifier of the Action that should be run after this Action, if no error or condition is preferentially chosen.

### Errors


Errors is a list of error objects. Each error object contains a type or category of error (ErrorType), and the Identifier of the Action that should be run subsequently when that error occurs (NextAction). 

Each individual Action supports specific Errors. These are detailed in the Action's definition.

### Conditions


Conditions are an ordered list that defines a series of checks to evaluate against the Action's result. This result changes per Action and can also change based on Parameters - examples of these are "the number of contacts in queue" for the CheckMetricData Action if the MetricType parameter refers to the NumberOfContactsInQueue, and "the value of the attribute" for the Compare Action. Conditions are evaluated in order, and the first Condition that evaluates to true will result in it being chosen as the Transition to occur, making that Condition's Target the next Action run. The Conditions object is explained in more detail below.

A Condition is a definition of how to evaluate an Action's result, and may evaluate to true or false. The Conditions object on the flow contains an ordered list of objects. Each object contains a NextAction (the Identifier of the Action to be invoked if the Condition evaluates to be true) and the Condition to evaluate:
+ NextAction: A string that contains the Identifier of the Action that should be run after this Action if this Condition is the first condition to evaluate to true.
+ Condition: An object that defines the evaluation logic.

#### The Condition object


The Condition object must contain the following fields:
+ **Operator**: A string that indicates which comparison operator that is applied to the Operands. The list of allowed Operators and a description of their logic is defined in the following table.
+ **Operands**: A list of operands to which the Operator is applied. Depending on the Operator, these Operands may be strings or they may be Condition objects. The specific Operator defines which type of Operand is expected, along with the number of Operands expected (some Operators will require only one Operand, some will support a list of up to ten Operands). Conditions may be nested no more than five Conditions deep, and a single Condition may not contain more than 50 sub-Conditions, regardless of how deeply nested they are.

## List of Operators



| Operator | Description | Operand type | Operand count | 
| --- | --- | --- | --- | 
|  Equals  | Returns **true** if the string specified exactly equals the result.  | String | One | 
|  TextStartsWith  | Returns **true** if the result, interpreted as text, begins with the specified string.  | String | One | 
|  TextEndsWith  | Returns **true** if the result, interpreted as text, ends with the specified string.  | String | One | 
|  TextContains  | Returns **true** if the result, interpreted as text, contains the specified string at least once.  | String | One | 
|  NumberGreaterThan  | Returns **true** if the result, interpreted as a numeric value, is larger than the specified string. If either the result or the specified string are not numeric, returns **false**.  | String | One | 
|  NumberGreaterOrEqualTo  | Returns **true** if the result, interpreted as a numeric value, is larger than or equal to the specified string. If either the result or the specified string are not numeric, returns **false**.  | String | One | 
|  NumberLessThan  | Returns **true** if the result, interpreted as a numeric value, is smaller than the specified string. If either the result or the specified string are not numeric, returns **false**.  | String | One | 
|  NumberLessOrEqualTo  | Returns **true** if the result, interpreted as a numeric value, is smaller than or equal to the specified string. If either the result or the specified string are not numeric, returns **false**.  | String | One | 

### Example Condition


Following is an example of a condition that returns true if the result starts with "ABC":

```
{
    "Operator": "TextStartsWith",
    "Operands": [
        "ABC"
    ]
}
```

# Parameter restrictions for actions in the Amazon Connect Flow language
Parameter restrictions

There are several restrictions on parameters. Here's what they mean:
+ Must be defined statically. This means that JSONPath cannot be used at all in this value.
+ Must be defined statically or as a single valid JSONPath identifier. 

  If JSONPath is used, it must be the entirety of the value; you can't specify an input of "My name is \$1.Name". Further, the JSONPath must be valid - \$1.Attributes.stuff is okay, \$1.BadValue is not okay because there's no "BadValue" path on the object used by flows.
+ May be defined statically or dynamically. Anything goes. A value of "My name is \$1.Name" is fine here, as well as a fully static value.

# Contact actions in the Amazon Connect Flow language
Contact actions

Contact actions are attempted only for flows that run in context of a contact. They generally result in contact data being manipulated in some way.

**Topics**
+ [CompleteOutboundCall](contact-actions-completeoutboundcall.md)
+ [

# CreateCase
](createcase.md)
+ [

# CreateTask
](createtask.md)
+ [

# CreateWisdomSession
](createwisdomsession.md)
+ [DequeueContactAndTransferToQueue](contact-actions-dequeuecontactandtransfertoqueue.md)
+ [

# EndFlowModuleExecution
](endflowmoduleexecution.md)
+ [

# GetCase
](getcase.md)
+ [

# InvokeFlowModule
](flow-language-actions-invoke-flow-module.md)
+ [StartOutboundChatContact](contact-actions-startoutboundchatcontact.md)
+ [TagContact](contact-actions-tagcontact.md)
+ [TransferContactToAgent](contact-actions-transfercontacttoagent.md)
+ [TransferContactToQueue](contact-actions-transfercontacttoqueue.md)
+ [UnTagContact](contact-actions-untagcontact.md)
+ [

# UpdateCase
](updatecase.md)
+ [UpdateContactAttributes](contact-actions-updatecontactattributes.md)
+ [UpdateContactCallbackNumber](contact-actions-updatecontactcallbacknumber.md)
+ [UpdateContactData](contact-actions-updatecontactdata.md)
+ [UpdateContactEventHooks](contact-actions-updatecontacteventhooks.md)
+ [UpdateContactMediaProcessing](contact-actions-updatecontactmediaprocessing.md)
+ [UpdateContactMediaStreamingBehavior](contact-actions-updatecontactmediastreamingbehavior.md)
+ [UpdateContactRecordingAndAnalyticsBehavior](contact-actions-updatecontactrecordingandanalyticsbehavior.md)
+ [UpdateContactRecordingBehavior](contact-actions-updatecontactrecordingbehavior.md)
+ [ResumeContact](contact-actions-updatecontactresumecontact.md)
+ [UpdateContactRoutingBehavior](contact-actions-updatecontactroutingbehavior.md)
+ [UpdateContactTargetQueue](contact-actions-updatecontacttargetqueue.md)
+ [UpdateContactTextToSpeechVoice](contact-actions-updatecontacttexttospeechvoice.md)
+ [UpdatePreviousContactParticipantState](contact-actions-updatepreviouscontactparticipantstate.md)

# CompleteOutboundCall
CompleteOutboundCall

When a flow is run before an outbound call is made as part of an outbound contact, this action calls the outbound destination. If this action is not used, the first participant action implicitly completes the outbound call. 

## Parameter object


```
""CallerId": { Optional, an override of the caller ID to present when calling. Is ignored when using VoiceConnectors
  "Number": The caller ID number to present when calling. Can either be fully static or a single valid JSONPath identifier
}
"VoiceConnector": { Optional, Configuration of the voice connector 
   "VoiceConnectorType": Only support "ChimeConnector". Must be defined statically.
   "VoiceConnectorArn": The ARN of the Voice Connector. Can be set statically or dynamically.
   "FromUser": The user who makes the call. Can be set statically or dynamically.
   "ToUser": The user who receives the call. Can be set statically or dynamically.
   "UserToUserInformation": Optional, SIP user-to-user information. Can be set statically or dynamically.
}
"ConnectionTimeLimitSeconds": Optional, Only used for Voice Connector use case. An integer between 1 and 600 
                                                         (inclusive) representing the number of seconds 
                                                        to wait for the voice connector to answer before 
                                                        canceling the call. Can be set statically or dynamically.
```

## Results and conditions


None.

## Errors


None.

## Restrictions


This action can be used only when the contact is in the process of making an outbound call, but has not yet called the outbound number. 

## Corresponding block in the UI


[Call phone number](https://docs.aws.amazon.com/connect/latest/adminguide/call-phone-number.html) 

# CreateCase


Creates a new case using an existing case template. Templates come with predefined fields, some of which are required and will appear in a side panel when you start. You can review and fill in the required fields, and optionally update any other available fields based on your needs. These fields are set up in your instance ahead of time. You can also choose to link a contact to the new case if needed.

## Parameter object


```
"Parameters": {
        "LinkContactToCase": "true" or "false", If set to true, cases will open automatically when the agent accepts the contact.
        "CaseTemplateId": A templateId aligned with the existing case templateName
        "CaseRequestFields": An optional map of case fields to be set. Keys should be fields from Cases domain. Values can be static or dynamic.
}
```

## Results and conditions


None.

## Errors

+ ContactNotLinked - If you specify to link the contact to case, then this error branch will appear. It might be that the contact was not linked after the case is retrieved (partial success/partial failure). If this happens, then the flow will follow this branch.
+ NoMatchingError - An error was encountered while trying to find the case. This may be due to a system error or how CreateCase is configured.

## Restrictions


None. This can be used in any type of flow and any channel.

## Corresponding block in the UI


[Flow block: Cases](https://docs.aws.amazon.com/connect/latest/adminguide/cases-block.html)

# CreateTask


Creates a new task to run an assigned flow.

## Parameter object


```
"Parameters": 
{
        "ContactFlowId": A flow ID or flow ARN. *Must be fully static or a single valid JSONPath identifier*,
        "Attributes": [Optional] { an Object that holds the attributes to be set. 
          "Key": "Value" Both the key and value may be defined statically or dynamically.
        },
        "Name": Name of the task that needs to be created. This is a string.,
        "Description": [Optional] Description of the task that needs to be created. This is a string.,
        "References": [Optional] { an Object that holds the references to be set. 
          "Type": "Value" Both the key and value may be defined statically or dynamically.
        },
        "DelaySeconds": [Optional] Time in seconds after which the task should be created. This is used to schedule the task by the agent. 
        The integer value between 1 and 518400 (6 days). If ScheduledTime is specified, this parameter may not be specified.
        "ScheduledTime": [Optional] The date and time at which the task should be created. If DelaySeconds is specified, this parameter may not be specified.
        "TaskTemplateId": [Optional] ID of the task template that will be used to create the task. This must be defined statically.
      }
}
```

## Results and conditions


None. No conditions are supported.

## Errors


NoMatchingError - if no other Error matches.

## Restrictions


This action is supported on all channels and in all contact flow types.

## Corresponding block in the UI


[Flow block: Create task](https://docs.aws.amazon.com/connect/latest/adminguide/create-task-block.html)

# CreateWisdomSession


Associates a Wisdom domain to a contact that is being executed in a Flow to enable real-time recommendations on the current contact.

## Parameter object


```
{
    "WisdomAssistantArn":  ARN for the Wisdom Assistant. May be specified statically or dynamically.
}
```

## Results and conditions


None. No conditions are supported.

## Errors


NoMatchingError - if no other Error matches.

## Restrictions


This action is only supported on the voice channel. This action can be used in all contact flow types.

## Corresponding block in the UI


[Flow block: Amazon Q in Connect](https://docs.aws.amazon.com/connect/latest/adminguide/wisdom.html)

# DequeueContactAndTransferToQueue
DequeueContactAndTransferToQueue

This action is a combination of a "Dequeue" action and a "TransferContactToQueue" action. This means that a contact in a queue is removed from the queue, a new contact segment is created with the existing contact as its previous contact, and the new contact is placed into the specified queue (referred to as "Queue-to-queue transfer"). If this contact has not been queued, is actively being joined to an agent, or has been routed to an agent, this action fails. 

## Parameter object


```
{
    "QueueId": [Optional] A queue ID or queue ARN. If AgentId is specified, this may not be specified. Must be either fully statically defined or a single, valid JSONPath identifier.
    "AgentId": [Optional] An agent ID or agent ARN, representing an agent queue. If QueueId is specified, this may not be specified. Must be either fully statically defined or a single, valid JSONPath identifier.
}
```

## Results and conditions


None.

## Errors

+ QueueAtCapacity - if the destination queue is at capacity and the contact cannot be queued within it.
+ NoMatchingError - if no other Error matches.

## Restrictions


This action is only supported in the customer queue flow. It is not supported in any other type of flow. 

## Corresponding block in the UI


Maps to [Transfer to queue](https://docs.aws.amazon.com/connect/latest/adminguide/transfer-to-queue.html) block but only when used in a Customer queue flow.

# EndFlowModuleExecution


Ends the current module execution without disconnecting the contact.

## Parameter object


```
{
                
}
```

## Results and conditions


None. No conditions are supported.

## Errors


None

## Restrictions


This action is available only in flow modules.

## Corresponding block in the UI


Return Block (not yet documented)

# GetCase


Searches all existing cases with the provided customer ID. Add request fields to filter by case fields. Specify the case fields to be returned in the response to persist in the context.

## Parameter object


```
{
    "LinkContactToCase": "true" or "false", If set to true, cases will open automatically when the agent accepts the contact.
   "GetLastUpdatedCase": "true" or "false", You can specify to get only the last updated case for any search criteria. 
    "CustomerId": "Customer's Id", Search all cases for this customer Id.
    "CaseRequestFields": An optional map of cases request fields. Keys should be fields from Cases domain. Values can be static or dynamic.
    "CaseResponseFields": [ ] An optional list of field names that should be persisted in the case namespace.
}
```

## Results and conditions


None.

## Errors

+ NoMatchingError - An error was encountered while trying to find the case. This may be due to a system error or how Get case is configured.
+ ContactNotLinked - If you specify to link the contact to case, then this error branch will appear. It might be that the contact was not linked after the case is retrieved (partial success/partial failure). If this happens, then the flow will follow this branch.
+ MultipleFound - Multiple cases are found with the search criteria.
+ NoneFound - No cases are found with the search criteria.

## Restrictions


None. This can be used in any type of flow and any channel.

## Corresponding block in the UI


[Flow block: Cases](https://docs.aws.amazon.com/connect/latest/adminguide/cases-block.html)

# InvokeFlowModule


Invokes a flow module. *Flow modules* are reusable sections of a flow. You use them to extract repeatable logic across your flows, and create common functions. For more information about flow modules, see [Flow modules for reusable functions](https://docs.aws.amazon.com/connect/latest/adminguide/contact-flow-modules.html), in the *Amazon Connect Administrator Guide*. 

## Parameter object


```
{
    "FlowModuleId": The flow module ID or flow module ARN to be invoked. May be defined statically or dynamically.
}
```

## Results and conditions


None.

## Errors


`NoMatchingError` if no other Error matches.

## Restrictions


This action is supported by all channels and only supports Inbound flow types.

## Corresponding block in the UI


[Flow block: Invoke module](https://docs.aws.amazon.com/connect/latest/adminguide/invoke-module-block.html).

# StartOutboundChatContact
StartOutboundChatContact

Initiate an outbound chat contact to a customer. Only SMS chats are supported. For more information, see the [StartOutboundChatContact](https://docs.aws.amazon.com/connect/latest/APIReference/API_StartOutboundChatContact.html) in the *Amazon Connect API Reference*. 

## Parameter object


```
{
    "SourceEndpoint": {
        "Address": ConnectPhoneNumberArn of the SourceEndpoint,
        "Type": Type of the SourceEndpoint, currently only supports CONNECT_PHONENUMBER_ARN
    },
    "DestinationEndpoint": {
        "Address": E164 phone number of the DestinationEndpoint,
        "Type": Type of the DestinationEndpoint, currently only supports TELEPHONE_NUMBER
    },
    "ContactFlowArn": ContactFlowArn of the flow to be executed for the new outbound chat,
    "ContactSubtype": Subtype of the new chat contact, currently only supports connect:SMS,
    "InitialSystemMessage": [Optional] {
        "Content": content of the initial system message to be sent to the DestinationEndpoint
    },
    "RelatedContact": [Optional] Only supported value is CURRENT
}
```

## Results and conditions


None. No conditions are supported.

## Errors

+ NoMatchingError - if no other Error matches.

## Restrictions

+ This action only supports `connect:SMS` as the **ContactSubtype** currently.
+ This action only supports `CONNECT_PHONENUMBER_ARN` as the Type of **SourceEndpoint** currently.
+ This action only supports `TELEPHONE_NUMBER` as the Type of **DestinationEndpoint** currently.

## Corresponding block in the UI


[Send message](https://docs.aws.amazon.com/connect/latest/adminguide/send-message.html.html) 

# TagContact
TagContact

Sets a collection of tag to the current contact. With this type of operation, either all tags are set or none are set. 

Each tag on a contact is a key-value pair, that is, it is composed of a key and a value. There are two types of tags: user-defined tags and system tags. You create a user-defined tag. A system tag is automatically created by AWS services. A system tag is prefixed with `aws:`. You cannot change it. 

The TagContact action parameters correspond to user-defined tags that are applied on a contact.

## Parameter object


```
{
"Tags": { an Object that holds the tags to be set.
       "Key1":"Value1" Both the key and value may be defined statically or dynamically.
        }
}
```

## Results and conditions


None.

## Errors


None.

## Restrictions


None. This can be used in any type of flow and any channel.

## Corresponding block in the UI


[Contact tags](https://docs.aws.amazon.com/connect/latest/adminguide/contact-tags-block.html) 

# TransferContactToAgent
TransferContactToAgent

Ends the current flow and transfers the customer to an agent. If the agent is already with someone else, the contact is disconnected. Transfer contact to agent works only for voice interactions. 

## Parameter object


No parameters are expected.

## Results and conditions


None.

## Errors


None.

## Restrictions


This action is supported in only transfer to agent and transfer to queue flows. 

## Corresponding block in the UI


[Transfer to agent](https://docs.aws.amazon.com/connect/latest/adminguide/transfer-to-agent-block.html) 

# TransferContactToQueue
TransferContactToQueue

This action places a contact that is not already in a queue into the contact's TargetQueue. If the contact has already been put into a queue (meaning that it is currently being routed to an agent, being joined to an agent, or is connected to an agent), the action fails. 

## Parameter object


No parameters are expected.

## Results and conditions


None.

## Errors

+ QueueAtCapacity - if the destination queue is at capacity and the contact cannot be queued within it.
+ NoMatchingError - if no other Error matches.

## Restrictions


This action is supported in inbound contact flows and transfer flows. It is not supported in whisper flows, customer queue flows, or hold flows. 

## Corresponding block in the UI


[Transfer to queue](https://docs.aws.amazon.com/connect/latest/adminguide/transfer-to-queue.html) 

# UnTagContact
UnTagContact

Removes a collection of tags on the current contact. With this type of operation, either all tags are set or none are set. 

You cannot remove system-defined tags. You can only remove already existing user-defined tags from a contact.

## Parameter object


```
{
"TagKeys": [ an Object that holds the tag-keys for the tags to be removed.
     "Key1" Key(s) can only be set statically.
      ]
}
```

## Results and conditions


None.

## Errors

+ Success - When un-tagging a contact is successful
+  NoMatchingError - if no other Error matches

## Restrictions


This action is supported across all the Amazon Connect media channels.

This action can be used in flows of all types.

## Corresponding block in the UI


[Contact tags](https://docs.aws.amazon.com/connect/latest/adminguide/contact-tags-block.html) 

# UpdateCase


Updates an existing case by providing the case’s id and the fields that should be updated.

## Parameter object


```
{
  “LinkContactToCase” : "true" or "false", If set to true, cases open automatically when the agent accepts the contact.
  “CaseId”: the unique identifier of the case
  “CaseRequestFields”: An optional map of case fields to be updated. Keys should be fields from the Cases domain. Values can be static or dynamic.
}
```

## Results and conditions


None.

## Errors

+ ContactNotLinked - If you specify to link the contact to case, then this error branch will appear. It might be that the contact was not linked after the case is retrieved (partial success/partial failure). If this happens, then the flow will follow this branch.
+ NoMatchingError - An error was encountered while trying to find the case. This may be due to a system error, or how Update case is configured.

## Restrictions


None. This can be used in any type of flow and any channel.

## Corresponding block in the UI


[Flow block: Cases](https://docs.aws.amazon.com/connect/latest/adminguide/cases-block.html)

# UpdateContactAttributes
UpdateContactAttributes

Sets a collection of contact attributes on either the current contact or the related contact. With this type of operation, either all attributes are set or none are set.

## Parameter object


```
{
    "Attributes": { an Object that holds the attributes to be set. 
        "Key": "Value" Both the key and value may be defined statically or dynamically.
    },
    "TargetContact": either "Current" or "Related". Must be defined statically.
}
```

## Results and conditions


None.

## Errors

+ NoMatchingError - if no other Error matches.

## Restrictions


None. This can be used in any type of flow and any channel. 

## Corresponding block in the UI


[Set contact attributes](https://docs.aws.amazon.com/connect/latest/adminguide/set-contact-attributes.html) 

# UpdateContactCallbackNumber
UpdateContactCallbackNumber

Updates the contact callback number, which is the number used by the CreateCallbackContact action. This value defaults to the customer participant caller ID if this action is never used. 

## Parameter object


```
{
    "CallbackNumber": The callback number to set. Must be a single, valid JSONPath reference, and cannot be set statically. 
}
```

## Results and conditions


None.

## Errors

+ InvalidCallbackNumber - The callback number specified was not a valid (e.164) phone number.
+ CallbackNumberNotDialable - The callback number specified is not dialable by the instance.

## Restrictions


This is supported only in contact flows, transfer flows, and customer queue flows. This is not supported in whispers or hold flows. 

## Corresponding block in the UI


[Set callback number](https://docs.aws.amazon.com/connect/latest/adminguide/set-callback-number.html) 

# UpdateContactData
UpdateContactData

Sets a collection of connect defined attributes on specified contact. With this type of operation, either all attributes are set or none are set.

## Parameter object


```
"Parameters": 
{
        "Name": [Optional] The name of the contact. It is a string. May be set statically or dynamically.
        "Description": [Optional] The description of the contact. It is a string. 
        "LanguageCode": [Optional] The language to use for current contact.
        "CustomerId": [Optional] The customer id associated with the contact.
        "References": [Optional] { an Object that holds the references to be set. 
          "Type": "Value" Both the key and value may be defined statically or dynamically.
        },
        "IsVoiceIdStreamingEnabled": [Optional] Enable to start streaming audio from customer channel to Voice ID. It is a string. "TRUE" and "FALSE" are the only valid values.
        "IsVoiceAuthenticationEnabled": [Optional] Enable authentication by comparing voiceprint of the caller to the enrolled voiceprint of the claimed identity.It is a string. "TRUE" and "FALSE" are the only valid values.
        "IsFraudDetectionEnabled": [Optional] Enable detection for impersonation attempts and presence of known fraudsters. It is a string. "TRUE" and "FALSE" are the only valid values.
        "VoiceAuthenticationThreshold": [Optional] Threshold to validate against confidence score of a voice match. It is a string. Value must be between 0 and 100.
        "VoiceAuthenticationResponseTime": [Optional] Define required minimum caller speech seconds for voice authentication. It is a string. Value must be between 5 and 10.
        "FraudDetectionThreshold": [Optional] The threshold you set for fraud detection is used to measure risk. Scores higher than the threshold are reported as higher risk. Scores lower than the threshold are reported as lower risk. Raising the threshold lowers false positive rates (makes result more certain), but raises false negative rates. It is a string. Value must be between 0 and 100.
        "WatchlistId": [Optional] Identifier of watchlist to use when evaluating the voice session. It is a string. Value must be between 0 and 100.
        "WisdomSessionArn": [Optional] A session ARN provided by Amazon Connect Wisdom for agent assistance. It is a string.
        "TargetContact": [Required] Target contact on which given attributes should be set. It is a string. "Current" or "Related" are the only valid values.    
}
```

## Results and conditions


None. No conditions are supported.

## Errors

+ NoMatchingError - if no other Error matches.

## Restrictions


This action is supported on all channels and in all flow types.

## Corresponding blocks in the UI

+  [Set contact attributes](https://docs.aws.amazon.com/connect/latest/adminguide/set-contact-attributes.html) 

# UpdateContactEventHooks
UpdateContactEventHooks

Sets one or more contact event hooks, which are flows associated with contact events, such as customer whisper or agent hold. For more information, see [Contact records data model](https://docs.aws.amazon.com/connect/latest/adminguide/ctr-data-model.html). The following event hooks are valid: 
+ AgentHold
+ AgentWhisper
+ CustomerHold
+ CustomerQueue
+ CustomerRemaining
+ CustomerWhisper
+ DefaultAgentUI
+ DisconnectAgentUI
+ PauseContact
+ ResumeContact

## Parameter object


```
{
    "EventHooks": { an Object that holds the event hooks to be set. Only one entry may be present in this map.
        "Key": "Value" - the event hook to be set where the key is the event type and the value is the flow ID or ARN to run when that event occurs. Keys must be defined statically. 
    }
}
```

## Results and conditions


None.

## Errors

+ NoMatchingError - if no other Error matches.

## Restrictions


This is supported in all types of flows. 

## Corresponding blocks in the UI

+  [Set customer queue flow](https://docs.aws.amazon.com/connect/latest/adminguide/set-customer-queue-flow.html) 
+ [Set event flow](https://docs.aws.amazon.com/connect/latest/adminguide/set-event-flow.html) 
+ [Set hold flow](https://docs.aws.amazon.com/connect/latest/adminguide/set-hold-flow.html) 
+ [Set whisper flow](https://docs.aws.amazon.com/connect/latest/adminguide/set-whisper-flow.html) 

# UpdateContactMediaProcessing
UpdateContactMediaProcessing

Allows customers to configure their own Lambda processor, which will be applied to in-flight messages.

## Parameter object


```
{
    "ChatProcessor": { // Configuration for bring-your-own-processor for chat channel.
        "ProcessingEnabled": either "True" or "False". Must be set statically. Determines whether to enable custom Lambda processing for chat messages.
        "LambdaProcessorARN": The ARN of the Lambda function to process chat messages. Must be set statically. Format: arn:aws:lambda:region:account-id:function:function-name
        "ChatProcessorSettings": { // An object that holds chat processor behavior settings
            "DeliverUnprocessedMessages": either "True" or "False". Must be set statically. Determines whether to deliver messages that fail Lambda processing.
        }
    }
}
```

## Results and conditions


None.

## Errors

+ **NoMatchingError** - if no other Error matches. Must always be defined.
+ **ChannelMismatch** - if the media channel that initiated the contact is not the same as the one defined in the action. As of now, only chat is supported in this action.

## Corresponding block in the UI


[Set recording, analytics and processing behavior](https://docs.aws.amazon.com/connect/latest/adminguide/set-recording-analytics-processing-behavior.html)

# UpdateContactMediaStreamingBehavior
UpdateContactMediaStreamingBehavior

Enables or disables contact media streaming for a set of participants. 

## Parameter object


```
{
    "MediaStreamingState": One of "Enabled" or "Disabled". Must be specified statically.
    "Participants": [  A list of participants to include in the stream if enabling the stream, or disable if disabling the stream
        {
            "ParticipantType": The type of participant to stream. Currently, only "Customer" is supported. Must be defined statically.
            "MediaDirections": [ ] A list of the directions of media to include in the stream - "From" and "To".  Must be defined statically.
        }
    ],
    "MediaStreamType": The type of media to enable or disable from the stream. Currently, only "Audio" is supported. Must be defined statically.
}
```

## Results and conditions


None.

## Errors

+ NoMatchingError - if no other Error matches.

## Restrictions


This is supported in contact flows, customer queue flows, transfer flows, and whisper flows. It is not supported in hold flows. 

This is supported only by the voice channel.

## Corresponding block in the UI


[Start media streaming](https://docs.aws.amazon.com/connect/latest/adminguide/start-media-streaming.html) and [Stop media streaming](https://docs.aws.amazon.com/connect/latest/adminguide/stop-media-streaming.html) 

# UpdateContactRecordingAndAnalyticsBehavior
UpdateContactRecordingAndAnalyticsBehavior

Sets contact recording behavior, including analysis behavior and which participants of the contact to record.

## Parameter object


```
{
    // Only ONE of the following channel behavior objects can be defined per configuration
    
    "ChatBehavior": { // Configuration for chat channel interactions
        "ChatAnalyticsBehavior": {
            "Enabled": either "True" or "False". Must be set statically.
            "AnalyticsLanguage": Must be one of languages supported by Contact Lens analysis. Can be set dynamically. Use the format xx-XX, for example, en-US for US English.
            "ConversationalAnalyticsRedactionConfiguration": { 
                "Enabled": either "True" or "False". Must be set statically. Determines whether to redact sensitive data in Contact Lens output.
                "RedactionResults": either "RedactedAndOriginal" or "RedactedOnly". Can be set dynamically. Determines whether to provide both versions or only redacted output.
                "RedactionMaskMode": either "EntityType" or "PII". Must be set statically.
                "RedactionEntities": [ ] a list of entity types to redact from the analytics output. Must be set statically.
            },
            "InFlightChatRedactionConfiguration": { // In-flight redaction for chat messages as they are sent. Only available for chat channel.
                "Enabled": either "True" or "False". Must be set statically. Determines whether to redact sensitive data in real-time chat messages.
                "RedactionMaskMode": either "EntityType" or "PII". Must be set statically.
                "RedactionEntities": [ ] a list of entity types to redact from chat messages in-flight. Must be set statically.
                "DeliverUnprocessedMessages": either "True" or "False". Must be set statically. Determines whether to deliver messages that fail redaction.
            },
            "AnalyticsModes": ["ContactLens"]. Can only be set to ContactLens for chat channel.
            "SentimentConfiguration": { // Optional parameter to enable sentiment analysis
                "Enabled": either "True" or "False". Must be set statically.
            },
            "SummaryConfiguration": { // Optional parameter to enable post-contact summary
                "SummaryModes": ["PostContact", "AutomatedInteraction"]. Can be set to "PostContact" or "AutomatedInteraction", or both for chat channel.
            }
        }
    },
    
    "VoiceBehavior": { // Configuration for voice channel interactions
        "VoiceRecordingBehavior": {
            "RecordedParticipants": [ ] a list of participants to record, chosen from "Agent" and "Customer". An empty list disables recording. Must be set statically.
            "IVRRecordingBehavior": Can be either "Enabled" or "Disabled". Must be set statically.
        },
        "VoiceAnalyticsBehavior": { // An object that holds voice analytics settings. Can only be set if RecordedParticipants contains both Agent and Customer.
            "Enabled": either "True" or "False". Must be set statically.
            "AnalyticsLanguage": Must be one of languages supported by Contact Lens analysis. Must be set statically. Use the format xx-XX, for example, en-US for US English.
            "ConversationalAnalyticsRedactionConfiguration": { // Redaction settings for analytics output (transcripts, audio files)
                "Enabled": either "True" or "False". Must be set statically. Determines whether to redact sensitive data in Contact Lens output.
                "RedactionResults": either "RedactedAndOriginal" or "RedactedOnly". Can be set dynamically. Determines whether to provide both versions or only redacted output.
                "RedactionMaskMode": either "EntityType" or "PII". Must be set statically.
                "RedactionEntities": [ ] a list of entity types to redact from the analytics output. Must be set statically.
            },
            "AnalyticsModes": ["RealTime", "AutomatedInteraction"]. Can be set to one of "RealTime" or "PostContact" and also can include "AutomatedInteraction" for voice channel.
            "SentimentConfiguration": { // Optional parameter to enable sentiment analysis
                "Enabled": either "True" or "False". Must be set statically.
            },
            "SummaryConfiguration": { // Optional parameter to enable post-contact summary
                "SummaryModes": ["PostContact", "AutomatedInteraction"]. Can be set to "PostContact" or "AutomatedInteraction", or both for voice channel. Must be set statically.
            }
        }
    },
    
    "ScreenRecordingBehavior": { // Optional configuration for agent screen recording. Can be defined independently or alongside any channel behavior.
        "ScreenRecordedParticipants": [ ] a list of participants for which to record their screen, can only include "Agent". An empty list disables screen recording. Must be set statically.
    }
}
```

**Notes**
+ `AnalyticsRedactionMaskMode`: Optional, String. Allowed values:
  + `PII`: All PII data is replaced with `[PII]`. For example, Jane Doe is replaced with `[PII]`
  + `EntityType`: Each PII entity is replaced with its type. For example, Jane Doe is replaced with `[NAME]`.
  + If no value is provided, the default `PII` is used.
+ `AnalyticsRedactionEntities`: Optional, Array of strings.
  + Valid values include: "BANK\$1ACCOUNT\$1NUMBER", "BANK\$1ROUTING", "CREDIT\$1DEBIT\$1NUMBER", "CREDIT\$1DEBIT\$1CVV", "CREDIT\$1DEBIT\$1EXPIRY", "INTERNATIONAL\$1BANK\$1ACCOUNT\$1NUMBER", "PIN", "SWIFT\$1CODE", "CA\$1HEALTH\$1NUMBER", "UK\$1NATIONAL\$1HEALTH\$1SERVICE\$1NUMBER", "CA\$1SOCIAL\$1INSURANCE\$1NUMBER", "SSN", "UK\$1NATIONAL\$1INSURANCE\$1NUMBER", "PASSPORT\$1NUMBER", "DRIVER\$1ID", "IN\$1AADHAAR", "NAME", "AGE", "EMAIL", "PHONE", "ADDRESS", "US\$1INDIVIDUAL\$1TAX\$1IDENTIFICATION\$1NUMBER", "UK\$1UNIQUE\$1TAXPAYER\$1REFERENCE\$1NUMBER", "IN\$1PERMANENT\$1ACCOUNT\$1NUMBER", "IN\$1NREGA", "AWS\$1ACCESS\$1KEY", "AWS\$1SECRET\$1KEY", "IP\$1ADDRESS", "MAC\$1ADDRESS", "PASSWORD", "URL", "USERNAME", "LICENSE\$1PLATE", "VEHICLE\$1IDENTIFICATION\$1NUMBER", "IN\$1VOTER\$1NUMBER", "DATE\$1TIME", "AGENT\$1DISPLAY\$1NAME", "CUSTOMER\$1DISPLAY\$1NAME", "ATTACHMENT\$1NAME".
  + An empty array is not allowed.
  + If `AnalyticsRedactionEntities` is not present, the default "redact all PII data" is used.
  + The following redaction entities are not supported for chat in-flight redaction:
    + IN\$1PERMANENT\$1ACCOUNT\$1NUMBER
    + IN\$1NREGA
    + IN\$1VOTER\$1NUMBER
    + IN\$1AADHAAR
    + DATE\$1TIME
    + CUSTOMER\$1DISPLAY\$1NAME
    + AGENT\$1DISPLAY\$1NAME
    + ATTACHMENT\$1NAME

For more information on sensitive data redaction, see [Enable redaction of sensitive data](https://docs.aws.amazon.com/connect/latest/adminguide/enable-analytics.html#enable-redaction) in the *Amazon Connect Administrator's Guide*.

For more information on in-flight chat redaction, see [Enable in-flight sensitive data redaction and message processing](https://docs.aws.amazon.com/connect/latest/adminguide/redaction-message-processing.html).

For a list of languages supported by Contact Lens post-call analysis, see [Contact Lens supported languages](https://docs.aws.amazon.com/connect/latest/adminguide/supported-languages.html). For the 4-character language code to use, see [Supported languages](https://docs.aws.amazon.com/transcribe/latest/dg/supported-languages.html) in the *Amazon Transcribe Developer Guide*.

## Results and conditions


None.

## Errors

+ **NoMatchingError** - if no other Error matches. Must always be defined.
+ **ChannelMismatch** - if the media channel that initiated the contact is not the same as the one defined in the action. For screen recording, any channel other than voice, chat or tasks would result in this branch being taken. Must always be defined.
+ **InFlightRedactionConfigurationFailed** - if starting/stopping in-flight chat redaction fails. Must be defined if chat behavior is defined in action.

## Corresponding block in the UI


[Set recording, analytics and processing behavior](https://docs.aws.amazon.com/connect/latest/adminguide/set-recording-analytics-processing-behavior.html)

# UpdateContactRecordingBehavior
UpdateContactRecordingBehavior

Sets contact recording behavior, including analysis behavior and which participants of the contact to record. 

## Parameter object


```
{
    "RecordingBehavior": { an object that holds the recording behavior
        "RecordedParticipants": [ ] a list of participants to record, chosen from "Agent" and "Customer". An empty list disables recording. Must be set statically.
        "ScreenRecordedParticipants": [ ] a list of participants for which to record their screen, can only include "Agent". Must be set statically.
        "IVRRecordingBehavior": Can be either "Enabled" or "Disabled". Must be set statically.
    },    
    "AnalyticsBehavior": { an object that holds the analytics behavior. Can only be set if the RecordedParticipants contains both Agent and Customer
        "Enabled": either "True" or "False". Must be set statically.
        "AnalyticsLanguage": Must be one of languages supported by Contact Lens post-call analysis. Must be set statically. Use the format xx-XX, for example, en-US for US English.
        "AnalyticsRedactionBehavior": either Enabled or Disabled. Defaults to Disabled if not set. Determines whether to redact sensitive data, such as personal information, in the Contact Lens output file and audio recording.
        "AnalyticsRedactionResults": either "RedactedAndOriginal" or "RedactedOnly". Can be set dynamically. Determines whether the customer gets both the redacted and the original transcripts and audio files, or just the redacted transcripts and audio files.
        "AnalyticsRedactionMaskMode": either "EntityType" or "PII".  Must be set statically.
        "AnalyticsRedactionEntities": ["BANK_ACCOUNT_NUMBER", "BANK_ROUTING", "CREDIT_DEBIT_NUMBER", "CREDIT_DEBIT_CVV", "CREDIT_DEBIT_EXPIRY", "INTERNATIONAL_BANK_ACCOUNT_NUMBER", "PIN", "SWIFT_CODE", "CA_HEALTH_NUMBER", "UK_NATIONAL_HEALTH_SERVICE_NUMBER", "CA_SOCIAL_INSURANCE_NUMBER", "SSN", "UK_NATIONAL_INSURANCE_NUMBER", "PASSPORT_NUMBER", "DRIVER_ID", "IN_AADHAAR", "NAME", "AGE", "EMAIL", "PHONE", "ADDRESS", "US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER", "UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER", "IN_PERMANENT_ACCOUNT_NUMBER", "IN_NREGA", "AWS_ACCESS_KEY", "AWS_SECRET_KEY", "IP_ADDRESS", "MAC_ADDRESS", "PASSWORD", "URL", "USERNAME", "LICENSE_PLATE", "VEHICLE_IDENTIFICATION_NUMBER", "IN_VOTER_NUMBER", "DATE_TIME", "AGENT_DISPLAY_NAME", "CUSTOMER_DISPLAY_NAME", "ATTACHMENT_NAME"],
        "ChannelConfiguration": {
          "Chat": {
            "AnalyticsModes": ["ContactLens"]  Can only be set to ContactLens
          },
         "Voice": {
            "AnalyticsModes": ["RealTime"]  Can be set to RealTime and PostContact
          } 
       },
        "SummaryConfiguration": {
            "SummaryModes": ["PostContact"] Optional parameter to enable post-contact summary. At present we only support "PostContact".
        },
         "SentimentConfiguration": {
            "Enabled": either "True" or "False". Must be set statically.
        }
    }
}
```

**Notes**
+ `AnalyticsRedactionMaskMode`: Optional, String. Allowed values:
  + `PII`: All PII data is replaced with `[PII]`. For example, Jane Doe is replaced with `[PII]`
  + `EntityType`: Each PII entity is replaced with its type. For example, Jane Doe is replaced with `[NAME]`.
  + If no value is provided, the default `PII` is used.
+ `AnalyticsRedactionEntities`: Optional, Array of strings. 
  + Valid values include: "BANK\$1ACCOUNT\$1NUMBER", "BANK\$1ROUTING", "CREDIT\$1DEBIT\$1NUMBER", "CREDIT\$1DEBIT\$1CVV", "CREDIT\$1DEBIT\$1EXPIRY", "INTERNATIONAL\$1BANK\$1ACCOUNT\$1NUMBER", "PIN", "SWIFT\$1CODE", "CA\$1HEALTH\$1NUMBER", "UK\$1NATIONAL\$1HEALTH\$1SERVICE\$1NUMBER", "CA\$1SOCIAL\$1INSURANCE\$1NUMBER", "SSN", "UK\$1NATIONAL\$1INSURANCE\$1NUMBER", "PASSPORT\$1NUMBER", "DRIVER\$1ID", "IN\$1AADHAAR", "NAME", "AGE", "EMAIL", "PHONE", "ADDRESS", "US\$1INDIVIDUAL\$1TAX\$1IDENTIFICATION\$1NUMBER", "UK\$1UNIQUE\$1TAXPAYER\$1REFERENCE\$1NUMBER", "IN\$1PERMANENT\$1ACCOUNT\$1NUMBER", "IN\$1NREGA", "AWS\$1ACCESS\$1KEY", "AWS\$1SECRET\$1KEY", "IP\$1ADDRESS", "MAC\$1ADDRESS", "PASSWORD", "URL", "USERNAME", "LICENSE\$1PLATE", "VEHICLE\$1IDENTIFICATION\$1NUMBER", "IN\$1VOTER\$1NUMBER", "DATE\$1TIME", "AGENT\$1DISPLAY\$1NAME", "CUSTOMER\$1DISPLAY\$1NAME", "ATTACHMENT\$1NAME".
  + An empty array is not allowed. 
  + If `AnalyticsRedactionEntities` is not present, the default "redact all PII data" is used.

For more information on sensitive data redaction, see [Enable redaction of sensitive data](https://docs.aws.amazon.com/connect/latest/adminguide/enable-redaction.html) in the *Amazon Connect Administrator's Guide*.

For a list of languages supported by Contact Lens post-call analysis, see [Contact Lens supported languages](https://docs.aws.amazon.com/connect/latest/adminguide/supported-languages-contact-lens.html). For the 4-character language code to use, see [Supported languages](https://docs.aws.amazon.com/transcribe/latest/dg/supported-languages.html) in the *Amazon Transcribe Developer Guide*.

## Results and conditions


None.

## Errors


None.

## Restrictions


This is supported only in contact flows, transfer flows, outbound whispers, and customer queue flows. This is not supported in agent/customer whispers or hold flows. 

Analytics is only supported by the voice channel.

## Corresponding block in the UI


[Set recording and analytics behavior](https://docs.aws.amazon.com/connect/latest/adminguide/set-recording-behavior.html) 

# ResumeContact
ResumeContact

Resumes a contact from a paused state.

## Parameter object


No parameters are expected.

## Results and conditions


None.

## Errors

+ NoMatchingError - if no other Error matches.

## Restrictions


None. This action can be used everywhere.

# UpdateContactRoutingBehavior
UpdateContactRoutingBehavior

Updates the contact's routing details. This can move the contact forward or backward in queue, or specify a queue priority. 

## Parameter object


```
{
  "QueuePriority": An integer that represents the queue priority to be applied to the contact (lower priorities are routed preferentially). Cannot be specified if QueueTimeAdjustmentSeconds is specified. Must be statically defined, must be larger than zero, and a valid integer value.
  "QueueTimeAdjustmentSeconds": An integer that represents the queue time adjust to be applied to the contact, in seconds (longer / larger queue times are routed preferentially). Cannot be specified if QueuePriority is specified. Must be statically defined and a valid integer value.
}
```

## Results and conditions


None.

## Errors


None.

## Restrictions


This is supported only in inbound contact flows. It is not supported in transfer flows, whisper flows, customer queue flows, or hold flows. 

## Corresponding block in the UI


[Change routing priority / age](https://docs.aws.amazon.com/connect/latest/adminguide/change-routing-priority.html) 

# UpdateContactTargetQueue
UpdateContactTargetQueue

Sets the contact's TargetQueue. This is the queue is used by all other instructions that check a queue implicitly, and for TransferContactToQueue. 

## Parameter object


```
{
  "QueueId": [Optional] A queue ID or queue ARN. If AgentId is specified, this may not be specified. This must be either defined fully statically or as a single valid JSONPath identifier.
  "AgentId": [Optional] An agent ID or agent ARN, representing an agent queue. If QueueId is specified, this may not be specified. This must be either defined fully statically or as a single valid JSONPath identifier.
}
```

## Results and conditions


None.

## Errors

+ NoMatchingError - if no other Error matches.

## Restrictions


This action is supported only in inbound contact flows and transfer flows. It is not supported in whisper flows, hold flows, or customer queue flows. 

## Corresponding block in the UI


[Set working queue](https://docs.aws.amazon.com/connect/latest/adminguide/set-working-queue.html) 

# UpdateContactTextToSpeechVoice
UpdateContactTextToSpeechVoice

Updates the Amazon Polly voice used by text-to-speech for voice contacts (message with text-to-speech, or Amazon Lex bots). This defaults to Joanna if this action is never run. 

## Parameter object


```
{
  "TextToSpeechVoice": A string holding the name of an Amazon Polly voice. May be defined statically or dynamically. If this is an invalid text to speech voice, text to speech is no longer function for this contact.
  "TextToSpeechEngine": The engine associated with the Amazon Polly voice. May be defined statically or dynamically.
  "TextToSpeechStyle" : The speech style associated with the Amazon Polly Voice. It could be None, Coversational, or Newscaster. May be defined statically or dynamically.
}
```

## Results and conditions


Results in error if voice or engine are invalid, or if the selected voice does not support the selected engine.

## Errors

+ NoMatchingError - if no other Error matches. Must always be defined.

## Restrictions


None. This action is supported in all flow types, and across all channels. 

## Corresponding block in the UI


[Set voice](https://docs.aws.amazon.com/connect/latest/adminguide/set-voice.html) 

# UpdatePreviousContactParticipantState
UpdatePreviousContactParticipantState

This action is primarily used to prevent previous participants on the contact from observing the contact. Common use cases are disconnecting the agent that initiates a transfer when they transfer a contact to a secure destination, or putting the agent on hold when transferring to a quick connect that securely gathers customer input such as credit card numbers. 

## Parameter object


```
{
    "PreviousContactParticipantState": One of ["AgentOnHold", "CustomerOnHold", "OffHold"], which are only supported for voice contacts. 
}
```

## Execution results and conditions


None.

## Errors

+ NoMatchingError - if no other Error matches.

## Restrictions


This action is supported only in inbound contact flows and transfer flows. 

## Corresponding block in the UI


[Hold customer or agent](https://docs.aws.amazon.com/connect/latest/adminguide/hold-customer-agent.html) 

# Flow control actions in the Amazon Connect Flow language
Flow control actions

These actions don't have any side effects and are only used to determine the path through a flow. Certain data may not be available (such as contact data, if the action is determining its path based on contact data). These actions generally work in every circumstance.

A flow control action is an action that:
+ Does not need a contact or a participant to succeed.
+ Controls the behavior of the flow, by either enabling or disabling flow behavior (such as logging) or by choosing a branch when the flow runs.

**Topics**
+ [CheckHoursOfOperation](flow-control-actions-checkhoursofoperation.md)
+ [CheckMetricData](flow-control-actions-checkmetricdata.md)
+ [CheckOutboundCallStatus](flow-control-actions-checkoutboundcallstatus.md)
+ [CheckVoiceId](flow-control-actions-checkvoiceid.md)
+ [Compare](flow-control-actions-compare.md)
+ [DistributeByPercentage](flow-control-actions-distributebypercentage.md)
+ [EndFlowExecution](flow-control-actions-endflowexecution.md)
+ [GetMetricData](flow-control-actions-getmetricdata.md)
+ [Loop](flow-control-actions-loop.md)
+ [StartVoiceIdStream](flow-control-actions-startvoiceidstream.md)
+ [TransferToFlow](flow-control-actions-transfertoflow.md)
+ [UpdateFlowAttributes](flow-control-actions-updateflowattributes.md)
+ [UpdateFlowLoggingBehavior](flow-control-actions-updateflowloggingbehavior.md)
+ [UpdateRoutingCriteria](flow-control-actions-updateroutingcriteria.md)
+ [Wait](flow-control-actions-wait.md)

# CheckHoursOfOperation
CheckHoursOfOperation

Returns whether the specified hours of operation object (or the hours of operation object associated with the current queue if no hours of operation is referenced) is in hours or out of hours as its result, allowing comparisons against it. 

## Parameter object


```
{ 
  "HoursOfOperationId": [Optional] An hours of operation ID or hours of operation ARN. *Must be either fully static or fully dynamic*. If not specified, the TargetQueue's hours of operation for the contact are used
}
```

## Results and conditions


**True** or **False** based on whether the hours of operation object specified is in hours or out of hours. There must be a Condition provided for Equals **True** and a Condition for Equals **False**, and no other conditions.

## Errors

+ NoMatchingError - if no other Error matches.

## Restrictions


This action is available in inbound flows, transfer flows, and customer queue flows. It is not available to hold flows or to whisper flows. 

## Corresponding block in the UI


[Check hours of operation](https://docs.aws.amazon.com/connect/latest/adminguide/check-hours-of-operation.html) 

# CheckMetricData
CheckMetricData

A shortcut single action to avoid using GetMetricData and Compare for a set of simple metrics. This action loads the specified metric data for the specified queue, and allows comparisons to the loaded value. For example, it loads number of contacts in queue, age of oldest contact in queue, number of agents staffed on the queue, number of agents available on the queue, or number of agents online on the queue. 

## Parameter object


```
{
  "MetricType": One of [NumberOfAgentsAvailable, NumberOfAgentsStaffed, NumberOfAgentsOnline, OldestContactInQueueAgeSeconds, NumberOfContactsInQueue]. **Dynamic values are not supported**,
  "QueueId": [Optional] A queue ID or queue ARN. If AgentId is specified, this may not be specified. *Dynamic values are supported*,
  "AgentId": [Optional] An agent ID or agent ARN, representing an agent queue. If QueueId is specified, this may not be specified. *Dynamic values are supported*. If neither this nor QueueId are specified, the contact TargetQueue is used
}
```

## Execution results and conditions


A number, representing the value of the metric that was requested. This can be used for conditions. If the MetricType is NumberOfAgents\$1 then the only supported condition is "NumberGreaterThan 0", otherwise Equals and any Number\$1 Operands are allowed.

## Errors

+ NoMatchingError - if no other Error matches.
+ NoMatchingCondition - if no other Condition matches (only supported if the MetricType is OldestContactInQueueAgeSeconds or NumberOfContactsInQueue).

## Restrictions


This action is only usable in flows, queue and agent transfers, and customer queue flows. It is not available in any type of whisper or hold flows. 

## Corresponding block in the UI

+ [Check staffing](https://docs.aws.amazon.com/connect/latest/adminguide/check-staffing.html) 
+ [Check queue status](https://docs.aws.amazon.com/connect/latest/adminguide/check-queue-status.html) 

# CheckOutboundCallStatus
CheckOutboundCallStatus

Engages with the output provided by an answering machine, and provides branches to route the contact accordingly.

## Parameter object


```
{
 
}
```

## Execution results and conditions

+ "CallAnswered" if the call has been answered by a person.
+ "VoicemailBeep" if Amazon Connect identifies that the call ended in a voice mail and it detects a beep.
+ "VoicemailNoBeep" if Amazon Connect identifies that call ended in a voicemail, but it doesn't detect a beep, or the beep is unknown.
+ "NotDetected" if Amazon Connect could not detect whether there is a voicemail. This happens when Amazon Connect is unable to make a positive determination of whether a call was answered by a live voice or an answering machine. Typical situations that result in this state include long silences or excessive background noise.

Conditions are supported, but only the "Equals" operator is supported. "CallAnswered", "VoicemailBeep" , "VoicemailNoBeep" and "NotDetected" are the only supported operands.

## Errors

+ NoMatchingError if no condition matches.

## Restrictions


This action works with [Amazon Connect outbound campaigns](https://docs.aws.amazon.com/connect/latest/adminguide/enable-outbound-campaigns.html) only. 

## Corresponding block in the UI


[Check call progress](https://docs.aws.amazon.com/connect/latest/adminguide/check-call-progress.html) 

# CheckVoiceId
CheckVoiceId

Checks the enrollment status, voice authentication or fraud detection results of the voice analysis returned by Voice ID. 

## Parameter object


```
{
 "CheckVoiceIdOption": "enrollmentStatus"
}
```

```
{
 "CheckVoiceIdOption": "voiceAuthentication"
}
```

```
{
 "CheckVoiceIdOption": "fraudDetection"
}
```

## Execution results and conditions


The checkVoiceId action returns results of the voice analysis and the status returned by Voice ID. The following is returned when CheckVoiceIdOption input is set as: 
+ **enrollmentStatus**: 
  + **Enrolled**: The caller is enrolled in voice authentication.
  + **Not enrolled**: The caller has not yet been enrolled in voice authentication. When this status is returned, for example, you may want to directly route the call to an agent for enrollment.
  + **Opted out**: The caller has opted out of voice authentication.

  You are not charged for checking enrollment status. 
+ **voiceAuthentication**:
  + **Authenticated**: The caller's identity has been verified. That is, the authentication score is greater than or equal to the threshold (default threshold of 90 or your custom threshold).
  + **Not authenticated**: The authentication score is lower than threshold that you configured.
  + **Inconclusive**: Unable to analyze a caller's speech for authentication. This is usually because Voice ID did not get the required 10 seconds to provide a result for authentication. 
  + **Not enrolled**: The caller has not yet been enrolled in voice authentication. When this status is returned, for example, you may want to directly route the call to an agent for enrollment.
  + **Opted out**: The caller has opted out of voice authentication.

  You are not charged if the result is **Inconclusive**, **Not enrolled** or **Opted out**.
+ **fraudDetection**: 
  + **High risk**: The risk score meets or exceeds the set threshold.
  + **Low risk**: The risk score did not meet the set threshold.
  + **Inconclusive**: Unable to analyze a caller's voice for detection of fraudsters in a watchlist.

## Errors

+ NoMatchingError if no condition matches.

## Restrictions


Only supported for voice channel. If used with the chat or task channels, the action takes the **Error** branch. 

## Corresponding block in the UI


[Check Voice ID](https://docs.aws.amazon.com/connect/latest/adminguide/check-voice-id.html) 

# Compare
Compare

Allows comparisons against the specified value. 

## Parameter object


```
{
  "ComparisonValue": Any **single** JSONPath identifier that is valid for the flow data object
}
```

## Execution results and conditions


The value specified for comparison. This can be used for conditions.

## Errors

+ NoMatchingCondition - if no other Condition matches. 

## Restrictions


This action is available in every type of flow. 

## Corresponding block in the UI


[Check contact attributes](https://docs.aws.amazon.com/connect/latest/adminguide/check-contact-attributes.html) 

# DistributeByPercentage
DistributeByPercentage

Returns a random number between 1 and 100 (inclusive) as its result, allowing comparisons against it. 

## Parameter object


```
{
                
}
```

## Results and conditions


A number between 1 and 100, inclusive, chosen randomly. Comparisons are supported, but they must be a chain of NumericLessThan comparisons, with each subsequent comparison checking the previous value, plus the percentage that is desired to go down this next action, and no Comparison comparing a value larger than 100.

## Errors

+ NoMatchingCondition if no Condition matches. This is the default option in the flow editor.

## Restrictions


This action is available in inbound flows, transfer flows, and customer queue flows. It is not available to hold flows or to whisper flows. 

## Corresponding block in the UI


[Distribute by percentage](https://docs.aws.amazon.com/connect/latest/adminguide/distribute-by-percentage.html) 

# EndFlowExecution
EndFlowExecution

Finishes flow, but does not explicitly disconnect the participant. The participant may be disconnected by contact logic after this. For example, if a flow ends before the contact is put into queue, ending the flow results in the contact being ended. 

## Parameter object


```
{
   
}
```

## Results and conditions


None. No conditions are supported.

## Errors


None. This is always a terminal action.

## Restrictions


This action is available only in whisper flows and customer queue flows. It is not available in flows, hold flows, or transfer flows. 

## Corresponding block in the UI


[End flow / Resume](https://docs.aws.amazon.com/connect/latest/adminguide/end-flow-resume.html) 

# GetMetricData
GetMetricData

Loads real time queue metrics for the queue specified by queue ID, agent ID (for agent queues), or the target queue, and makes them available on the flow run data. May be extended in the future to allow getting historical metric data in addition to current metric data, and to getting agent metrics in addition to queue metrics. 

## Parameter object


```
{ 
  "QueueId": [Optional] A queue ID or queue ARN. If AgentId is specified, this may not be specified. *Dynamic values are supported*,
  "AgentId": [Optional] An agent ID or agent ARN, representing an agent queue. If QueueId is specified, this may not be specified. *Dynamic values are supported*
  "QueueChannel": [Optional] Either "Voice" or "Chat". Can be set dynamically. Determines the channel for which metrics are returned. If not specified, metrics are returned for all channels.
}
```

## Execution results and conditions


None. No conditions are supported.

## Errors

+ NoMatchingError - if no other Error matches.

## Restrictions


This action is available in every type of flow. 

## Corresponding block in the UI


[Get queue metrics](https://docs.aws.amazon.com/connect/latest/adminguide/get-queue-metrics.html) 

# Loop
Loop

When the same action (the same Action Identifier) is run multiple times, this block returns a result of "NotDone" a number of times equal to the specified loop count, then "Done" once, then reset. 

## Parameter object


```
{
    "LoopCount": Number of times to loop, must be between 0 and 100 (inclusive). Must either be fully static or fully dynamic.
}
```

## Execution results and conditions


"ContinueLooping" if the loop should continue. "DoneLooping" if the loop should finish. Conditions are supported, there must be a Condition provided for Equals ContinueLooping and for Equals DoneLooping, and no other Conditions can be specified.

## Errors


None.

## Restrictions


This is supported in every type of flow. 

## Corresponding block in the UI


[Loop](https://docs.aws.amazon.com/connect/latest/adminguide/loop.html) 

# StartVoiceIdStream
StartVoiceIdStream

Sends audio to Amazon Connect Voice ID to verify the caller's identity and match against fraudsters in watchlist, as soon as the call is connected to a flow.

## Parameter object


```
{
 
}
```

## Execution results and conditions


None. No conditions are supported. 

## Errors

+ NoMatchingError if no condition matches.

## Restrictions


Only supported for the voice channel. If used with the chat or task channels, the action takes the **Error** branch. Not supported in hold flows.

## Corresponding block in the UI


[Set Voice ID](https://docs.aws.amazon.com/connect/latest/adminguide/set-voice-id.html) 

# TransferToFlow
TransferToFlow

Execution jumps to a different flow, and continues running at that flow's beginning. 

## Parameter object


```
{
    "ContactFlowId": A flow ID or flow ARN. *Must be either fully static or a single valid JSONPath identifier*
}
```

## Execution results and conditions


None.

## Errors

+ NoMatchingError - if no other Error matches.

## Restrictions


This action is available in inbound flows and transfer flows. It is not available to hold flows, customer queue flows, or whisper flows. 

## Corresponding block in the UI


[Transfer to flow](https://docs.aws.amazon.com/connect/latest/adminguide/transfer-to-flow.html) 

# UpdateFlowAttributes
UpdateFlowAttributes

Sets a collection of attributes on the current flow. These attributes are not carried over to the subsequent flows. With this type of operation, either all attributes are set or none are set.

## Parameter object


```
{
    ""FlowAttributes": { An Object that holds the attributes to be set. Keys are of type String, Values are of type FlowAttribute
        "Type": {
            FlowAttribute" : "Value"
        }
    }
}
```

## Results and conditions


None. No conditions are supported.

## Errors


None.

## Restrictions


This action is supported on all channels and in all flow types. 

## Corresponding block in the UI


[Set contact attributes](https://docs.aws.amazon.com/connect/latest/adminguide/set-contact-attributes.html) 

# UpdateFlowLoggingBehavior
UpdateFlowLoggingBehavior

Enables or disables flow logging. If this is a flow, this same behavior remains unless it is overridden for the rest of the contact segment. It is also automatically inherited by new segments in the chain. 

## Parameter object


```
{ 
  "FlowLoggingBehavior": One of [Enabled,Disabled]. *Dynamic values are not supported*
}
```

## Results and conditions


None. No conditions are supported.

## Errors


None.

## Restrictions


This action is available in every type of flow. 

## Corresponding block in the UI


[Set logging behavior](https://docs.aws.amazon.com/connect/latest/adminguide/set-logging-behavior.html) 

# UpdateRoutingCriteria
UpdateRoutingCriteria

Sets the routing criteria for the contact. 

## Parameter object


```
{
    "RoutingCriteria": { Required. RoutingCriteria is a JSON object.
            "Steps": [{  Required. List of routing steps. When Amazon Connect not find an available agent meeting the requirements in a step for a given step duration, the routing criteria will move on to the next step sequentially until a join is completed with an agent. When all steps are exhausted, the contact will be offered to any agent in the queue.  May be set statically or dynamically
                "Expression": { Required. An object to specify the expression of a routing step. It is a tagged union to specify expression for a routing step.
                    "AttributeCondition": {An object to specify the predefined attribute condition.
                        "Name": The name of predefined attribute. It is a string and has length constraints between 1-64.
                        "Value": The value of predefined attribute. It is a string and has length constraints between 1-64.
                        "ProficiencyLevel": The proficiency level of the condition. It is a float value. Valid values are: 1.0, 2.0, 3.0, 4.0 and 5.0
                        "ComparisonOperator": The operator of the condition. It is a string. Valid values: NumberGreaterOrEqualTo
                    }
                   "AndExpression": [List of routing expressions (attribute conditions) which will be AND-ed together.]
                },
                "Expiry": { An object to specify the expiration of a routing step.
                    "DurationInSeconds": The number of seconds to wait before expiring the routing step. Can be set only statically
                }
            }]
        }
}
```

## Results and conditions


None. No conditions are supported.

## Errors


NoMatchingError - if no other Error matches.

## Restrictions


This action is supported on all channels and in only in Inbound flow, Customer Queue flow, Transfer to Agent flow, and Transfer to Queue flow types.

## Corresponding block in the UI


[Set routing criteria](https://docs.aws.amazon.com/connect/latest/adminguide/set-routing-criteria.html) 

# Wait
Wait

Pauses the flow for a specified duration, or until a specified event happens, whichever happens first. 

## Parameter object


```
{
    "TimeoutSeconds": The amount of time to wait before the action finishes with the "WaitCompleted" result. This can be either statically defined, or a single valid JSONPath identifier. If defined statically, this must be a positive integer value no greater than 604800 (seven days),
    "Events": An optional list of all events that can trigger an interrupt. The supported events currently are "CustomerReturned" and "BotParticipantDisconnected". This must be defined statically.
  
}
```

## Execution results and conditions


If an event interrupts the wait, the run result is the event that interrupted. If no event interrupts the Wait and the time elapses, the run result is WaitCompleted. Conditions are supported, but only the "Equals" operator is supported. "WaitCompleted" is always required operand, and every specified event is also required to be present as a condition operand.

## Errors

+ NoMatchingError - If no other Error matches.
+ ParticipantNotFound - The supported event currently is "BotParticipantDisconnected".

## Restrictions


This is supported in every type of flow, but is supported only by the chat channel. 

## Corresponding block in the UI


[Wait](https://docs.aws.amazon.com/connect/latest/adminguide/wait.html) 

# Interactions in the Amazon Connect Flow language
Interactions

Interactions actions have side effects, but they don't require a contact or a participant. They include actions such as invoking an AWS Lambda function. They generally work in every circumstance.

**Topics**
+ [AssociateContactToCustomerProfile](interactions-associatecontacttocustomerprofile.md)
+ [CreateCallbackContact](interactions-createcallbackcontact.md)
+ [CreateCustomerProfile](interactions-createcustomerprofile.md)
+ [InvokeLambdaFunction](interactions-invokelambdafunction.md)
+ [GetCustomerProfile](interactions-getcustomerprofile.md)
+ [GetCustomerProfileObject](interactions-getcustomerprofileobject.md)
+ [GetCalculatedAttributesForCustomerProfile](interactions-getcalculatedattributesforcustomerprofile.md)
+ [UpdateCustomerProfile](interactions-updatecustomerprofile.md)

# AssociateContactToCustomerProfile
AssociateContactToCustomerProfile

Associate a contact to a customer profile. Customer Profiles must be enabled for your Amazon Connect instance.

See [AddProfileKey](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_AddProfileKey.html) in the *Amazon Connect Customer Profiles API Reference*.

## Parameter object


A `ProfileId` and `ContactId` must be present.

```
{
    "ProfileRequestData": {
        "ProfileId": Profile being associated
        "ContactId": ContactId being associated
    },
   "ProfileResponseData": {
       None.
   }
}
```

## Results and conditions


None. Conditions are not supported.

## Errors

+ NoMatchingError - if no other Error matches.

## Corresponding block in the UI


[Customer profiles block](https://docs.aws.amazon.com/connect/latest/adminguide/customer-profiles-block.html) 

# CreateCallbackContact
CreateCallbackContact

Creates a new callback contact. If no customer number is specified, and this is run in context of a contact, the contact's CustomerCallbackNumber is used as the customer number. If you specify a ContactFlowId, then InitialCallDelaySeconds parameter is ignored.

## Parameter object


```
{
    "QueueId": [Optional] A queue ID or queue ARN. The callback contact is routed with this queue, or if this is not specified, the contact's current TargetQueue. Must be specified fully statically or with a single valid JSONPath identifier.
    "AgentId": [Optional] An agent ID or agent ARN, representing an agent queue. If QueueId is specified, this may not be specified. This must be either defined fully statically or as a single valid JSONPath identifier.
    "InitialCallDelaySeconds": The amount of time, in seconds, to wait at a minimum before routing the callback contact. This gives the customer enough time to end their existing contact before being called back. Must be larger than 0, no greater than 259,200 (three days), and an integer. Must be defined statically.
    "MaximumConnectionAttempts": The number of attempts at a maximum to connect this contact to a customer, if the callback is not answered. Must be larger than zero, and an integer. Must be defined statically.
    "RetryDelaySeconds": The minimum amount of time to wait, in seconds, between an unanswered callback attempt is made and the next attempt to reach the customer. Must be larger than 0, no greater than 259,200 (three days), and an integer. Must be defined statically.
    "ContactFlowId": [Optional] A contactFlow ID or contactFlow ARN. Callback contact created will execute this flow post creation, if specified. This must be either defined fully statically or as a single valid JSONPath identifier.
    "CallerId": [Optional] A caller ID representing the phone number to use for the callback. This is what the customer sees when dialed. Must be a valid phone number claimed in your Amazon Connect instance. This must be either defined fully statically or as a single valid JSONPath identifier.
}
```

## Results and conditions


None. No conditions are supported. 

## Errors

+ NoMatchingError - if no other Error matches.

## Restrictions


This action is supported in contact flows, transfer flows, and customer queue flows. It is not supported in whisper flows or hold flows.

## Corresponding block in the UI


[Set callback number](https://docs.aws.amazon.com/connect/latest/adminguide/set-callback-number.html) 

# CreateCustomerProfile
CreateCustomerProfile

Create a customer profile. Customer Profiles must be enabled for your Amazon Connect instance.

See [CreateProfile](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_CreateProfile.html) in the *Amazon Connect Customer Profiles API Reference*.

## Parameter object


```
{
"ProfileRequestData": {
    All of these fields are optional.
        "FirstName",
        "MiddleName",
        "LastName",
        "PhoneNumber",
        "EmailAddress",
        "AccountNumber",
        "AdditionalInformation",
        "PartyType",
        "BusinessName",
        "BirthDate",
        "Gender",
        "MobilePhoneNumber",
        "HomePhoneNumber",
        "BusinessPhoneNumber",
        "BusinessEmailAddress",
        "Address1",
        "Address2",
        "Address3",
        "Address4",
        "City",
        "County",
        "Country",
        "PostalCode",
        "Province",
        "State",
        "ShippingAddress1",
        "ShippingAddress2",
        "ShippingAddress3",
        "ShippingAddress4",
        "ShippingCity",
        "ShippingCounty",
        "ShippingCountry",
        "ShippingPostalCode",
        "ShippingProvince",
        "ShippingState",
        "MailingAddress1",
        "MailingAddress2",
        "MailingAddress3",
        "MailingAddress4",
        "MailingCity",
        "MailingCounty",
        "MailingCountry",
        "MailingPostalCode",
        "MailingProvince",
        "MailingState",
        "BillingAddress1",
        "BillingAddress2",
        "BillingAddress3",
        "BillingAddress4",
        "BillingCity",
        "BillingCounty",
        "BillingCountry",
        "BillingPostalCode",
        "BillingProvince",
        "BillingState",
        "Attributes.x"
    },
   "ProfileResponseData": {
       All of these fields are optional.
       Newly created profile ID is persisted under the Customer -> ProfileID attribute + $.Customer.ProfileId
        "FirstName",
        "MiddleName",
        "LastName",
        "PhoneNumber",
        "EmailAddress",
        "AccountNumber",
        "AdditionalInformation",
        "PartyType",
        "BusinessName",
        "BirthDate",
        "Gender",
        "MobilePhoneNumber",
        "HomePhoneNumber",
        "BusinessPhoneNumber",
        "BusinessEmailAddress",
        "Address1",
        "Address2",
        "Address3",
        "Address4",
        "City",
        "County",
        "Country",
        "PostalCode",
        "Province",
        "State",
        "ShippingAddress1",
        "ShippingAddress2",
        "ShippingAddress3",
        "ShippingAddress4",
        "ShippingCity",
        "ShippingCounty",
        "ShippingCountry",
        "ShippingPostalCode",
        "ShippingProvince",
        "ShippingState",
        "MailingAddress1",
        "MailingAddress2",
        "MailingAddress3",
        "MailingAddress4",
        "MailingCity",
        "MailingCounty",
        "MailingCountry",
        "MailingPostalCode",
        "MailingProvince",
        "MailingState",
        "BillingAddress1",
        "BillingAddress2",
        "BillingAddress3",
        "BillingAddress4",
        "BillingCity",
        "BillingCounty",
        "BillingCountry",
        "BillingPostalCode",
        "BillingProvince",
        "BillingState",
        "Attributes.x"
}
```

## Results and conditions


None. Conditions are not supported. If an error does not occur, the response's attributes are available dynamically under the `$.Customer` path based on the attributes included in `ProfileResponseData`.

## Errors

+ NoMatchingError - if no other Error matches.

## Corresponding block in the UI


[Customer profiles block](https://docs.aws.amazon.com/connect/latest/adminguide/customer-profiles-block.html) 

# InvokeLambdaFunction
InvokeLambdaFunction

Invokes an AWS Lambda function with a collection of optional parameters. This AWS Lambda function is also given a copy of the flow run data if there is an associated contact with the flow. 

## Parameter object


```
{
    "LambdaFunctionARN": The ARN of the AWS Lambda function to be invoked. May be defined statically or dynamically. 
    "InvocationTimeLimitSeconds": The number of seconds to wait for a response from the AWS Lambda function. Must be greater than 0, no larger than 8, and an integer. Must be set statically. 
    "InvocationType": Specifies the invocation type, allowed values: "SYNCHRONOUS" | "ASYNCHRONOUS".
    "LambdaInvocationAttributes" { A map of additional data to send to the AWS Lambda function when invoking it. Keys and values may be set statically or dynamically.
    }
    "ResponseValidation": {
      "ResponseType": "STRING_MAP" or "JSON", If response validation is set to STRING_MAP, then the Lambda function should return a flat object of key/value pairs of the string type. Otherwise, if response validation is set to JSON, the Lambda function can return any valid JSON, including nested JSON. Must be set statically.
    }
}
```

## Results and conditions


None. Conditions are not supported. If an error does not occur, the response's attributes are available dynamically under the \$1.External path. 

## Errors

+ NoMatchingError - if no other Error matches.

## Restrictions


None. This action is supported by all channels and in all types of flows.

## Corresponding block in the UI


[AWS Lambda function](https://docs.aws.amazon.com/connect/latest/adminguide/invoke-lambda-function-block.html) 

# GetCustomerProfile
GetCustomerProfile

Retrieve a customer profile based any search identifier, up to five total. Customer Profiles must be enabled for your Amazon Connect instance.

See [SearchProfiles](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_SearchProfiles.html) in the *Amazon Connect Customer Profiles API Reference*.

## Parameter object


At least one search identifier must be present.

```
{
    "ProfileRequestData": {
        Requires either IdentiferName and IdentifierValue, or SearchCriteria.
       
        "IdentifierName": Name to search for profiles with one identifier,
        "IdentiferValue": Value to search for profiles with one identifier,
        
        "SearchCriteria": [
            {
                "IdentifierName": Name to search for profiles with multiple identifiers,
                "IdentifierValue": Value to search for profiles with multiple identifiers
            }
        ],
        Required when using SearchCriteria
        "LogicalOperator": AND or OR
        
    },
   "ProfileResponseData": {
       All of these fields are optional.
       Newly created profile ID is persisted under the Customer -> ProfileID attribute + $.Customer.ProfileId
        "FirstName",
        "MiddleName",
        "LastName",
        "PhoneNumber",
        "EmailAddress",
        "AccountNumber",
        "AdditionalInformation",
        "PartyType",
        "BusinessName",
        "BirthDate",
        "Gender",
        "MobilePhoneNumber",
        "HomePhoneNumber",
        "BusinessPhoneNumber",
        "BusinessEmailAddress",
        "Address1",
        "Address2",
        "Address3",
        "Address4",
        "City",
        "County",
        "Country",
        "PostalCode",
        "Province",
        "State",
        "ShippingAddress1",
        "ShippingAddress2",
        "ShippingAddress3",
        "ShippingAddress4",
        "ShippingCity",
        "ShippingCounty",
        "ShippingCountry",
        "ShippingPostalCode",
        "ShippingProvince",
        "ShippingState",
        "MailingAddress1",
        "MailingAddress2",
        "MailingAddress3",
        "MailingAddress4",
        "MailingCity",
        "MailingCounty",
        "MailingCountry",
        "MailingPostalCode",
        "MailingProvince",
        "MailingState",
        "BillingAddress1",
        "BillingAddress2",
        "BillingAddress3",
        "BillingAddress4",
        "BillingCity",
        "BillingCounty",
        "BillingCountry",
        "BillingPostalCode",
        "BillingProvince",
        "BillingState",
        "Attributes.x"
}
```

## Results and conditions


None. Conditions are not supported. If an error does not occur, the response's attributes are available dynamically under the `$.Customer` path based on the attributes included in `ProfileResponseData`.

## Errors

+ MultipleFoundError - if multiple profiles were found for the associated profile search key.
+ NoneFoundError - if no profiles were found for the associated profile search key.
+ NoMatchingError - if no other Error matches.

## Corresponding block in the UI


[Customer profiles block](https://docs.aws.amazon.com/connect/latest/adminguide/customer-profiles-block.html) 

# GetCustomerProfileObject
GetCustomerProfileObject

Retrieve a customer profile object of the desired type, based on recency or any search identifier. Customer Profiles must be enabled for your Amazon Connect instance.

See [ListProfileObjects](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_ListProfileObjects.html) in the *Amazon Connect Customer Profiles API Reference*.

## Parameter object


A `ProfileId` and `ObjectType` must be present. Either `UseLatest`, or `IdentifierName` and `IdentifierValue` must be present.

```
{
    "ProfileRequestData": {
        "ProfileId": Profile owning the object,
        "ObjectType": Type of object being retrieved,
        
        "IdentifierName": Optional name of search identifier,
        "IdentifierValue": Optional value of search identifier,
        "UseLatset": true / false 
    },
   "ProfileResponseData": {
       All of these fields are optional.
       Asset ID, if a single asset is found, is always persisted under the Customer -> Asset -> AssetID attribute + $.Customer.Asset.AssetId
       Order ID, if a single order is found, is always persisted under the Customer -> Order -> OrderId attribute + $.Customer.Order.OrderId
       Case ID, if a single case is found, is always persisted under the Customer -> Case -> CaseID attribute + $.Customer.Case.CaseId
        "AssetAssetId",
        "AssetProfileId",
        "AssetAssetName",
        "AssetSerialNumber",
        "AssetModelNumber",
        "AssetModelName",
        "AssetProductSKU",
        "AssetPurchaseDate",
        "AssetUsageEndDate",
        "AssetStatus",
        "AssetPrice",
        "AssetQuantity",
        "AssetDescription",
        "AssetAdditionalInformation",
        "AssetDataSource",
        "AssetAttributes.x",
        "OrderOrderId",
        "OrderProfileId",
        "OrderCustomerEmail",
        "OrderCustomerPhone",
        "OrderCreatedDate",
        "OrderUpdatedDate",
        "OrderProcessedDate",
        "OrderClosedDate",
        "OrderCancelledDate",
        "OrderCancelReason",
        "OrderName",
        "OrderAdditionalInformation",
        "OrderGateway",
        "OrderStatus",
        "OrderStatusCode",
        "OrderStatusUrl",
        "OrderCreditCardNumber",
        "OrderCreditCardCompany",
        "OrderFulfillmentStatus",
        "OrderTotalPrice",
        "OrderTotalTax",
        "OrderTotalDiscounts",
        "OrderTotalItemsPrice",
        "OrderTotalShippingPrice",
        "OrderTotalTipReceived",
        "OrderCurrency",
        "OrderTotalWeight",
        "OrderBillingName",
        "OrderBillingAddress1",
        "OrderBillingAddress2",
        "OrderBillingAddress3",
        "OrderBillingAddress4",
        "OrderBillingCity",
        "OrderBillingCounty",
        "OrderBillingCountry",
        "OrderBillingPostalCode",
        "OrderBillingProvince",
        "OrderBillingState",
        "OrderShippingName",
        "OrderShippingAddress1",
        "OrderShippingAddress2",
        "OrderShippingAddress3",
        "OrderShippingAddress4",
        "OrderShippingCity",
        "OrderShippingCounty",
        "OrderShippingCountry",
        "OrderShippingPostalCode",
        "OrderShippingProvince",
        "OrderShippingState",
        "OrderAttributes.x",
        "CaseCaseId",
        "CaseProfileId",
        "CaseTitle",
        "CaseSummary",
        "CaseStatus",
        "CaseReason",
        "CaseCreatedBy",
        "CaseCreatedDate",
        "CaseUpdatedDate",
        "CaseClosedDate",
        "CaseAdditionalInformation",
        "CaseDataSource",
        "CaseAttributes.x",
        "ObjectAttributes.x"
   }
}
```

## Results and conditions


None. Conditions are not supported. If an error does not occur, the response's attributes are available dynamically under the `$.Customer` path based on the attributes included in `ProfileResponseData`.

## Errors

+ NoneFoundError - if no profiles were found for the associated profile search key.
+ NoMatchingError - if no other Error matches.

## Corresponding block in the UI


[Customer profiles block](https://docs.aws.amazon.com/connect/latest/adminguide/customer-profiles-block.html) 

# GetCalculatedAttributesForCustomerProfile
GetCalculatedAttributesForCustomerProfile

Retrieve calculated attributes for a customer profile. Customer Profiles must be enabled for your Amazon Connect instance.

## Parameter object


A `ProfileId` must be present.

```
{
    "ProfileRequestData": {
        "ProfileId": Profile owning the calculated attribute
    },
   "ProfileResponseData": {
       All of these fields are optional.
       "CalculatedAttributes._average_hold_time",
       "CalculatedAttributes._frequent_caller",
       "CalculatedAttributes.x",
   }
}
```

## Results and conditions


None. Conditions are not supported. If an error does not occur, the response's attributes are available dynamically under the `$.Customer` path based on the attributes included in `ProfileResponseData`.

## Errors

+ NoneFoundError - if no profiles were found for the associated profile search key.
+ NoMatchingError - if no other Error matches.

## Corresponding block in the UI


[Customer profiles block](https://docs.aws.amazon.com/connect/latest/adminguide/customer-profiles-block.html) 

# UpdateCustomerProfile
UpdateCustomerProfile

Update a customer profile that was previously created or retrieved in the flow. Customer Profiles must be enabled for your Amazon Connect instance.

See [UpdateProfile](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_UpdateProfile.html) in the *Amazon Connect Customer Profiles API Reference*.

## Parameter object


```
{
"ProfileRequestData": {
    All of these fields are optional.
        "FirstName",
        "MiddleName",
        "LastName",
        "PhoneNumber",
        "EmailAddress",
        "AccountNumber",
        "AdditionalInformation",
        "PartyType",
        "BusinessName",
        "BirthDate",
        "Gender",
        "MobilePhoneNumber",
        "HomePhoneNumber",
        "BusinessPhoneNumber",
        "BusinessEmailAddress",
        "Address1",
        "Address2",
        "Address3",
        "Address4",
        "City",
        "County",
        "Country",
        "PostalCode",
        "Province",
        "State",
        "ShippingAddress1",
        "ShippingAddress2",
        "ShippingAddress3",
        "ShippingAddress4",
        "ShippingCity",
        "ShippingCounty",
        "ShippingCountry",
        "ShippingPostalCode",
        "ShippingProvince",
        "ShippingState",
        "MailingAddress1",
        "MailingAddress2",
        "MailingAddress3",
        "MailingAddress4",
        "MailingCity",
        "MailingCounty",
        "MailingCountry",
        "MailingPostalCode",
        "MailingProvince",
        "MailingState",
        "BillingAddress1",
        "BillingAddress2",
        "BillingAddress3",
        "BillingAddress4",
        "BillingCity",
        "BillingCounty",
        "BillingCountry",
        "BillingPostalCode",
        "BillingProvince",
        "BillingState",
        "Attributes.x"
    },
   "ProfileResponseData": {
       All of these fields are optional.
       Newly created profile ID is persisted under the Customer -> ProfileID attribute + $.Customer.ProfileId
        "FirstName",
        "MiddleName",
        "LastName",
        "PhoneNumber",
        "EmailAddress",
        "AccountNumber",
        "AdditionalInformation",
        "PartyType",
        "BusinessName",
        "BirthDate",
        "Gender",
        "MobilePhoneNumber",
        "HomePhoneNumber",
        "BusinessPhoneNumber",
        "BusinessEmailAddress",
        "Address1",
        "Address2",
        "Address3",
        "Address4",
        "City",
        "County",
        "Country",
        "PostalCode",
        "Province",
        "State",
        "ShippingAddress1",
        "ShippingAddress2",
        "ShippingAddress3",
        "ShippingAddress4",
        "ShippingCity",
        "ShippingCounty",
        "ShippingCountry",
        "ShippingPostalCode",
        "ShippingProvince",
        "ShippingState",
        "MailingAddress1",
        "MailingAddress2",
        "MailingAddress3",
        "MailingAddress4",
        "MailingCity",
        "MailingCounty",
        "MailingCountry",
        "MailingPostalCode",
        "MailingProvince",
        "MailingState",
        "BillingAddress1",
        "BillingAddress2",
        "BillingAddress3",
        "BillingAddress4",
        "BillingCity",
        "BillingCounty",
        "BillingCountry",
        "BillingPostalCode",
        "BillingProvince",
        "BillingState",
        "Attributes.x"
}
```

## Results and conditions


None. Conditions are not supported. If an error does not occur, the response's attributes are available dynamically under the `$.Customer` path based on the attributes included in `ProfileResponseData`.

## Errors

+ NoMatchingError - if no other Error matches.

## Corresponding block in the UI


[Customer profiles block](https://docs.aws.amazon.com/connect/latest/adminguide/customer-profiles-block.html) 

# Participant actions in the Amazon Connect Flow language
Participant actions

Participant actions are attempted only when the flow is run in context of a participant. They generally result in an action that the participant experiences, such as playing a prompt or disconnecting.

**Topics**
+ [ConnectParticipantWithLexBot](participant-actions-connectparticipantwithlexbot.md)
+ [DisconnectParticipant](participant-actions-disconnectparticipant.md)
+ [GetParticipantInput](participant-actions-getparticipantinput.md)
+ [MessageParticipant](participant-actions-messageparticipant.md)
+ [MessageParticipantIteratively](participant-actions-messageparticipantiteratively.md)
+ [ShowView](participant-actions-showview.md)

# ConnectParticipantWithLexBot
ConnectParticipantWithLexBot

Connects the participant with the specified Amazon Lex bot. When the interaction is over, the Intent and Slots of the bot are available to the flow during its run. 

## Action syntax


```
{
      "Parameters": {
        "PromptId": "string",
        "Text": "string",
        "SSML": "string",
        "Media": {
            "Uri": "string",
            "SourceType": "string",
            "MediaType": "string"
        },
        "LexV2Bot": {
          "AliasArn": "string"
        },
        "LexBot": {
            "Name": "string",
            "Region": "string",
            "Alias": "string"
        },
        "LexSessionAttributes": {
          "string": "string"
        },
        "LexInitilizationData": {
          "InitialMessage": "string"
        },
        "LexTimeoutSeconds": {
          "Text": "number"
        }
      },
      "Identifier": "string",
      "Type": "ConnectParticipantWithLexBot",
      "Transitions": {
        "NextAction": "string",
        "Errors": [
          {
            "NextAction": "string",
            "ErrorType": "InputTimeLimitExceeded"
          },
          {
            "NextAction": "string",
            "ErrorType": "NoMatchingError"
          },
          {
            "NextAction": "string",
            "ErrorType": "NoMatchingCondition"
          }
        ]
      }
    }
```

## Parameter object


Provide either LexBot or LexV2Bot object depending on the Amazon Lex version in the following format.

 **PromptId** 

 A prompt ID or prompt ARN to play to the participant along with gathering input. This is an optional property and is not required if Text or SSML is specified. This must be either statically defined or a single valid JSONPath identifier. 

 Type: String 

 Required: No 

 **Text** 

 An optional string that defines text to send to the participant along with gathering input. May not be specified if PromptId or SSML is also specified. May be defined statically or dynamically. 

 Type: String 

 Required: No 

 **SSML** 

 An optional string that defines SSML to send to the participant along with gathering input. May not be specified if Text or PromptId is also specified. May be defined statically or dynamically. 

 Type: String 

 Required: No 

 **Media** 

 An optional object that defines an external media source.
+ **Uri**: Location of the message.
+ **SourceType**: The source from which the message will be fetched. The only supported type is S3.
+ **MediaType**: The type of the message to be played. The only supported type is Audio.

 **LexV2Bot** 

 The details of the LexV2 bot to invoke.
+ **AliasArn**: The alias ARN of the LexV2 bot to invoke. May be specified statically or dynamically.

 Required: Yes 

 **LexSessionAttributes** 

 A map of session attributes to pass to the Amazon LexV2 bot when it is invoked. The keys and values may be static or dynamic. 

 Required: No 

 **LexInitializationData** 

 A mapping that defines the initialization data which will be passed to Lex to prime the bot to improve end-customer experience. Lex initialization experience is only supported for Chat channel today. The Voice channel is not supported.
+ **InitialMessage**: An optional string that defines the initial message parsed to Lex to prime the bot. The value for InitialMessage parameter is always serialized to\$1.Media.InitialMessage which resolves to the customer's initial chat message.

 Required: No 

**Note**  
 If the initial message attribute is not included as part of the contact, it will result in the Get customer input block taking the error branch in the flow. To have separate flow configurations for different messaging types, such as web chat, SMS, or Apple Messages for Business, you can use the Check contact attributes block prior to using the Get customer input block to verify the initial message is available. 

 **LexTimeoutSeconds** 

 A mapping that defines the length of Lex timer in second, which will timeout inactive customers in a Lex interaction.
+ **Text**: An optional string that defines the Lex timer length for chat.

 Required: No 

## Transitions


If the Amazon Lex interaction succeeds, the result is the Intent of the bot. Conditions are supported, but only the Equals operator is supported within these conditions.

## Errors

+ **NoMatchingCondition**: If no specified condition evaluated to True.
+ **NoMatchingError**: If an error occurred and no other error matched.
+ **InputTimeLimitExceeded**: if there is no response before the configured LexTimeoutSeconds.

## Conditions

+ **NextAction**: A string that contains the Identifier of the Action that should be run after this Action, if no error or condition is preferentially chosen.
+ **Supported Conditions**: Conditions are supported but only the EQUALS operator may be used on conditions. 

## Restrictions


This action is supported by all channels.

This action is available only in contact flows, transfer flows, and customer queue flows. It is not available in whisper flows or hold flows.

## Corresponding block in the UI


[Get customer input](https://docs.aws.amazon.com/connect/latest/adminguide/get-customer-input.html) 

# DisconnectParticipant
DisconnectParticipant

Disconnects the participant from the contact and stops this flow from running. 

## Parameter object


No parameters are expected.

## Results and conditions


None. Conditions are not supported.

## Errors


None.

## Restrictions


This action is supported for all channels and in contact flows, transfer flows, and customer queue flows. 

## Corresponding block in the UI


[Disconnect / hang up](https://docs.aws.amazon.com/connect/latest/adminguide/disconnect-hang-up.html) 

# GetParticipantInput
GetParticipantInput

Gathers customer input (a DTMF collection for voice contacts, or an entered string for other channels). There are many optional behaviors after gathering this: encryption, validation, storing to a "LastParticipantInput" section on the flow run data, specifying a custom DTMF terminator for voice contacts and so on. Details are in the parameter object section. 

## Parameter object


```
{
    "PromptId": [Optional] A prompt ID or prompt ARN to play to the participant along with gathering input. May not be specified if Text or SSML is also specified. Must be either statically defined or a single valid JSONPath identifier.
    "Text":  An optional string that defines text to send to the participant along with gathering input. May not be specified if PromptId or SSML is also specified. May be defined statically or dynamically.
    "SSML": An optional string that defines SSML to send to the participant along with gathering input. May not be specified if Text or PromptId is also specified. May be defined statically or dynamically. 
    "Media": { An optional object that defines an external media source
        "Uri": Location of the message
        "SourceType": The source from which the message will be fetched. The only supported type is S3
        "MediaType": The type of the message to be played. The only supported type is Audio
    }
    "InputTimeLimitSeconds": The number of seconds to wait for input to be collected before proceeding with a timeout error. For the Voice channel this is the timeout until the *first* DTMF digit is entered. Must be defined statically, and must be a valid integer larger than zero.
    "StoreInput": "True" or "False". Must be statically defined.
    "InputValidation": { An object that defines how to validate customer inputs, required if and only if StoreInput is True
        "PhoneNumberValidation": { Optional, one of the ways to validate inputs, make sure that it's a valid phone number. May not be specified if CustomValidation is specified.
             "NumberFormat": "Local" or "E164". If "Local" is specified, it is validated to be a local number (without the + and the country code), "E164" enforces that the customer input is a fully defined e.164 phone number. Must be defined statically.
             "CountryCode": If the number format is "Local", this must be defined. This is the two letter country code to be associated with the input number when validating. Must be defined statically. 
        }
        "CustomValidation": { Optional, the other way to validate inputs. May not be specified if PhoneNumberValidation is specified.
            "MaximumLength": A number representing the maximum length of the input. May be defined statically or dynamically.
        }
    },
    "InputEncryption": { An optional object that defines how to encrypt the customer input. May only be specified if "CustomValidation" is provided.
        "EncryptionKeyId": The identifier of a key that has been uploaded in the AWS console for the purposes of customer input encryption. May be specified statically or dynamically.
        "Key": The PEM definition of the public key to use to encrypt this data. This key must be signed with the encryption key identified by the EncryptionKeyId. May be specified statically or dynamically. 
    },
    "DTMFConfiguration": { An optional object to override default DTMF behavior for voice calls
        "InputTerminationSequence": Up to five digits to serve as the terminating sequence when gathering DTMF
        "DisableCancelKey": "True" or "False". If "True", the "*" key doesn't cancel gathering DTMF digits.
        "InterdigitTimeLimitSeconds": The number of seconds to wait between each DTMF digit entry before proceeding with a timeout error. This timeout applies after the first digit has been entered and resets after each subsequent digit. May be defined statically or dynamically, and must be a valid integer between 1 and 20 seconds.
    }
}
```

## Results and conditions


If the "StoreInput" option is "True", there is no run result and conditions are not supported. If the "StoreInput" option is not defined or is "False", the run result is the participant input, and conditions are supported but only the Equals operator may be used on conditions. The values being compared must be static and be a single character - 0-9 numeric, \$1, or \$1.

## Errors

+ NoMatchingCondition - None of the specified conditions evaluated to true. Must be defined only if StoreInput is False.
+ NoMatchingError - if no other Error matches. Must always be defined.
+ InvalidPhoneNumber - the stored input was not a valid phone number according to the specified PhoneNumberValidation. Must be defined only if StoreInput is true, and PhoneNumberValidation is specified.
+ InputTimeLimitExceeded - if there is no response before the configured InputTimeLimitSeconds.

## Restrictions


This action is only supported on the voice channel.

This action can be used in contact flows, transfer flows, and customer queue flows but not in whisper flows or hold flows.

## Corresponding block in the UI


[Get customer input](https://docs.aws.amazon.com/connect/latest/adminguide/get-customer-input.html) 

# MessageParticipant
MessageParticipant

Sends a message to the participant. This is an audio prompt or text-to-speech for voice contacts, or a text message for other channels. 

## Parameter object


```
{
    "PromptId": [Optional] A prompt ID or prompt ARN to play to the participant along with gathering input. May not be specified if Text or SSML is also specified. Must be specified either statically or as a single valid JSONPath identifier.
    "Text":  An optional string that defines text to send to the participant along with gathering input. May not be specified if PromptId or SSML is also specified. May be specified statically or dynamically.
    "SSML": An optional string that defines SSML to send to the participant along with gathering input. May not be specified if Text or PromptId is also specified May be specified statically or dynamically.
    "Media": { An optional object that defines an external media source
        "Uri": Location of the message
        "SourceType": The source from which the message will be fetched. The only supported type is S3
        "MediaType": The type of the message to be played. The only supported type is Audio
    }
}
```

## Results and conditions


None. No conditions are supported.

## Errors


NoMatchingError - If an error occurred and no other error matched.

## Restrictions


This action is supported in contact flows, transfer flows, whisper flows, and customer queue flows. It is not supported in hold flows.

"PromptId" and "SSML" are only supported for the voice channel. All other channels support only the "Text" option.

## Corresponding block in the UI


[Play](https://docs.aws.amazon.com/connect/latest/adminguide/play.html) 

# MessageParticipantIteratively
MessageParticipantIteratively

Loops a sequence of prompts while a customer or agent is on hold or in queue. This block can be configured with an interruption timeout when in a Queue flow that interrupts the message loop to run other flow logic. The message loop can include entries for both Text and Prompts. 

## Parameter object


```
{
   "Messages" : [ A List of messages to be played in a loop. These are defined with either TTS or a Prompt
       {
         "Text" : An optional string that defines text to send to the participant
       },
       {
         "PromptId" : A prompt ID or prompt ARN to play to the participant
       },
       { 
         "SSML" : An optional string that defines the ssml  
       },
       {
         "Media": { An optional object that defines an external media source
           "Uri": Location of the message
           "SourceType": The source from which the message will be fetched. The only supported type is S3
           "MediaType": The type of the message to be played. The only supported type is Audio
         }
       }
       
   ],
   "InterruptFrequencySeconds" : [Optional] Time to elapse before the action completes with "MessagesInterrupted" run result 
}
```

## Results and conditions


When the timeout elapses, the action completes with the result as "MessagesInterrupted". Conditions are supported, but only the "Equals" operator is supported. The only supported operand is MessagesInterrupted.

## Errors

+ NoMatchingError - if no other Error matches.

## Restrictions


This action is supported in Customer Queue, Customer Hold, and Agent Hold flows.

"PromptId" is supported only for the Voice channel, all other channels support only the "Text" option.

If this action is used on the chat channel, it immediately takes the error branch. If no error branch is available, the flow stop running and the contact is routed to next available agent. 

## Corresponding block in the UI


[Loop prompt](https://docs.aws.amazon.com/connect/latest/adminguide/loop-prompts.html) 

# ShowView
ShowView

Initiates a UI-based workflow that can be surfaced to users of front end applications. This action can be used to create [step-by-step guides ](https://docs.aws.amazon.com/connect/latest/adminguide/step-by-step-guided-experiences.html) for agents who are using the Amazon Connect agent workspace.

## Parameter object


```
{
    "ViewResource": {
        "Id": "Id of the View Resource that will be shown in the UI.",
        "Version": "Version of the View Resource that will be shown in the UI."
    },
    "InvocationTimeLimitSeconds": 400,
    "ViewData": {
        "Description": "An optional map of data that will be passed to the View Resource. Keys and values may be set statically or dynamically."
    },
    "SensitiveDataConfiguration": {
        "HideResponseOn": ["TRANSCRIPT"]
    }
}
```

## Results and conditions


The result that the user selects when interacting with the View. The available conditions will be dependent on the View resource specified in action parameters.

## Errors

+ NoMatchingError - if no other Error matches.
+ NoMatchingCondition - if no other Condition matches.
+ TimeLimitExceeded - if there is no response before the configured `InvocationTimeLimitSeconds`.

## Restrictions


This action is only supported on the chat channel.

This action can be used in inbound flows and customer queue flows.

To ensure reliable show view rendering, limit combined inputs and contact attributes to 16KB or less.

## Corresponding block in the UI


 [Show View](https://docs.aws.amazon.com/connect/latest/adminguide/show-view-block.html) 

This action routes step-by-step guides that are to be displayed to agents in the agent workspace. It routes the guides as chat contacts. This type of chat contact is different from the customer-based contact that the agent is handling.

This action can only be used in inbound contact flows.