

# OnPostCallAnalysisAvailable
<a name="OnPostCallAnalysisAvailable"></a>

## Agent Hierarchy
<a name="agent-hierarchy"></a>

**Parameters**
+ Operator - "CONTAINS\$1ANY"
+ Operands - Agent hierarchy ARNs.
+ ComparisonValue - "\$1.ContactLens.PostCall.Agent.HierarchyGroup.ARN"
+ Negate - False

## NonTalkTimePct
<a name="non-talk-time-pct"></a>

**Parameters**
+ Operator - "NumberLessOrEqualTo" \$1 "NumberGreaterOrEqualTo"
+ Operands - An array of numbers, array length can only be 1. Value is an integer between 0 and 100.
+ ComparisonValue - "\$1.ContactLens.PostCall.Agent.HierarchyGroup.ARN"
+ Negate - False

## Customer Hold Duration Pct
<a name="customer-hold-duration-pct"></a>

**Parameters**
+ Operator - "NumberLessOrEqualTo" \$1 "NumberGreaterOrEqualTo"
+ Operands - An array of number, array length can only be 1. Value is an integer between 0 and 100.
+ ComparisonValue - '\$1.ContactLens.PostCall.Agent.CustomerHoldDurationPct'
+ Negate - False.

## Initiation Method
<a name="initiation-method"></a>

**Parameters**
+ Operator - "CONTAINS\$1ANY"
+ Operands - A validated enum set of possible values. Possible values are as follows:
  + 'INBOUND'
  + 'OUTBOUND'
  + 'TRANSFER'
  + 'QUEUE\$1TRANSFER'
  + 'CALLBACK'
  + 'API'
  + 'DISCONNECT'
+ ComparisonValue - '\$1.ContactLens.PostCall.InitiationMethod'
+ Negate - False

## DisconnectReason
<a name="disconnect-reason"></a>

**Parameters**
+ Operator - "CONTAINS\$1ANY"
+ Operands - A validated enum set of possible values. Possible values are as follows:
  + 'TELECOM\$1BUSY'
  + 'TELECOM\$1NUMBER\$1INVALID'
  + 'TELECOM\$1POTENTIAL\$1BLOCKING'
  + 'TELECOM\$1UNANSWERED'
  + 'TELECOM\$1TIMEOUT'
  + 'TELECOM\$1ORIGINATOR\$1CANCEL'
  + 'TELECOM\$1PROBLEM'
  + 'CUSTOMER\$1NEVER\$1ARRIVED'
  + 'THIRD\$1PARTY\$1DISCONNECT'
  + 'CUSTOMER\$1DISCONNECT'
  + 'AGENT\$1DISCONNECT'
  + 'BARGED'
  + 'CONTACT\$1FLOW\$1DISCONNECT'
  + 'OTHER'
  + 'OUTBOUND\$1DESTINATION\$1ENDPOINT\$1ERROR'
  + 'OUTBOUND\$1RESOURCE\$1ERROR'
  + 'OUTBOUND\$1ATTEMPT\$1FAILED'
  + 'EXPIRED'
  + 'AGENT\$1NETWORK\$1DISCONNECT'
  + 'CUSTOMER\$1CONNECTION\$1NOT\$1ESTABLISHED'
  + 'API'
  + 'IDLE\$1DISCONNECT'
  + 'SYSTEM\$1ERROR'
  + 'AGENT\$1COMPLETED'
  + 'TRANSFERRED'
  + 'DISCARDED'
+ ComparisonValue - "\$1.ContactLens.PostCall.DisconnectReason"
+ Negate - False

## Absolute Talk Time
<a name="absolute-talk-time"></a>

**Parameters**
+ Operator - "NumberLessOrEqualTo" \$1 "NumberGreaterOrEqualTo"
+ Operands - An integer.
+ ComparisonValue - '\$1.ContactLens.PostCall.TalkTime.TotalTimeSecs'
+ FilterClause - 

  ```
  { // required!!
          LogicOperator: 'AND', // has to be 'AND'
          Filters: [ // only allows one of the object
            {
              Type: 'ParticipantRole',
              Data: 'AGENT', // 'AGENT' or 'CUSTOMER'
            },
          ],
        },
  ```
+ Negate - False

## Maximum (Highest) Loudness Score
<a name="max-loudness-score"></a>

**Parameters**
+ Operator - "NumberLessOrEqualTo" \$1 "NumberGreaterOrEqualTo"
+ Operands - an integer (decibels). 
+ ComparisonValue - '\$1.ContactLens.PostCall.Loudness.HighestLoudnessScore'
+ FilterClause - 

  ```
  {
          LogicOperator: 'AND', // has to be AND
          Filters: [ // only one object
            {
              Type: 'ParticipantRole',
              Data: 'CUSTOMER', // or 'AGENT'
            },
          ],
        },
  ```
+ Negate - False

## After Contact Work Duration
<a name="after-contact-work-duration"></a>

**Parameters**
+ Operator - "NumberLessOrEqualTo" \$1 "NumberGreaterOrEqualTo"
+ Operands - A positive integer or zero.
+ ComparisonValue - '\$1.ContactLens.PostCall.Agent.AfterContactWorkDurationSecs'
+ Negate - False

## Routing profile
<a name="routing-profile"></a>

**Parameters**
+ Operator - "CONTAINS\$1ANY"
+ Operands - Routing profile ARNs:
+ ComparisonValue - "\$1.ContactLens.PostCall.Agent.RoutingProfile"
+ Negate - False

## PotentialDisconnectIssue
<a name="potential-disconnect-issue"></a>

**Parameters**
+ Operator - "CONTAINS\$1ANY" \$1 "EQUALS"
+ Operands - A validated enum of possible values.
+ ComparisonValue - '\$1.ContactLens.PostCall.PotentialDisconnectIssue'
+ Negate - False.

## Custom User-Defined Segment Attribute
<a name="custom-user-defined-segment-attribute"></a>

**Parameters**
+ Operator - "CONTAINS\$1ANY"
+ Operands - A list of segment attribute values. The values must be a value in the pre-defined attribute resource.
+ ComparisonValue - "\$1.ContactLens.ContactEvaluation.SegmentAttributes.UserDefined.[KEY]"

  The KEY must be an instance pre-defined attribute resource.
+ Negate - False or True

## Connect AI Agent
<a name="connect-ai-agent"></a>

**Parameters**
+ Operator - "CONTAINS\$1ANY"
+ Operands - A list of strings. Strings are either a list of different UUIDs by themselves or a list of strings prefixed with the same UUID, with different possible version numbers uuid:2 and uuid:3. For example:
  + Different UUIDs by themselves: ['30682191-2312-4c27-9fc1-752e7a399d52', '2b81c7d5-85bc-459f-b605-0f5280a4301e']
  + Prefixed with the same UUID with different possible version numbers: ['30682191-2312-4c27-9fc1-752e7a399d52:1', '30682191-2312-4c27-9fc1-752e7a399d52:2']
+ ComparisonValue - '\$1.ContactLens.PostCall.AiAgent.IdWithVersion'
+ FilterClause - 

  ```
  [
            { // REQUIRED filter 
              Type: 'AiAgentUseCase',
              Data: {
                Value: 'SelfService', // or 'AgentAssistance'
              },
            },
            { // OPTIONAL filter
              Type: 'AiAgentEscalatedToHuman',
              Data: 'TRUE', // or 'FALSE'
            },
          ],
        },
  ```
+ Negate - False

## PostCall words or phrases - Exact match
<a name="postcall-exactmatch"></a>

**Parameters**
+ Operator - "CONTAINS\$1ANY"
+ Operands – A list of strings
+ ComparisonValue – "\$1.ContactLens.PostCall.ExactMatch.Transcript"
+ FilterClause –

  ```
  {
      "LogicOperator": "AND", // Only "AND" is supported
      "Filters": [
          {
              "Type": "PostCallContactPeriodSeconds", // Optional filter type. If omitted, the rule applies to the full contact
              "Data": { // Either "First" or "Last" needs to be specified. 
                  "First": number
               }
          },
          {
              "Type": "ParticipantRole",
              "Data": "CUSTOMER" | "AGENT" | "ANY"
          }
      ]
  }
  ```
+ Negate - true or false. If set to true, it means *If transcript does not contain any of the words mentioned in the Operands*.

## PostCall words or phrases - Semantic match
<a name="postcall-semanticmatch"></a>

**Parameters**
+ Operator - "CONTAINS\$1ANY"
+ Operands – A list of strings
+ ComparisonValue – "\$1.ContactLens.PostCall.SemanticMatch.Transcript"
+ FilterClause –

  ```
  {
      "LogicOperator": "AND", // Only "AND" is supported
      "Filters": [
          {
              "Type": "PostCallContactPeriodSeconds", // Optional filter type. If omitted, the rule applies to the full contact
              "Data": { // Either "First" or "Last" needs to be specified. 
                  "First": number
               }
          },
          {
              "Type": "ParticipantRole",
              "Data": "CUSTOMER" | "AGENT" | "ANY"
          }
      ]
  }
  ```
+ Negate - true or false. If set to true, it means *If transcript does not contain any of the words mentioned in the Operands*.

## PostCall natural language - Semantic match
<a name="postcall-semanticmatch-nl"></a>

**Parameters**
+ Operator - "EQUALS"
+ Operands – A list with a single string
+ ComparisonValue – ""\$1.ContactLens.PostCall.SemanticMatch.Phrase"
+ FilterClause –

  ```
  {
       Operator: "EQUALS",
       Operands: [
            "Customer called to change their address and agent proceeded with the address change during the call."
       ],
       ComparisonValue: "$.ContactLens.PostCall.SemanticMatch.Phrase",
       Negate: true or false
  },
  ```
+ Negate - true or false. If set to true, it means *If transcript does not contain any of the words mentioned in the Operands*.

## PostCall words or phrases - Pattern match
<a name="postcall-patternmatch"></a>

**Parameters**
+ Operator - "CONTAINS\$1ANY"
+ Operands – A list of pattern match objects. See [PatternMatch Operands](https://docs.aws.amazon.com/connect/latest/adminguide/patternmatch-operands.html). 
+ ComparisonValue – "\$1.ContactLens.PostCall.PatternMatch.Transcript"
+ FilterClause –

  ```
  {
      "LogicOperator": "AND", // Only "AND" is supported
      "Filters": [
          {
              "Type": "PostCallContactPeriodSeconds", // Optional filter type. If omitted, the rule applies to the full contact
              "Data": { // Either "First" or "Last" needs to be specified. 
                  "First": number
               }
          },
          {
              "Type": "ParticipantRole",
              "Data": "CUSTOMER" | "AGENT" | "ANY"
          },
          {
              "Type": "PatternMatchLanguageFilter",
              "Data": "EN"|"ES"|"AR"|"DE"|"FR"|"HI"|"IT"|"PT"|"KO"|"JA"|"ZH"
          }
      ]
  }
  ```
+ Negate - true or false. If set to true, it means *If transcript does not contain any of the words mentioned in the Operands*.

## PostCall agent condition
<a name="postcall-agentcondition"></a>

**Parameters**
+ Operator - "CONTAINS\$1ANY"
+ Operands – A list of agent IDs
+ ComparisonValue – "\$1.ContactLens.PostCall.Agent.AgentId"
+ Negate - false

## PostCall queue condition
<a name="postcall-queuecondition"></a>

**Parameters**
+ Operator - "EQUALS"
+ Operands – No value.
+ ComparisonValue – "\$1.ContactLens.PostCall.Queue.QueueId"
+ Negate - False

## PostCall contact attributes condition
<a name="postcall-attributescondition"></a>

**Parameters**
+ Operator - "EQUALS"
+ Operands – An array of string, array length can only be 1. Value is the contact attribute value. 
+ ComparisonValue – "\$1.ContactLens.PostCall.ContactAttribute.*YOUR\$1ATTRIBUTE\$1KEY*"
+ Negate - true/false. If set to true, it means **YOUR\$1ATTRIBUTE\$1KEY* does not equal to the attribute value specified in the Operands. *.

## PostCall sentiment state condition
<a name="postcall-sentimentstatecondition"></a>

**Parameters**
+ Operator - "EQUALS"
+ Operands – An array of string, array length can only be 1. Value is one of "POSITIVE", "NEGATIVE", "NEUTRAL". 
+ ComparisonValue – "\$1.ContactLens.PostCall.Sentiment.State"
+ FilterClause – 

  ```
  {
      "LogicOperator": "AND", // Only "AND" is supported
      "Filters": [
          {
              "Type": "ParticipantRole",
              "Data": "CUSTOMER" | "AGENT" | "ANY"
          },
      ]
  }
  ```
+ Negate - false

## PostCall sentiment overall score condition
<a name="postcall-sentimentoverallscorecondition"></a>

**Parameters**
+ Operator - "NumberLessOrEqualTo \$1 "NumberGreaterOrEqualTo"
+ Operands – An array of number, array length can only be 1. Value is an integer between -5 and 5, inclusive. 
+ ComparisonValue – "\$1.ContactLens.PostCall.Sentiment.OverallScore"
+ FilterClause – 

  ```
  {
      "LogicOperator": "AND", // Only "AND" is supported
      "Filters": [
          {
              "Type": "ParticipantRole",
              "Data": "CUSTOMER" | "AGENT" | "ANY"
          },
      ]
  }
  ```
+ Negate - false

## PostCall sentiment score shift condition
<a name="postcall-sentimentscoreshiftcondition"></a>

PostCall sentiment score shift condition has a compound condition format where Operator is an AND condition and its operands consist of two conditions that represent beginning and end score respectively. 

**Parameters that represent the beginning score**
+ Operator - "NumberLessOrEqualTo \$1 "NumberGreaterOrEqualTo"
+ Operands – An array of number, array length can only be 1. Value is an integer between -5 and 5, inclusive. 
+ ComparisonValue – "\$1.ContactLens.PostCall.Sentiment.Score.Beginning"
+ FilterClause – 

  ```
  {
      "LogicOperator": "AND", // Only "AND" is supported
      "Filters": [
          {
              "Type": "ParticipantRole",
              "Data": "CUSTOMER" | "AGENT" | "ANY"
          },
      ]
  }
  ```
+ Negate - false

**Parameters that represent the end score**
+ Operator - "NumberLessOrEqualTo \$1 "NumberGreaterOrEqualTo"
+ Operands – An array of number, array length can only be 1. Value is an integer between -5 and 5, inclusive. 
+ ComparisonValue – "\$1.ContactLens.PostCall.Sentiment.Score.End"
+ FilterClause – 

  ```
  {
      "LogicOperator": "AND", // Only "AND" is supported
      "Filters": [
          {
              "Type": "ParticipantRole",
              "Data": "CUSTOMER" | "AGENT" | "ANY"
          },
      ]
  }
  ```
+ Negate - false

Following is an example:

```
{
        "Operator": "AND",
        "Operands": [
          {
            "Operator": "NumberGreaterOrEqualTo",
            "Operands": [
              2
            ],
            "ComparisonValue": "$.ContactLens.PostCall.Sentiment.Score.Beginning",
            "FilterClause": {
              "LogicOperator": "AND",
              "Filters": [
                {
                  "Type": "ParticipantRole",
                  "Data": "AGENT"
                }
              ]
            },
            "Negate": false
          },
          {
            "Operator": "NumberGreaterOrEqualTo",
            "Operands": [
              3
            ],
            "ComparisonValue": "$.ContactLens.PostCall.Sentiment.Score.End",
            "FilterClause": {
              "LogicOperator": "AND",
              "Filters": [
                {
                  "Type": "ParticipantRole",
                  "Data": "AGENT"
                }
              ]
            },
            "Negate": false
          }
        ]
      }
```

**Parameters for overall score**
+ Operator - "NumberLessOrEqualTo \$1 "NumberGreaterOrEqualTo"
+ Operands – An array of number, array length can only be 1. Value is an integer between -5 and 5, inclusive. 
+ ComparisonValue – "\$1.ContactLens.PostCall.Sentiment.OverallScore"
+ FilterClause – 

  ```
  {
      "LogicOperator": "AND", // Only "AND" is supported
      "Filters": [
          {
              "Type": "ParticipantRole",
              "Data": "CUSTOMER" | "AGENT" | "ANY"
          },
      ]
  }
  ```
+ Negate - false

## PostCall total non-talk time condition
<a name="postcall-nontalktimecondition"></a>

**Parameters**
+ Operator - "NumberLessOrEqualTo \$1 "NumberGreaterOrEqualTo"
+ Operands – An array of number, array length can only be 1. Value is an integer with minimum value 1. 
+ ComparisonValue – "\$1.ContactLens.PostCall.NonTalkTime.TotalTimeSecs"
+ Negate - false

## PostCall longest non-talk time condition
<a name="postcall-longestnontalktimecondition"></a>

**Parameters**
+ Operator - "NumberLessOrEqualTo" \$1 "NumberGreaterOrEqualTo"
+ Operands – An array of number, array length can only be 1. Value is an integer with minimum value 1. 
+ ComparisonValue – "\$1.ContactLens.PostCall.NonTalkTime.LongestTimeSecs"
+ Negate - false

## PostCall interruption condition
<a name="postcall-interruptioncondition"></a>

**Parameters**
+ Operator - "NumberLessOrEqualTo" \$1 "NumberGreaterOrEqualTo"
+ Operands – An array of number, array length can only be 1. Value is an integer with minimum value 1. 
+ ComparisonValue – "\$1.ContactLens.PostCall.Interruptions.Instances"
+ Negate - false

## PostCall total hold time condition
<a name="postcall-holdtimecondition"></a>

**Parameters**
+ Operator - "NumberLessOrEqualTo" \$1 "NumberGreaterOrEqualTo"
+ Operands – An array of number, array length can only be 1. Value is an integer with minimum value 1. 
+ ComparisonValue – "\$1.ContactLens.PostCall.Agent.CustomerHoldDurationSecs"
+ Negate - false

## PostCall longest hold time condition
<a name="postcall-longholdcondition"></a>

**Parameters**
+ Operator - "NumberLessOrEqualTo" \$1 "NumberGreaterOrEqualTo"
+ Operands – An array of number, array length can only be 1. Value is an integer with minimum value 1. 
+ ComparisonValue – "\$1.ContactLens.PostCall.Agent.LongestHoldDurationSecs"
+ Negate - false

## PostCall number of holds condition
<a name="postcall-numberholdcondition"></a>

**Parameters**
+ Operator - "NumberLessOrEqualTo" \$1 "NumberGreaterOrEqualTo"
+ Operands – An array of number, array length can only be 1. Value is an integer with minimum value 1. 
+ ComparisonValue – "\$1.ContactLens.PostCall.Agent.NumberOfHolds"
+ Negate - false

## PostCall agent interaction duration condition
<a name="postcall-agentinteractiondurationcondition"></a>

**Parameters**
+ Operator - "NumberLessOrEqualTo" \$1 "NumberGreaterOrEqualTo"
+ Operands – An array of number, array length can only be 1. Value is an integer with minimum value 1. 
+ "\$1.ContactLens.PostCall.Agent.AgentInteractionDurationSecs"
+ Negate - false