2026/10/30 - Amazon Connect Service - 5 updated api methods
Changes Amazon Connect adds tag-based access control for Contact Lens rules. ListRealtimeContactAnalysisSegmentsV2 adds a ListFilter to return only category segments whose rules match given tags. PreEvaluationFilter now supports contact evaluation resources for OnContactEvaluationSubmit rules.
{'PreEvaluationFilters': {'AndConditions': {'ResourceType': {'CONTACT_EVALUATION'}}}}
Creates a rule for the specified Connect Customer instance.
Use the Rules Function language to code conditions for the rule.
See also: AWS API Documentation
Request Syntax
client.create_rule(
InstanceId='string',
Name='string',
TriggerEventSource={
'EventSourceName': 'OnPostCallAnalysisAvailable'|'OnRealTimeCallAnalysisAvailable'|'OnRealTimeChatAnalysisAvailable'|'OnPostChatAnalysisAvailable'|'OnAfterCallWorkAvailable'|'OnAfterChatWorkAvailable'|'OnEmailAnalysisAvailable'|'OnZendeskTicketCreate'|'OnZendeskTicketStatusUpdate'|'OnSalesforceCaseCreate'|'OnContactEvaluationSubmit'|'OnMetricDataUpdate'|'OnCaseCreate'|'OnCaseUpdate'|'OnSlaBreach'|'OnAlertUpdate'|'OnSchedulePublish'|'OnScheduleUpdate'|'OnScheduleTimeOffRequestActivity',
'IntegrationAssociationId': 'string'
},
Function='string',
Actions=[
{
'ActionType': 'CREATE_TASK'|'ASSIGN_CONTACT_CATEGORY'|'GENERATE_EVENTBRIDGE_EVENT'|'SEND_NOTIFICATION'|'CREATE_CASE'|'UPDATE_CASE'|'ASSIGN_SLA'|'END_ASSOCIATED_TASKS'|'SUBMIT_AUTO_EVALUATION'|'EXTRACT_INFORMATION'|'SEND_IN_APP_NOTIFICATION',
'TaskAction': {
'Name': 'string',
'Description': 'string',
'ContactFlowId': 'string',
'References': {
'string': {
'Value': 'string',
'Type': 'URL'|'ATTACHMENT'|'CONTACT_ANALYSIS'|'NUMBER'|'STRING'|'DATE'|'EMAIL'|'EMAIL_MESSAGE'|'EMAIL_MESSAGE_PLAIN_TEXT'|'EMAIL_MESSAGE_PLAIN_TEXT_REDACTED'|'EMAIL_MESSAGE_REDACTED',
'Status': 'AVAILABLE'|'DELETED'|'APPROVED'|'REJECTED'|'PROCESSING'|'FAILED'|'DRAFTING',
'Arn': 'string',
'StatusReason': 'string'
}
}
},
'EventBridgeAction': {
'Name': 'string'
},
'AssignContactCategoryAction': {}
,
'SendNotificationAction': {
'DeliveryMethod': 'EMAIL',
'Subject': 'string',
'Content': 'string',
'ContentType': 'PLAIN_TEXT',
'Recipient': {
'UserTags': {
'string': 'string'
},
'UserIds': [
'string',
]
},
'Exclusion': {
'UserTags': {
'string': 'string'
},
'UserIds': [
'string',
]
}
},
'CreateCaseAction': {
'Fields': [
{
'Id': 'string',
'Value': {
'BooleanValue': True|False,
'DoubleValue': 123.0,
'EmptyValue': {}
,
'StringValue': 'string'
}
},
],
'TemplateId': 'string'
},
'UpdateCaseAction': {
'Fields': [
{
'Id': 'string',
'Value': {
'BooleanValue': True|False,
'DoubleValue': 123.0,
'EmptyValue': {}
,
'StringValue': 'string'
}
},
]
},
'AssignSlaAction': {
'SlaAssignmentType': 'CASES',
'CaseSlaConfiguration': {
'Name': 'string',
'Type': 'CaseField',
'FieldId': 'string',
'TargetFieldValues': [
{
'BooleanValue': True|False,
'DoubleValue': 123.0,
'EmptyValue': {}
,
'StringValue': 'string'
},
],
'TargetSlaMinutes': 123
}
},
'EndAssociatedTasksAction': {}
,
'SubmitAutoEvaluationAction': {
'EvaluationFormId': 'string'
},
'ExtractInformationAction': {
'RulesExtractionDefinitions': [
{
'Identifier': 'string'
},
]
},
'SendInAppNotificationAction': {
'Content': {
'string': 'string'
},
'Recipient': {
'UserTags': {
'string': 'string'
},
'UserIds': [
'string',
]
},
'Exclusion': {
'UserTags': {
'string': 'string'
},
'UserIds': [
'string',
]
},
'Priority': 'HIGH'|'LOW'
}
},
],
PublishStatus='DRAFT'|'PUBLISHED',
PreEvaluationFilters={
'AndConditions': [
{
'ResourceType': 'CONTACT'|'CONTACT_EVALUATION',
'FilterType': 'TAG',
'FilterKey': 'string',
'FilterValue': 'string',
'Operator': 'EQUALS'
},
]
},
ClientToken='string',
Tags={
'string': 'string'
}
)
string
[REQUIRED]
The identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
string
[REQUIRED]
A unique name for the rule.
dict
[REQUIRED]
The event source to trigger the rule.
EventSourceName (string) -- [REQUIRED]
The name of the event source.
IntegrationAssociationId (string) --
The identifier for the integration association.
string
[REQUIRED]
The conditions of the rule.
list
[REQUIRED]
A list of actions to be run when the rule is triggered.
(dict) --
Information about the action to be performed when a rule is triggered.
ActionType (string) -- [REQUIRED]
The type of action that creates a rule.
TaskAction (dict) --
Information about the task action. This field is required if TriggerEventSource is one of the following values: OnZendeskTicketCreate | OnZendeskTicketStatusUpdate | OnSalesforceCaseCreate
Name (string) -- [REQUIRED]
The name. Supports variable injection. For more information, see JSONPath reference in the Connect Customer Administrators Guide.
Description (string) --
The description. Supports variable injection. For more information, see JSONPath reference in the Connect Customer Administrators Guide.
ContactFlowId (string) -- [REQUIRED]
The identifier of the flow.
References (dict) --
Information about the reference when the referenceType is URL. Otherwise, null. (Supports variable injection in the Value field.)
(string) --
(dict) --
Well-formed data on a contact, used by agents to complete a contact request. You can have up to 4,096 UTF-8 bytes across all references for a contact.
Value (string) --
A valid value for the reference. For example, for a URL reference, a formatted URL that is displayed to an agent in the Contact Control Panel (CCP).
Type (string) -- [REQUIRED]
The type of the reference. DATE must be of type Epoch timestamp.
Status (string) --
Status of the attachment reference type.
Arn (string) --
The Amazon Resource Name (ARN) of the reference
StatusReason (string) --
Relevant details why the reference was not successfully created.
EventBridgeAction (dict) --
Information about the EventBridge action.
Supported only for TriggerEventSource values: OnPostCallAnalysisAvailable | OnRealTimeCallAnalysisAvailable | OnRealTimeChatAnalysisAvailable | OnPostChatAnalysisAvailable | OnContactEvaluationSubmit | OnMetricDataUpdate
Name (string) -- [REQUIRED]
The name.
AssignContactCategoryAction (dict) --
Information about the contact category action.
Supported only for TriggerEventSource values: OnPostCallAnalysisAvailable | OnRealTimeCallAnalysisAvailable | OnRealTimeChatAnalysisAvailable | OnPostChatAnalysisAvailable | OnZendeskTicketCreate | OnZendeskTicketStatusUpdate | OnSalesforceCaseCreate
SendNotificationAction (dict) --
Information about the send notification action.
Supported only for TriggerEventSource values: OnPostCallAnalysisAvailable | OnRealTimeCallAnalysisAvailable | OnRealTimeChatAnalysisAvailable | OnPostChatAnalysisAvailable | OnContactEvaluationSubmit | OnMetricDataUpdate
DeliveryMethod (string) -- [REQUIRED]
Notification delivery method.
Subject (string) --
The subject of the email if the delivery method is EMAIL. Supports variable injection. For more information, see JSONPath reference in the Connect Customer Administrators Guide.
Content (string) -- [REQUIRED]
Notification content. Supports variable injection. For more information, see JSONPath reference in the Connect Customer Administrators Guide.
ContentType (string) -- [REQUIRED]
Content type format.
Recipient (dict) -- [REQUIRED]
Notification recipient.
UserTags (dict) --
The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }. Connect Customer users with the specified tags will be notified.
(string) --
(string) --
UserIds (list) --
A list of user IDs. Supports variable injection of $.ContactLens.ContactEvaluation.Agent.AgentId for OnContactEvaluationSubmit event source.
(string) --
Exclusion (dict) --
Recipients to exclude from notification.
UserTags (dict) --
The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }. Connect Customer users with the specified tags will be notified.
(string) --
(string) --
UserIds (list) --
A list of user IDs. Supports variable injection of $.ContactLens.ContactEvaluation.Agent.AgentId for OnContactEvaluationSubmit event source.
(string) --
CreateCaseAction (dict) --
Information about the create case action.
Supported only for TriggerEventSource values: OnPostCallAnalysisAvailable | OnPostChatAnalysisAvailable.
Fields (list) -- [REQUIRED]
An array of objects with Field ID and Value data.
(dict) --
Object for case field values.
Id (string) -- [REQUIRED]
Unique identifier of a field.
Value (dict) -- [REQUIRED]
Union of potential field value types.
BooleanValue (boolean) --
A Boolean number value type.
DoubleValue (float) --
A Double number value type.
EmptyValue (dict) --
An empty value.
StringValue (string) --
String value type.
TemplateId (string) -- [REQUIRED]
A unique identifier of a template.
UpdateCaseAction (dict) --
Information about the update case action.
Supported only for TriggerEventSource values: OnCaseCreate | OnCaseUpdate.
Fields (list) -- [REQUIRED]
An array of objects with Field ID and Value data.
(dict) --
Object for case field values.
Id (string) -- [REQUIRED]
Unique identifier of a field.
Value (dict) -- [REQUIRED]
Union of potential field value types.
BooleanValue (boolean) --
A Boolean number value type.
DoubleValue (float) --
A Double number value type.
EmptyValue (dict) --
An empty value.
StringValue (string) --
String value type.
AssignSlaAction (dict) --
Information about the assign SLA action.
SlaAssignmentType (string) -- [REQUIRED]
Type of SLA assignment.
CaseSlaConfiguration (dict) --
The SLA configuration for Case SLA Assignment.
Name (string) -- [REQUIRED]
Name of an SLA.
Type (string) -- [REQUIRED]
Type of SLA for Case SlaAssignmentType.
FieldId (string) --
Unique identifier of a Case field.
TargetFieldValues (list) --
Represents a list of target field values for the fieldId specified in CaseSlaConfiguration. The SLA is considered met if any one of these target field values matches the actual field value.
(dict) --
Object to store union of Field values.
BooleanValue (boolean) --
A Boolean number value type.
DoubleValue (float) --
A Double number value type.
EmptyValue (dict) --
An empty value.
StringValue (string) --
String value type.
TargetSlaMinutes (integer) -- [REQUIRED]
Target duration in minutes within which an SLA should be completed.
EndAssociatedTasksAction (dict) --
Information about the end associated tasks action.
Supported only for TriggerEventSource values: OnCaseUpdate.
SubmitAutoEvaluationAction (dict) --
Information about the submit automated evaluation action.
EvaluationFormId (string) -- [REQUIRED]
The identifier of the auto-evaluation enabled form.
ExtractInformationAction (dict) --
Information about the extract information action.
RulesExtractionDefinitions (list) -- [REQUIRED]
The list of extraction definition identifiers that specify what data to extract.
(dict) --
An identifier that references an extraction definition resource.
Identifier (string) -- [REQUIRED]
The identifier of the extraction definition.
SendInAppNotificationAction (dict) --
Information about the send in-app notification action.
Supported only for TriggerEventSource values: OnPostCallAnalysisAvailable | OnRealTimeCallAnalysisAvailable | OnRealTimeChatAnalysisAvailable | OnPostChatAnalysisAvailable | OnAfterCallWorkAvailable | OnAfterChatWorkAvailable | OnEmailAnalysisAvailable | OnContactEvaluationSubmit | OnCaseCreate | OnCaseUpdate | OnSlaBreach | OnSchedulePublish | OnScheduleUpdate | OnScheduleTimeOffRequestActivity
Content (dict) -- [REQUIRED]
Notification content. Supports variable injection. For more information, see JSONPath reference in the Connect Customer Administrators Guide.
(string) --
The locale code for localized content. Supported values include en_US, de_DE, es_ES, fr_FR, id_ID, it_IT, ja_JP, ko_KR, pt_BR, zh_CN, and zh_TW.
(string) --
A localized string value. Maximum length is 500 visible characters. In a markdown link of the form [label](url), only the label counts toward the limit.
Recipient (dict) -- [REQUIRED]
Notification recipient.
UserTags (dict) --
The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }. Connect Customer users with the specified tags will be notified.
(string) --
(string) --
UserIds (list) --
A list of user IDs. Supports variable injection of $.ContactLens.ContactEvaluation.Agent.AgentId for OnContactEvaluationSubmit event source.
(string) --
Exclusion (dict) --
Recipients to exclude from notification.
UserTags (dict) --
The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }. Connect Customer users with the specified tags will be notified.
(string) --
(string) --
UserIds (list) --
A list of user IDs. Supports variable injection of $.ContactLens.ContactEvaluation.Agent.AgentId for OnContactEvaluationSubmit event source.
(string) --
Priority (string) --
Notification priority.
string
[REQUIRED]
The publish status of the rule.
dict
The pre-evaluation filters for the rule, that restrict the rule to be applied to only certain resources based on the resource's attributes, such as tags assigned to a contact. The pre-evaluation filters are applied even before rule conditions are evaluated and are used to enforce tag-based-access-control while applying rules.
AndConditions (list) --
A list of conditions that the rule evaluates together using AND logic. All conditions must be met for the event to be evaluated by the rule.
(dict) --
A single pre-evaluation filter condition. Specifies a resource type, filter type, key, value, and operator to match against a resource attribute.
ResourceType (string) -- [REQUIRED]
The type of resource to filter on. Valid values:
CONTACT - Filter on attributes of the contact, such as tags assigned to the contact.
CONTACT_EVALUATION - Filter on attributes of the contact evaluation, such as tags assigned to the contact evaluation, for rules triggered on the OnContactEvaluationSubmit event source.
FilterType (string) -- [REQUIRED]
The type of filter to apply. Valid values: TAG.
FilterKey (string) -- [REQUIRED]
The key of the attribute to filter on. For tag filters, this is the tag key.
FilterValue (string) -- [REQUIRED]
The value to match against. For tag filters, this is the tag value.
Operator (string) -- [REQUIRED]
The comparison operator for the filter condition. Valid values: EQUALS.
string
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs.
This field is autopopulated if not provided.
dict
The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.
(string) --
(string) --
dict
Response Syntax
{
'RuleArn': 'string',
'RuleId': 'string'
}
Response Structure
(dict) --
RuleArn (string) --
The Amazon Resource Name (ARN) of the rule.
RuleId (string) --
A unique identifier for the rule.
{'Rule': {'PreEvaluationFilters': {'AndConditions': {'ResourceType': {'CONTACT_EVALUATION'}}}}}
Describes a rule for the specified Connect Customer instance.
See also: AWS API Documentation
Request Syntax
client.describe_rule(
InstanceId='string',
RuleId='string'
)
string
[REQUIRED]
The identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
string
[REQUIRED]
A unique identifier for the rule.
dict
Response Syntax
{
'Rule': {
'Name': 'string',
'RuleId': 'string',
'RuleArn': 'string',
'TriggerEventSource': {
'EventSourceName': 'OnPostCallAnalysisAvailable'|'OnRealTimeCallAnalysisAvailable'|'OnRealTimeChatAnalysisAvailable'|'OnPostChatAnalysisAvailable'|'OnAfterCallWorkAvailable'|'OnAfterChatWorkAvailable'|'OnEmailAnalysisAvailable'|'OnZendeskTicketCreate'|'OnZendeskTicketStatusUpdate'|'OnSalesforceCaseCreate'|'OnContactEvaluationSubmit'|'OnMetricDataUpdate'|'OnCaseCreate'|'OnCaseUpdate'|'OnSlaBreach'|'OnAlertUpdate'|'OnSchedulePublish'|'OnScheduleUpdate'|'OnScheduleTimeOffRequestActivity',
'IntegrationAssociationId': 'string'
},
'RuleCapabilityTiers': [
'GenerativeAI',
],
'Function': 'string',
'Actions': [
{
'ActionType': 'CREATE_TASK'|'ASSIGN_CONTACT_CATEGORY'|'GENERATE_EVENTBRIDGE_EVENT'|'SEND_NOTIFICATION'|'CREATE_CASE'|'UPDATE_CASE'|'ASSIGN_SLA'|'END_ASSOCIATED_TASKS'|'SUBMIT_AUTO_EVALUATION'|'EXTRACT_INFORMATION'|'SEND_IN_APP_NOTIFICATION',
'TaskAction': {
'Name': 'string',
'Description': 'string',
'ContactFlowId': 'string',
'References': {
'string': {
'Value': 'string',
'Type': 'URL'|'ATTACHMENT'|'CONTACT_ANALYSIS'|'NUMBER'|'STRING'|'DATE'|'EMAIL'|'EMAIL_MESSAGE'|'EMAIL_MESSAGE_PLAIN_TEXT'|'EMAIL_MESSAGE_PLAIN_TEXT_REDACTED'|'EMAIL_MESSAGE_REDACTED',
'Status': 'AVAILABLE'|'DELETED'|'APPROVED'|'REJECTED'|'PROCESSING'|'FAILED'|'DRAFTING',
'Arn': 'string',
'StatusReason': 'string'
}
}
},
'EventBridgeAction': {
'Name': 'string'
},
'AssignContactCategoryAction': {},
'SendNotificationAction': {
'DeliveryMethod': 'EMAIL',
'Subject': 'string',
'Content': 'string',
'ContentType': 'PLAIN_TEXT',
'Recipient': {
'UserTags': {
'string': 'string'
},
'UserIds': [
'string',
]
},
'Exclusion': {
'UserTags': {
'string': 'string'
},
'UserIds': [
'string',
]
}
},
'CreateCaseAction': {
'Fields': [
{
'Id': 'string',
'Value': {
'BooleanValue': True|False,
'DoubleValue': 123.0,
'EmptyValue': {},
'StringValue': 'string'
}
},
],
'TemplateId': 'string'
},
'UpdateCaseAction': {
'Fields': [
{
'Id': 'string',
'Value': {
'BooleanValue': True|False,
'DoubleValue': 123.0,
'EmptyValue': {},
'StringValue': 'string'
}
},
]
},
'AssignSlaAction': {
'SlaAssignmentType': 'CASES',
'CaseSlaConfiguration': {
'Name': 'string',
'Type': 'CaseField',
'FieldId': 'string',
'TargetFieldValues': [
{
'BooleanValue': True|False,
'DoubleValue': 123.0,
'EmptyValue': {},
'StringValue': 'string'
},
],
'TargetSlaMinutes': 123
}
},
'EndAssociatedTasksAction': {},
'SubmitAutoEvaluationAction': {
'EvaluationFormId': 'string'
},
'ExtractInformationAction': {
'RulesExtractionDefinitions': [
{
'Identifier': 'string'
},
]
},
'SendInAppNotificationAction': {
'Content': {
'string': 'string'
},
'Recipient': {
'UserTags': {
'string': 'string'
},
'UserIds': [
'string',
]
},
'Exclusion': {
'UserTags': {
'string': 'string'
},
'UserIds': [
'string',
]
},
'Priority': 'HIGH'|'LOW'
}
},
],
'PublishStatus': 'DRAFT'|'PUBLISHED',
'PreEvaluationFilters': {
'AndConditions': [
{
'ResourceType': 'CONTACT'|'CONTACT_EVALUATION',
'FilterType': 'TAG',
'FilterKey': 'string',
'FilterValue': 'string',
'Operator': 'EQUALS'
},
]
},
'CreatedTime': datetime(2015, 1, 1),
'LastUpdatedTime': datetime(2015, 1, 1),
'LastUpdatedBy': 'string',
'Tags': {
'string': 'string'
}
}
}
Response Structure
(dict) --
Rule (dict) --
Information about the rule.
Name (string) --
The name of the rule.
RuleId (string) --
A unique identifier for the rule.
RuleArn (string) --
The Amazon Resource Name (ARN) of the rule.
TriggerEventSource (dict) --
The event source to trigger the rule.
EventSourceName (string) --
The name of the event source.
IntegrationAssociationId (string) --
The identifier for the integration association.
RuleCapabilityTiers (list) --
The list of capability tiers associated with the rule. Used for categorizing rules by capability (for example, GenerativeAI).
(string) --
Function (string) --
The conditions of the rule.
Actions (list) --
A list of actions to be run when the rule is triggered.
(dict) --
Information about the action to be performed when a rule is triggered.
ActionType (string) --
The type of action that creates a rule.
TaskAction (dict) --
Information about the task action. This field is required if TriggerEventSource is one of the following values: OnZendeskTicketCreate | OnZendeskTicketStatusUpdate | OnSalesforceCaseCreate
Name (string) --
The name. Supports variable injection. For more information, see JSONPath reference in the Connect Customer Administrators Guide.
Description (string) --
The description. Supports variable injection. For more information, see JSONPath reference in the Connect Customer Administrators Guide.
ContactFlowId (string) --
The identifier of the flow.
References (dict) --
Information about the reference when the referenceType is URL. Otherwise, null. (Supports variable injection in the Value field.)
(string) --
(dict) --
Well-formed data on a contact, used by agents to complete a contact request. You can have up to 4,096 UTF-8 bytes across all references for a contact.
Value (string) --
A valid value for the reference. For example, for a URL reference, a formatted URL that is displayed to an agent in the Contact Control Panel (CCP).
Type (string) --
The type of the reference. DATE must be of type Epoch timestamp.
Status (string) --
Status of the attachment reference type.
Arn (string) --
The Amazon Resource Name (ARN) of the reference
StatusReason (string) --
Relevant details why the reference was not successfully created.
EventBridgeAction (dict) --
Information about the EventBridge action.
Supported only for TriggerEventSource values: OnPostCallAnalysisAvailable | OnRealTimeCallAnalysisAvailable | OnRealTimeChatAnalysisAvailable | OnPostChatAnalysisAvailable | OnContactEvaluationSubmit | OnMetricDataUpdate
Name (string) --
The name.
AssignContactCategoryAction (dict) --
Information about the contact category action.
Supported only for TriggerEventSource values: OnPostCallAnalysisAvailable | OnRealTimeCallAnalysisAvailable | OnRealTimeChatAnalysisAvailable | OnPostChatAnalysisAvailable | OnZendeskTicketCreate | OnZendeskTicketStatusUpdate | OnSalesforceCaseCreate
SendNotificationAction (dict) --
Information about the send notification action.
Supported only for TriggerEventSource values: OnPostCallAnalysisAvailable | OnRealTimeCallAnalysisAvailable | OnRealTimeChatAnalysisAvailable | OnPostChatAnalysisAvailable | OnContactEvaluationSubmit | OnMetricDataUpdate
DeliveryMethod (string) --
Notification delivery method.
Subject (string) --
The subject of the email if the delivery method is EMAIL. Supports variable injection. For more information, see JSONPath reference in the Connect Customer Administrators Guide.
Content (string) --
Notification content. Supports variable injection. For more information, see JSONPath reference in the Connect Customer Administrators Guide.
ContentType (string) --
Content type format.
Recipient (dict) --
Notification recipient.
UserTags (dict) --
The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }. Connect Customer users with the specified tags will be notified.
(string) --
(string) --
UserIds (list) --
A list of user IDs. Supports variable injection of $.ContactLens.ContactEvaluation.Agent.AgentId for OnContactEvaluationSubmit event source.
(string) --
Exclusion (dict) --
Recipients to exclude from notification.
UserTags (dict) --
The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }. Connect Customer users with the specified tags will be notified.
(string) --
(string) --
UserIds (list) --
A list of user IDs. Supports variable injection of $.ContactLens.ContactEvaluation.Agent.AgentId for OnContactEvaluationSubmit event source.
(string) --
CreateCaseAction (dict) --
Information about the create case action.
Supported only for TriggerEventSource values: OnPostCallAnalysisAvailable | OnPostChatAnalysisAvailable.
Fields (list) --
An array of objects with Field ID and Value data.
(dict) --
Object for case field values.
Id (string) --
Unique identifier of a field.
Value (dict) --
Union of potential field value types.
BooleanValue (boolean) --
A Boolean number value type.
DoubleValue (float) --
A Double number value type.
EmptyValue (dict) --
An empty value.
StringValue (string) --
String value type.
TemplateId (string) --
A unique identifier of a template.
UpdateCaseAction (dict) --
Information about the update case action.
Supported only for TriggerEventSource values: OnCaseCreate | OnCaseUpdate.
Fields (list) --
An array of objects with Field ID and Value data.
(dict) --
Object for case field values.
Id (string) --
Unique identifier of a field.
Value (dict) --
Union of potential field value types.
BooleanValue (boolean) --
A Boolean number value type.
DoubleValue (float) --
A Double number value type.
EmptyValue (dict) --
An empty value.
StringValue (string) --
String value type.
AssignSlaAction (dict) --
Information about the assign SLA action.
SlaAssignmentType (string) --
Type of SLA assignment.
CaseSlaConfiguration (dict) --
The SLA configuration for Case SLA Assignment.
Name (string) --
Name of an SLA.
Type (string) --
Type of SLA for Case SlaAssignmentType.
FieldId (string) --
Unique identifier of a Case field.
TargetFieldValues (list) --
Represents a list of target field values for the fieldId specified in CaseSlaConfiguration. The SLA is considered met if any one of these target field values matches the actual field value.
(dict) --
Object to store union of Field values.
BooleanValue (boolean) --
A Boolean number value type.
DoubleValue (float) --
A Double number value type.
EmptyValue (dict) --
An empty value.
StringValue (string) --
String value type.
TargetSlaMinutes (integer) --
Target duration in minutes within which an SLA should be completed.
EndAssociatedTasksAction (dict) --
Information about the end associated tasks action.
Supported only for TriggerEventSource values: OnCaseUpdate.
SubmitAutoEvaluationAction (dict) --
Information about the submit automated evaluation action.
EvaluationFormId (string) --
The identifier of the auto-evaluation enabled form.
ExtractInformationAction (dict) --
Information about the extract information action.
RulesExtractionDefinitions (list) --
The list of extraction definition identifiers that specify what data to extract.
(dict) --
An identifier that references an extraction definition resource.
Identifier (string) --
The identifier of the extraction definition.
SendInAppNotificationAction (dict) --
Information about the send in-app notification action.
Supported only for TriggerEventSource values: OnPostCallAnalysisAvailable | OnRealTimeCallAnalysisAvailable | OnRealTimeChatAnalysisAvailable | OnPostChatAnalysisAvailable | OnAfterCallWorkAvailable | OnAfterChatWorkAvailable | OnEmailAnalysisAvailable | OnContactEvaluationSubmit | OnCaseCreate | OnCaseUpdate | OnSlaBreach | OnSchedulePublish | OnScheduleUpdate | OnScheduleTimeOffRequestActivity
Content (dict) --
Notification content. Supports variable injection. For more information, see JSONPath reference in the Connect Customer Administrators Guide.
(string) --
The locale code for localized content. Supported values include en_US, de_DE, es_ES, fr_FR, id_ID, it_IT, ja_JP, ko_KR, pt_BR, zh_CN, and zh_TW.
(string) --
A localized string value. Maximum length is 500 visible characters. In a markdown link of the form [label](url), only the label counts toward the limit.
Recipient (dict) --
Notification recipient.
UserTags (dict) --
The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }. Connect Customer users with the specified tags will be notified.
(string) --
(string) --
UserIds (list) --
A list of user IDs. Supports variable injection of $.ContactLens.ContactEvaluation.Agent.AgentId for OnContactEvaluationSubmit event source.
(string) --
Exclusion (dict) --
Recipients to exclude from notification.
UserTags (dict) --
The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }. Connect Customer users with the specified tags will be notified.
(string) --
(string) --
UserIds (list) --
A list of user IDs. Supports variable injection of $.ContactLens.ContactEvaluation.Agent.AgentId for OnContactEvaluationSubmit event source.
(string) --
Priority (string) --
Notification priority.
PublishStatus (string) --
The publish status of the rule.
PreEvaluationFilters (dict) --
The pre-evaluation filters for the rule, that restrict the rule to be applied to only certain resources based on the resource's attributes, such as tags assigned to a contact. The pre-evaluation filters are applied even before rule conditions are evaluated and are used to enforce tag-based-access-control while applying rules.
AndConditions (list) --
A list of conditions that the rule evaluates together using AND logic. All conditions must be met for the event to be evaluated by the rule.
(dict) --
A single pre-evaluation filter condition. Specifies a resource type, filter type, key, value, and operator to match against a resource attribute.
ResourceType (string) --
The type of resource to filter on. Valid values:
CONTACT - Filter on attributes of the contact, such as tags assigned to the contact.
CONTACT_EVALUATION - Filter on attributes of the contact evaluation, such as tags assigned to the contact evaluation, for rules triggered on the OnContactEvaluationSubmit event source.
FilterType (string) --
The type of filter to apply. Valid values: TAG.
FilterKey (string) --
The key of the attribute to filter on. For tag filters, this is the tag key.
FilterValue (string) --
The value to match against. For tag filters, this is the tag value.
Operator (string) --
The comparison operator for the filter condition. Valid values: EQUALS.
CreatedTime (datetime) --
The timestamp for when the rule was created.
LastUpdatedTime (datetime) --
The timestamp for the when the rule was last updated.
LastUpdatedBy (string) --
The Amazon Resource Name (ARN) of the user who last updated the rule.
Tags (dict) --
The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.
(string) --
(string) --
{'ListFilter': {'CategoriesAttributeFilter': {'AndCondition': {'TagConditions': [{'TagKey': 'string',
'TagValue': 'string'}]},
'OrConditions': [{'TagConditions': [{'TagKey': 'string',
'TagValue': 'string'}]}],
'TagCondition': {'TagKey': 'string',
'TagValue': 'string'}}}}
Response {'Segments': {'Categories': {'MatchedDetails': {'RuleId': 'string'}}}}
Provides a list of analysis segments for a real-time chat analysis session. This API supports CHAT channels only.
See also: AWS API Documentation
Request Syntax
client.list_realtime_contact_analysis_segments_v2(
InstanceId='string',
ContactId='string',
MaxResults=123,
NextToken='string',
OutputType='Raw'|'Redacted',
SegmentTypes=[
'Transcript'|'Categories'|'Issues'|'Event'|'Attachments'|'PostContactSummary'|'ExtractedInformation',
],
ListFilter={
'CategoriesAttributeFilter': {
'OrConditions': [
{
'TagConditions': [
{
'TagKey': 'string',
'TagValue': 'string'
},
]
},
],
'AndCondition': {
'TagConditions': [
{
'TagKey': 'string',
'TagValue': 'string'
},
]
},
'TagCondition': {
'TagKey': 'string',
'TagValue': 'string'
}
}
}
)
string
[REQUIRED]
The identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
string
[REQUIRED]
The identifier of the contact in this instance of Connect Customer.
integer
The maximum number of results to return per page.
string
The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.
string
[REQUIRED]
The Contact Lens output type to be returned.
list
[REQUIRED]
Enum with segment types . Each value corresponds to a segment type returned in the segments list of the API. Each segment type has its own structure. Different channels may have different sets of supported segment types.
(string) --
dict
A filter that restricts the segments returned by the API. When SegmentTypes includes Categories, use CategoriesAttributeFilter to return only the category segments whose rules have tags that match the filter. This enforces tag-based access control on the categories a caller can view.
CategoriesAttributeFilter (dict) --
A filter applied to category segments based on the tags of the rules that create the matched categories. This filter applies only when SegmentTypes includes Categories.
OrConditions (list) --
A list of conditions that the filter evaluates using OR logic. A category segment matches when at least one of the conditions in the list is met.
(dict) --
A list of tag conditions that the filter evaluates together using AND logic. A category segment matches only when the tags on its rule satisfy every tag condition in the list.
TagConditions (list) --
A list of tag conditions. All of the tag conditions must be met for the condition to match.
(dict) --
A leaf node condition which can be used to specify a tag condition, for example, HAVE BPO = 123.
TagKey (string) --
The tag key in the tag condition.
TagValue (string) --
The tag value in the tag condition.
AndCondition (dict) --
A condition that the filter evaluates using AND logic. A category segment matches only when all of the tag conditions in the condition are met.
TagConditions (list) --
A list of tag conditions. All of the tag conditions must be met for the condition to match.
(dict) --
A leaf node condition which can be used to specify a tag condition, for example, HAVE BPO = 123.
TagKey (string) --
The tag key in the tag condition.
TagValue (string) --
The tag value in the tag condition.
TagCondition (dict) --
A single tag condition that a category segment must match. The category's rule must have the specified tag key and value.
TagKey (string) --
The tag key in the tag condition.
TagValue (string) --
The tag value in the tag condition.
dict
Response Syntax
{
'Channel': 'VOICE'|'CHAT',
'Status': 'IN_PROGRESS'|'FAILED'|'COMPLETED',
'Segments': [
{
'Transcript': {
'Id': 'string',
'ParticipantId': 'string',
'ParticipantRole': 'AGENT'|'CUSTOMER'|'SYSTEM'|'CUSTOM_BOT'|'SUPERVISOR',
'DisplayName': 'string',
'Content': 'string',
'ContentType': 'string',
'Time': {
'AbsoluteTime': datetime(2015, 1, 1)
},
'Redaction': {
'CharacterOffsets': [
{
'BeginOffsetChar': 123,
'EndOffsetChar': 123
},
]
},
'Sentiment': 'POSITIVE'|'NEGATIVE'|'NEUTRAL'
},
'Categories': {
'MatchedDetails': {
'string': {
'RuleId': 'string',
'PointsOfInterest': [
{
'TranscriptItems': [
{
'Id': 'string',
'CharacterOffsets': {
'BeginOffsetChar': 123,
'EndOffsetChar': 123
}
},
]
},
]
}
}
},
'Issues': {
'IssuesDetected': [
{
'TranscriptItems': [
{
'Content': 'string',
'Id': 'string',
'CharacterOffsets': {
'BeginOffsetChar': 123,
'EndOffsetChar': 123
}
},
]
},
]
},
'Event': {
'Id': 'string',
'ParticipantId': 'string',
'ParticipantRole': 'AGENT'|'CUSTOMER'|'SYSTEM'|'CUSTOM_BOT'|'SUPERVISOR',
'DisplayName': 'string',
'EventType': 'string',
'Time': {
'AbsoluteTime': datetime(2015, 1, 1)
}
},
'Attachments': {
'Id': 'string',
'ParticipantId': 'string',
'ParticipantRole': 'AGENT'|'CUSTOMER'|'SYSTEM'|'CUSTOM_BOT'|'SUPERVISOR',
'DisplayName': 'string',
'Attachments': [
{
'AttachmentName': 'string',
'ContentType': 'string',
'AttachmentId': 'string',
'Status': 'APPROVED'|'REJECTED'|'IN_PROGRESS'
},
],
'Time': {
'AbsoluteTime': datetime(2015, 1, 1)
}
},
'PostContactSummary': {
'Content': 'string',
'Status': 'FAILED'|'COMPLETED',
'FailureCode': 'QUOTA_EXCEEDED'|'INSUFFICIENT_CONVERSATION_CONTENT'|'FAILED_SAFETY_GUIDELINES'|'INVALID_ANALYSIS_CONFIGURATION'|'INTERNAL_ERROR'
},
'ExtractedInformation': {
'ExtractionDefinitionId': 'string',
'ExtractionDefinitionName': 'string',
'ExtractionDefinitionDisplayLabel': 'string',
'ExtractedValues': [
{
'Content': 'string',
'PointsOfInterest': [
{
'Id': 'string',
'CharacterOffsets': {
'BeginOffsetChar': 123,
'EndOffsetChar': 123
}
},
]
},
],
'FailureCode': 'QUOTA_EXCEEDED'|'INSUFFICIENT_CONVERSATION_CONTENT'|'FAILED_SAFETY_GUIDELINES'|'INTERNAL_ERROR'|'MAX_PACKAGE_FEATURE_ONLY'
}
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
Channel (string) --
The channel of the contact.
Status (string) --
Status of real-time contact analysis.
Segments (list) --
An analyzed transcript or category.
(dict) --
An analyzed segment for a real-time analysis session.
Transcript (dict) --
The analyzed transcript segment.
Id (string) --
The identifier of the transcript.
ParticipantId (string) --
The identifier of the participant.
ParticipantRole (string) --
The role of the participant. For example, is it a customer, agent, or system.
DisplayName (string) --
The display name of the participant.
Content (string) --
The content of the transcript. Can be redacted.
ContentType (string) --
The type of content of the item. For example, text/plain.
Time (dict) --
Field describing the time of the event. It can have different representations of time.
AbsoluteTime (datetime) --
Time represented in ISO 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example, 2019-11-08T02:41:28.172Z.
Redaction (dict) --
Object describing redaction that was applied to the transcript. If transcript has the field it means part of the transcript was redacted.
CharacterOffsets (list) --
List of character intervals each describing a part of the text that was redacted. For OutputType.Raw, part of the original text that contains data that can be redacted. For OutputType.Redacted, part of the string with redaction tag.
(dict) --
Begin and end offsets for a part of text.
BeginOffsetChar (integer) --
The beginning of the character interval.
EndOffsetChar (integer) --
The end of the character interval.
Sentiment (string) --
The sentiment detected for this piece of transcript.
Categories (dict) --
The matched category rules.
MatchedDetails (dict) --
Map between the name of the matched rule and RealTimeContactAnalysisCategoryDetails.
(string) --
(dict) --
Provides information about the category rule that was matched.
RuleId (string) --
The unique identifier of the rule that created the matched category.
PointsOfInterest (list) --
List of PointOfInterest - objects describing a single match of a rule.
(dict) --
The section of the contact transcript segment that category rule was detected.
TranscriptItems (list) --
List of the transcript items (segments) that are associated with a given point of interest.
(dict) --
Transcript representation containing Id and list of character intervals that are associated with analysis data. For example, this object within a RealTimeContactAnalysisPointOfInterest in Category.MatchedDetails would have character interval describing part of the text that matched category.
Id (string) --
Transcript identifier. Matches the identifier from one of the TranscriptSegments.
CharacterOffsets (dict) --
List of character intervals within transcript content/text.
BeginOffsetChar (integer) --
The beginning of the character interval.
EndOffsetChar (integer) --
The end of the character interval.
Issues (dict) --
Segment type containing a list of detected issues.
IssuesDetected (list) --
List of the issues detected.
(dict) --
Potential issues that are detected based on an artificial intelligence analysis of each turn in the conversation.
TranscriptItems (list) --
List of the transcript items (segments) that are associated with a given issue.
(dict) --
Transcript representation containing Id, Content and list of character intervals that are associated with analysis data. For example, this object within an issue detected would describe both content that contains identified issue and intervals where that content is taken from.
Content (string) --
Part of the transcript content that contains identified issue. Can be redacted
Id (string) --
Transcript identifier. Matches the identifier from one of the TranscriptSegments.
CharacterOffsets (dict) --
Begin and end offsets for a part of text.
BeginOffsetChar (integer) --
The beginning of the character interval.
EndOffsetChar (integer) --
The end of the character interval.
Event (dict) --
Segment type describing a contact event.
Id (string) --
The identifier of the contact event.
ParticipantId (string) --
The identifier of the participant.
ParticipantRole (string) --
The role of the participant. For example, is it a customer, agent, or system.
DisplayName (string) --
The display name of the participant. Can be redacted.
EventType (string) --
Type of the event. For example, application/vnd.amazonaws.connect.event.participant.left.
Time (dict) --
Field describing the time of the event. It can have different representations of time.
AbsoluteTime (datetime) --
Time represented in ISO 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example, 2019-11-08T02:41:28.172Z.
Attachments (dict) --
The analyzed attachments.
Id (string) --
The identifier of the segment.
ParticipantId (string) --
The identifier of the participant.
ParticipantRole (string) --
The role of the participant. For example, is it a customer, agent, or system.
DisplayName (string) --
The display name of the participant. Can be redacted.
Attachments (list) --
List of objects describing an individual attachment.
(dict) --
Object that describes attached file.
AttachmentName (string) --
A case-sensitive name of the attachment being uploaded. Can be redacted.
ContentType (string) --
Describes the MIME file type of the attachment. For a list of supported file types, see Feature specifications in the Connect Customer Administrator Guide.
AttachmentId (string) --
A unique identifier for the attachment.
Status (string) --
Status of the attachment.
Time (dict) --
Field describing the time of the event. It can have different representations of time.
AbsoluteTime (datetime) --
Time represented in ISO 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example, 2019-11-08T02:41:28.172Z.
PostContactSummary (dict) --
Information about the post-contact summary.
Content (string) --
The content of the summary.
Status (string) --
Whether the summary was successfully COMPLETED or FAILED to be generated.
FailureCode (string) --
If the summary failed to be generated, one of the following failure codes occurs:
QUOTA_EXCEEDED: The number of concurrent analytics jobs reached your service quota.
INSUFFICIENT_CONVERSATION_CONTENT: The conversation needs to have at least one turn from both the participants in order to generate the summary.
FAILED_SAFETY_GUIDELINES: The generated summary cannot be provided because it failed to meet system safety guidelines.
INVALID_ANALYSIS_CONFIGURATION: This code occurs when, for example, you're using a language that isn't supported by generative AI-powered post-contact summaries.
INTERNAL_ERROR: Internal system error.
ExtractedInformation (dict) --
The extracted information from the conversation.
ExtractionDefinitionId (string) --
The identifier of the extraction definition that produced this result.
ExtractionDefinitionName (string) --
The name of the extraction definition that produced this result.
ExtractionDefinitionDisplayLabel (string) --
The display label of the extraction definition that produced this result.
ExtractedValues (list) --
The list of values extracted from the conversation for this extraction definition. This field is empty when a FailureCode is present.
(dict) --
An individual value extracted from the conversation, including its content and the locations where it was found.
Content (string) --
The text content of the extracted value.
PointsOfInterest (list) --
The sections in the conversation that indicate where the extracted value was found.
(dict) --
Transcript representation containing Id and list of character intervals that are associated with analysis data. For example, this object within a RealTimeContactAnalysisPointOfInterest in Category.MatchedDetails would have character interval describing part of the text that matched category.
Id (string) --
Transcript identifier. Matches the identifier from one of the TranscriptSegments.
CharacterOffsets (dict) --
List of character intervals within transcript content/text.
BeginOffsetChar (integer) --
The beginning of the character interval.
EndOffsetChar (integer) --
The end of the character interval.
FailureCode (string) --
If the information failed to be extracted, one of the following failure codes occurs:
QUOTA_EXCEEDED: The number of concurrent analytics jobs reached your service quota.
INSUFFICIENT_CONVERSATION_CONTENT: Information extraction requires a conversation with at least one turn from each participant.
FAILED_SAFETY_GUIDELINES: The extracted information cannot be provided because it failed to meet system safety guidelines.
INTERNAL_ERROR: Internal system error.
MAX_PACKAGE_FEATURE_ONLY: Information extraction is only available in Amazon Connect Customer instances.
NextToken (string) --
If there are additional results, this is the token for the next set of results.
{'Rules': {'PreEvaluationFilters': {'AndConditions': {'ResourceType': {'CONTACT_EVALUATION'}}}}}
Searches rules in an Connect Customer instance, with optional filtering.
See also: AWS API Documentation
Request Syntax
client.search_rules(
InstanceId='string',
MaxResults=123,
NextToken='string',
SearchCriteria={
'OrConditions': [
{'... recursive ...'},
],
'AndConditions': [
{'... recursive ...'},
],
'StringCondition': {
'FieldName': 'string',
'Value': 'string',
'ComparisonType': 'STARTS_WITH'|'CONTAINS'|'EXACT'
}
},
SearchFilter={
'AttributeFilter': {
'OrConditions': [
{
'TagConditions': [
{
'TagKey': 'string',
'TagValue': 'string'
},
]
},
],
'AndCondition': {
'TagConditions': [
{
'TagKey': 'string',
'TagValue': 'string'
},
]
},
'TagCondition': {
'TagKey': 'string',
'TagValue': 'string'
}
}
}
)
string
[REQUIRED]
The identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
integer
The maximum number of results to return per page.
string
The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.
dict
The search criteria to be used to return rules.
OrConditions (list) --
A list of conditions which would be applied together with an OR condition.
(dict) --
The search criteria to be used to return rules.
AndConditions (list) --
A list of conditions which would be applied together with an AND condition.
(dict) --
The search criteria to be used to return rules.
StringCondition (dict) --
A leaf node condition which can be used to specify a string condition.
FieldName (string) --
The name of the field in the string condition.
Value (string) --
The value of the string.
ComparisonType (string) --
The type of comparison to be made when evaluating the string condition.
dict
Filters to be applied to search results, such as tag-based filters.
AttributeFilter (dict) --
An object that can be used to specify tag conditions inside the SearchFilter.
OrConditions (list) --
A list of conditions which would be applied together with an OR condition.
(dict) --
A list of conditions which would be applied together with an AND condition.
TagConditions (list) --
A list of tag conditions that need to be applied with AND condition.
(dict) --
A leaf node condition which can be used to specify a tag condition, for example, HAVE BPO = 123.
TagKey (string) --
The tag key in the tag condition.
TagValue (string) --
The tag value in the tag condition.
AndCondition (dict) --
A list of conditions which would be applied together with an AND condition.
TagConditions (list) --
A list of tag conditions that need to be applied with AND condition.
(dict) --
A leaf node condition which can be used to specify a tag condition, for example, HAVE BPO = 123.
TagKey (string) --
The tag key in the tag condition.
TagValue (string) --
The tag value in the tag condition.
TagCondition (dict) --
A leaf node condition which can be used to specify a tag condition, for example, HAVE BPO = 123.
TagKey (string) --
The tag key in the tag condition.
TagValue (string) --
The tag value in the tag condition.
dict
Response Syntax
{
'Rules': [
{
'Name': 'string',
'RuleId': 'string',
'RuleArn': 'string',
'TriggerEventSource': {
'EventSourceName': 'OnPostCallAnalysisAvailable'|'OnRealTimeCallAnalysisAvailable'|'OnRealTimeChatAnalysisAvailable'|'OnPostChatAnalysisAvailable'|'OnAfterCallWorkAvailable'|'OnAfterChatWorkAvailable'|'OnEmailAnalysisAvailable'|'OnZendeskTicketCreate'|'OnZendeskTicketStatusUpdate'|'OnSalesforceCaseCreate'|'OnContactEvaluationSubmit'|'OnMetricDataUpdate'|'OnCaseCreate'|'OnCaseUpdate'|'OnSlaBreach'|'OnAlertUpdate'|'OnSchedulePublish'|'OnScheduleUpdate'|'OnScheduleTimeOffRequestActivity',
'IntegrationAssociationId': 'string'
},
'ActionSummaries': [
{
'ActionType': 'CREATE_TASK'|'ASSIGN_CONTACT_CATEGORY'|'GENERATE_EVENTBRIDGE_EVENT'|'SEND_NOTIFICATION'|'CREATE_CASE'|'UPDATE_CASE'|'ASSIGN_SLA'|'END_ASSOCIATED_TASKS'|'SUBMIT_AUTO_EVALUATION'|'EXTRACT_INFORMATION'|'SEND_IN_APP_NOTIFICATION'
},
],
'RuleCapabilityTiers': [
'GenerativeAI',
],
'PublishStatus': 'DRAFT'|'PUBLISHED',
'PreEvaluationFilters': {
'AndConditions': [
{
'ResourceType': 'CONTACT'|'CONTACT_EVALUATION',
'FilterType': 'TAG',
'FilterKey': 'string',
'FilterValue': 'string',
'Operator': 'EQUALS'
},
]
},
'CreatedTime': datetime(2015, 1, 1),
'LastUpdatedTime': datetime(2015, 1, 1),
'LastUpdatedBy': 'string',
'Tags': {
'string': 'string'
}
},
],
'ApproximateTotalCount': 123,
'NextToken': 'string'
}
Response Structure
(dict) --
Rules (list) --
Information about the rules.
(dict) --
A summary of information about a rule, returned as part of the response to a SearchRules operation.
Name (string) --
The name of the rule.
RuleId (string) --
A unique identifier for the rule.
RuleArn (string) --
The Amazon Resource Name (ARN) of the rule.
TriggerEventSource (dict) --
The event source to trigger the rule.
EventSourceName (string) --
The name of the event source.
IntegrationAssociationId (string) --
The identifier for the integration association.
ActionSummaries (list) --
A list of ActionTypes associated with a rule.
(dict) --
Information about an action.
ActionType (string) --
The action type.
RuleCapabilityTiers (list) --
The list of capability tiers associated with the rule. Used for categorizing rules by capability (for example, GenerativeAI).
(string) --
PublishStatus (string) --
The publish status of the rule.
PreEvaluationFilters (dict) --
The pre-evaluation filters for the rule, that restrict the rule to be applied to only certain resources based on the resource's attributes, such as tags assigned to a contact. The pre-evaluation filters are applied even before rule conditions are evaluated and are used to enforce tag-based-access-control while applying rules.
AndConditions (list) --
A list of conditions that the rule evaluates together using AND logic. All conditions must be met for the event to be evaluated by the rule.
(dict) --
A single pre-evaluation filter condition. Specifies a resource type, filter type, key, value, and operator to match against a resource attribute.
ResourceType (string) --
The type of resource to filter on. Valid values:
CONTACT - Filter on attributes of the contact, such as tags assigned to the contact.
CONTACT_EVALUATION - Filter on attributes of the contact evaluation, such as tags assigned to the contact evaluation, for rules triggered on the OnContactEvaluationSubmit event source.
FilterType (string) --
The type of filter to apply. Valid values: TAG.
FilterKey (string) --
The key of the attribute to filter on. For tag filters, this is the tag key.
FilterValue (string) --
The value to match against. For tag filters, this is the tag value.
Operator (string) --
The comparison operator for the filter condition. Valid values: EQUALS.
CreatedTime (datetime) --
The timestamp for when the rule was created.
LastUpdatedTime (datetime) --
The timestamp for when the rule was last updated.
LastUpdatedBy (string) --
The Amazon Resource Name (ARN) of the user who last updated the rule.
Tags (dict) --
The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.
(string) --
(string) --
ApproximateTotalCount (integer) --
The total number of rules which matched your search query.
NextToken (string) --
If there are additional results, this is the token for the next set of results.
{'PreEvaluationFilters': {'AndConditions': {'ResourceType': {'CONTACT_EVALUATION'}}}}
Updates a rule for the specified Connect Customer instance.
Use the Rules Function language to code conditions for the rule.
See also: AWS API Documentation
Request Syntax
client.update_rule(
RuleId='string',
InstanceId='string',
Name='string',
Function='string',
Actions=[
{
'ActionType': 'CREATE_TASK'|'ASSIGN_CONTACT_CATEGORY'|'GENERATE_EVENTBRIDGE_EVENT'|'SEND_NOTIFICATION'|'CREATE_CASE'|'UPDATE_CASE'|'ASSIGN_SLA'|'END_ASSOCIATED_TASKS'|'SUBMIT_AUTO_EVALUATION'|'EXTRACT_INFORMATION'|'SEND_IN_APP_NOTIFICATION',
'TaskAction': {
'Name': 'string',
'Description': 'string',
'ContactFlowId': 'string',
'References': {
'string': {
'Value': 'string',
'Type': 'URL'|'ATTACHMENT'|'CONTACT_ANALYSIS'|'NUMBER'|'STRING'|'DATE'|'EMAIL'|'EMAIL_MESSAGE'|'EMAIL_MESSAGE_PLAIN_TEXT'|'EMAIL_MESSAGE_PLAIN_TEXT_REDACTED'|'EMAIL_MESSAGE_REDACTED',
'Status': 'AVAILABLE'|'DELETED'|'APPROVED'|'REJECTED'|'PROCESSING'|'FAILED'|'DRAFTING',
'Arn': 'string',
'StatusReason': 'string'
}
}
},
'EventBridgeAction': {
'Name': 'string'
},
'AssignContactCategoryAction': {}
,
'SendNotificationAction': {
'DeliveryMethod': 'EMAIL',
'Subject': 'string',
'Content': 'string',
'ContentType': 'PLAIN_TEXT',
'Recipient': {
'UserTags': {
'string': 'string'
},
'UserIds': [
'string',
]
},
'Exclusion': {
'UserTags': {
'string': 'string'
},
'UserIds': [
'string',
]
}
},
'CreateCaseAction': {
'Fields': [
{
'Id': 'string',
'Value': {
'BooleanValue': True|False,
'DoubleValue': 123.0,
'EmptyValue': {}
,
'StringValue': 'string'
}
},
],
'TemplateId': 'string'
},
'UpdateCaseAction': {
'Fields': [
{
'Id': 'string',
'Value': {
'BooleanValue': True|False,
'DoubleValue': 123.0,
'EmptyValue': {}
,
'StringValue': 'string'
}
},
]
},
'AssignSlaAction': {
'SlaAssignmentType': 'CASES',
'CaseSlaConfiguration': {
'Name': 'string',
'Type': 'CaseField',
'FieldId': 'string',
'TargetFieldValues': [
{
'BooleanValue': True|False,
'DoubleValue': 123.0,
'EmptyValue': {}
,
'StringValue': 'string'
},
],
'TargetSlaMinutes': 123
}
},
'EndAssociatedTasksAction': {}
,
'SubmitAutoEvaluationAction': {
'EvaluationFormId': 'string'
},
'ExtractInformationAction': {
'RulesExtractionDefinitions': [
{
'Identifier': 'string'
},
]
},
'SendInAppNotificationAction': {
'Content': {
'string': 'string'
},
'Recipient': {
'UserTags': {
'string': 'string'
},
'UserIds': [
'string',
]
},
'Exclusion': {
'UserTags': {
'string': 'string'
},
'UserIds': [
'string',
]
},
'Priority': 'HIGH'|'LOW'
}
},
],
PublishStatus='DRAFT'|'PUBLISHED',
PreEvaluationFilters={
'AndConditions': [
{
'ResourceType': 'CONTACT'|'CONTACT_EVALUATION',
'FilterType': 'TAG',
'FilterKey': 'string',
'FilterValue': 'string',
'Operator': 'EQUALS'
},
]
}
)
string
[REQUIRED]
A unique identifier for the rule.
string
[REQUIRED]
The identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
string
[REQUIRED]
The name of the rule. You can change the name only if TriggerEventSource is one of the following values: OnZendeskTicketCreate | OnZendeskTicketStatusUpdate | OnSalesforceCaseCreate
string
[REQUIRED]
The conditions of the rule.
list
[REQUIRED]
A list of actions to be run when the rule is triggered.
(dict) --
Information about the action to be performed when a rule is triggered.
ActionType (string) -- [REQUIRED]
The type of action that creates a rule.
TaskAction (dict) --
Information about the task action. This field is required if TriggerEventSource is one of the following values: OnZendeskTicketCreate | OnZendeskTicketStatusUpdate | OnSalesforceCaseCreate
Name (string) -- [REQUIRED]
The name. Supports variable injection. For more information, see JSONPath reference in the Connect Customer Administrators Guide.
Description (string) --
The description. Supports variable injection. For more information, see JSONPath reference in the Connect Customer Administrators Guide.
ContactFlowId (string) -- [REQUIRED]
The identifier of the flow.
References (dict) --
Information about the reference when the referenceType is URL. Otherwise, null. (Supports variable injection in the Value field.)
(string) --
(dict) --
Well-formed data on a contact, used by agents to complete a contact request. You can have up to 4,096 UTF-8 bytes across all references for a contact.
Value (string) --
A valid value for the reference. For example, for a URL reference, a formatted URL that is displayed to an agent in the Contact Control Panel (CCP).
Type (string) -- [REQUIRED]
The type of the reference. DATE must be of type Epoch timestamp.
Status (string) --
Status of the attachment reference type.
Arn (string) --
The Amazon Resource Name (ARN) of the reference
StatusReason (string) --
Relevant details why the reference was not successfully created.
EventBridgeAction (dict) --
Information about the EventBridge action.
Supported only for TriggerEventSource values: OnPostCallAnalysisAvailable | OnRealTimeCallAnalysisAvailable | OnRealTimeChatAnalysisAvailable | OnPostChatAnalysisAvailable | OnContactEvaluationSubmit | OnMetricDataUpdate
Name (string) -- [REQUIRED]
The name.
AssignContactCategoryAction (dict) --
Information about the contact category action.
Supported only for TriggerEventSource values: OnPostCallAnalysisAvailable | OnRealTimeCallAnalysisAvailable | OnRealTimeChatAnalysisAvailable | OnPostChatAnalysisAvailable | OnZendeskTicketCreate | OnZendeskTicketStatusUpdate | OnSalesforceCaseCreate
SendNotificationAction (dict) --
Information about the send notification action.
Supported only for TriggerEventSource values: OnPostCallAnalysisAvailable | OnRealTimeCallAnalysisAvailable | OnRealTimeChatAnalysisAvailable | OnPostChatAnalysisAvailable | OnContactEvaluationSubmit | OnMetricDataUpdate
DeliveryMethod (string) -- [REQUIRED]
Notification delivery method.
Subject (string) --
The subject of the email if the delivery method is EMAIL. Supports variable injection. For more information, see JSONPath reference in the Connect Customer Administrators Guide.
Content (string) -- [REQUIRED]
Notification content. Supports variable injection. For more information, see JSONPath reference in the Connect Customer Administrators Guide.
ContentType (string) -- [REQUIRED]
Content type format.
Recipient (dict) -- [REQUIRED]
Notification recipient.
UserTags (dict) --
The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }. Connect Customer users with the specified tags will be notified.
(string) --
(string) --
UserIds (list) --
A list of user IDs. Supports variable injection of $.ContactLens.ContactEvaluation.Agent.AgentId for OnContactEvaluationSubmit event source.
(string) --
Exclusion (dict) --
Recipients to exclude from notification.
UserTags (dict) --
The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }. Connect Customer users with the specified tags will be notified.
(string) --
(string) --
UserIds (list) --
A list of user IDs. Supports variable injection of $.ContactLens.ContactEvaluation.Agent.AgentId for OnContactEvaluationSubmit event source.
(string) --
CreateCaseAction (dict) --
Information about the create case action.
Supported only for TriggerEventSource values: OnPostCallAnalysisAvailable | OnPostChatAnalysisAvailable.
Fields (list) -- [REQUIRED]
An array of objects with Field ID and Value data.
(dict) --
Object for case field values.
Id (string) -- [REQUIRED]
Unique identifier of a field.
Value (dict) -- [REQUIRED]
Union of potential field value types.
BooleanValue (boolean) --
A Boolean number value type.
DoubleValue (float) --
A Double number value type.
EmptyValue (dict) --
An empty value.
StringValue (string) --
String value type.
TemplateId (string) -- [REQUIRED]
A unique identifier of a template.
UpdateCaseAction (dict) --
Information about the update case action.
Supported only for TriggerEventSource values: OnCaseCreate | OnCaseUpdate.
Fields (list) -- [REQUIRED]
An array of objects with Field ID and Value data.
(dict) --
Object for case field values.
Id (string) -- [REQUIRED]
Unique identifier of a field.
Value (dict) -- [REQUIRED]
Union of potential field value types.
BooleanValue (boolean) --
A Boolean number value type.
DoubleValue (float) --
A Double number value type.
EmptyValue (dict) --
An empty value.
StringValue (string) --
String value type.
AssignSlaAction (dict) --
Information about the assign SLA action.
SlaAssignmentType (string) -- [REQUIRED]
Type of SLA assignment.
CaseSlaConfiguration (dict) --
The SLA configuration for Case SLA Assignment.
Name (string) -- [REQUIRED]
Name of an SLA.
Type (string) -- [REQUIRED]
Type of SLA for Case SlaAssignmentType.
FieldId (string) --
Unique identifier of a Case field.
TargetFieldValues (list) --
Represents a list of target field values for the fieldId specified in CaseSlaConfiguration. The SLA is considered met if any one of these target field values matches the actual field value.
(dict) --
Object to store union of Field values.
BooleanValue (boolean) --
A Boolean number value type.
DoubleValue (float) --
A Double number value type.
EmptyValue (dict) --
An empty value.
StringValue (string) --
String value type.
TargetSlaMinutes (integer) -- [REQUIRED]
Target duration in minutes within which an SLA should be completed.
EndAssociatedTasksAction (dict) --
Information about the end associated tasks action.
Supported only for TriggerEventSource values: OnCaseUpdate.
SubmitAutoEvaluationAction (dict) --
Information about the submit automated evaluation action.
EvaluationFormId (string) -- [REQUIRED]
The identifier of the auto-evaluation enabled form.
ExtractInformationAction (dict) --
Information about the extract information action.
RulesExtractionDefinitions (list) -- [REQUIRED]
The list of extraction definition identifiers that specify what data to extract.
(dict) --
An identifier that references an extraction definition resource.
Identifier (string) -- [REQUIRED]
The identifier of the extraction definition.
SendInAppNotificationAction (dict) --
Information about the send in-app notification action.
Supported only for TriggerEventSource values: OnPostCallAnalysisAvailable | OnRealTimeCallAnalysisAvailable | OnRealTimeChatAnalysisAvailable | OnPostChatAnalysisAvailable | OnAfterCallWorkAvailable | OnAfterChatWorkAvailable | OnEmailAnalysisAvailable | OnContactEvaluationSubmit | OnCaseCreate | OnCaseUpdate | OnSlaBreach | OnSchedulePublish | OnScheduleUpdate | OnScheduleTimeOffRequestActivity
Content (dict) -- [REQUIRED]
Notification content. Supports variable injection. For more information, see JSONPath reference in the Connect Customer Administrators Guide.
(string) --
The locale code for localized content. Supported values include en_US, de_DE, es_ES, fr_FR, id_ID, it_IT, ja_JP, ko_KR, pt_BR, zh_CN, and zh_TW.
(string) --
A localized string value. Maximum length is 500 visible characters. In a markdown link of the form [label](url), only the label counts toward the limit.
Recipient (dict) -- [REQUIRED]
Notification recipient.
UserTags (dict) --
The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }. Connect Customer users with the specified tags will be notified.
(string) --
(string) --
UserIds (list) --
A list of user IDs. Supports variable injection of $.ContactLens.ContactEvaluation.Agent.AgentId for OnContactEvaluationSubmit event source.
(string) --
Exclusion (dict) --
Recipients to exclude from notification.
UserTags (dict) --
The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }. Connect Customer users with the specified tags will be notified.
(string) --
(string) --
UserIds (list) --
A list of user IDs. Supports variable injection of $.ContactLens.ContactEvaluation.Agent.AgentId for OnContactEvaluationSubmit event source.
(string) --
Priority (string) --
Notification priority.
string
[REQUIRED]
The publish status of the rule.
dict
The pre-evaluation filters for the rule, that restrict the rule to be applied to only certain resources based on the resource's attributes, such as tags assigned to a contact. The pre-evaluation filters are applied even before rule conditions are evaluated and are used to enforce tag-based-access-control while applying rules.
AndConditions (list) --
A list of conditions that the rule evaluates together using AND logic. All conditions must be met for the event to be evaluated by the rule.
(dict) --
A single pre-evaluation filter condition. Specifies a resource type, filter type, key, value, and operator to match against a resource attribute.
ResourceType (string) -- [REQUIRED]
The type of resource to filter on. Valid values:
CONTACT - Filter on attributes of the contact, such as tags assigned to the contact.
CONTACT_EVALUATION - Filter on attributes of the contact evaluation, such as tags assigned to the contact evaluation, for rules triggered on the OnContactEvaluationSubmit event source.
FilterType (string) -- [REQUIRED]
The type of filter to apply. Valid values: TAG.
FilterKey (string) -- [REQUIRED]
The key of the attribute to filter on. For tag filters, this is the tag key.
FilterValue (string) -- [REQUIRED]
The value to match against. For tag filters, this is the tag value.
Operator (string) -- [REQUIRED]
The comparison operator for the filter condition. Valid values: EQUALS.
None