{
    "InstanceId": "REPLACE_WITH_YOUR_INSTANCE_ID",
    "Name": "REPLACE_WITH_NEW_RULE_NAME",
    "TriggerEventSource": {
        "EventSourceName": "OnPostCallAnalysisAvailable"
    },
    "Actions": [
        {
            "ActionType": "ASSIGN_CONTACT_CATEGORY",
            "AssignContactCategoryAction": {}
        },
        {
            "ActionType": "GENERATE_EVENTBRIDGE_EVENT",
            "EventBridgeAction": {
                "Name": "REPLACE_WITH_NEW_EVENT_NAME"
            }
        },
		{
                "ActionType": "SEND_NOTIFICATION",
                "SendNotificationAction": {
                    "DeliveryMethod": "EMAIL",
                    "Subject": "Rules notification - Contact Id: $.ContactLens.RealTimeCall.ContactId",
                    "Content": "This notification from Amazon Connect is for contact Id: $.ContactLens.RealTimeCall.ContactId\n\nView contact: https://REPLACE_WITH_YOUR_CONNECT_ACCESS_URL/connect/contact-trace-records/details/$.ContactLens.RealTimeCall.ContactId#realtime",
                    "ContentType": "PLAIN_TEXT",
                    "Recipient": {
                        "UserIds": [
                            "REPLACE_WITH_YOUR_USER_ID"
                        ]
                    }
                }
            }
    ],
    "Function": "{\"Version\":\"2022-11-25\",\"RuleFunction\":{\"Operator\":\"AND\",\"Operands\":[{\"Operator\":\"CONTAINS_ANY\",\"Operands\":[\"PAYMENT\"],\"ComparisonValue\":\"$.ContactLens.PostCall.ExactMatch.Transcript\",\"FilterClause\":{\"LogicOperator\":\"AND\",\"Filters\":[{\"Type\":\"ParticipantRole\",\"Data\":\"CUSTOMER\"}]},\"Negate\":false},{\"Operator\":\"OR\",\"Operands\":[{\"Operator\":\"EQUALS\",\"Operands\":[\"YES\"],\"ComparisonValue\":\"$.ContactLens.PostCall.ContactAttribute.PAY_CARD\",\"Negate\":false}]}]}}",
    "PublishStatus": "PUBLISHED"
}
