

# OnContactEvaluationSubmit


## Agent Hierarchy


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

## Initiation Method


**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.ContactEvaluation.InitiationMethod'
+ Negate - False

## DisconnectReason


**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.ContactEvaluation.DisconnectReason"
+ Negate - False

## Routing Profile


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

## PotentialDisconnectIssue


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

## Custom User-Defined Segment Attribute


**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

## ContactEvaluation - Results available condition


**Parameters**
+ Operator - "EQUALS"
+ Operands – An array of string, array length can only be 1. Value is the evaluation form ID. 
+ ComparisonValue – "\$1.ContactLens.ContactEvaluation.Form.FormId"
+ Negate – false

## ContactEvaluation - Form score condition


ContactEvaluation form score condition has a compound condition format where Operator is an AND condition and its operands consist of two conditions that represent the form and the form score. 

**Parameters that represent the form**: See [ContactEvaluation - Results available condition](https://docs.aws.amazon.com/connect/latest/APIReference/OnContactEvaluationSubmit.html#ContactEvaluation-results)

**Parameters that represent the form score:**
+ Operator - "NumberLessOrEqualTo" \$1 "NumberGreaterOrEqualTo"
+ Operands – An array of number, array length can only be 1. Value is the form score. 
+ ComparisonValue – "\$1.ContactLens.ContactEvaluation.Form.Score"
+ Negate – false

Following is an example.

```
{
    "Operator": "AND",
    "Operands": [
        {
            "Operator": "EQUALS",
            "Operands": ["11111111-1234-5678-9123-12345678012"],
            "ComparisonValue": "$.ContactLens.ContactEvaluation.Form.FormId",
            "Negate": false
        },
        {
            "Operator": "NumberLessOrEqualTo",
            "Operands": [50],
            "ComparisonValue": "$.ContactLens.ContactEvaluation.Form.Score",
            "Negate":false
        },
    ]
}
```

## ContactEvaluation - Section Score


ContactEvaluation section score condition has a compound condition format where Operator is an AND condition and its operands consist of three conditions that represent the form, section, and section score respectively.

**Parameters that represent the form**: See [ContactEvaluation - Results available condition](https://docs.aws.amazon.com/connect/latest/APIReference/OnContactEvaluationSubmit.html#ContactEvaluation-results)

**Parameters that represent the section:**
+ Operator - "EQUALS"
+ Operands – An array of string, array length can only be 1. Value is the section reference ID. 
+ ComparisonValue – "\$1.ContactLens.ContactEvaluation.Section.SectionRefId"
+ Negate – false

**Parameters that represent the section score:**
+ Operator - "NumberLessOrEqualTo" \$1 "NumberGreaterOrEqualTo"
+ Operands – An array of number, array length can only be 1. Value is the section score. 
+ ComparisonValue – "\$1.ContactLens.ContactEvaluation.Section.Score"
+ Negate – false

Following is an example.

```
{
    "Operator": "AND",
    "Operands": [
        {
            "Operator": "EQUALS",
            "Operands": ["11111111-1234-5678-9123-12345678012"],
            "ComparisonValue": "$.ContactLens.ContactEvaluation.Form.FormId",
            "Negate": false
        },
        {
            "Operator": "EQUALS",
            "Operands": ["s12345678"],
            "ComparisonValue": "$.ContactLens.ContactEvaluation.Section.SectionRefId",
            "Negate":false
        },
        {
            "Operator": "NumberLessOrEqualTo",
            "Operands": [50],
            "ComparisonValue": "$.ContactLens.ContactEvaluation.Section.Score",
            "Negate":false
        },
    ]
}
```

## ContactEvaluation - Question and Answer


ContactEvaluation question and answer condition has a compound condition format where Operator is an AND condition and its operands consist of three conditions that represent the form, question, and answer value respectively.

**Parameters that represent the form**: See [ContactEvaluation - Results available condition](https://docs.aws.amazon.com/connect/latest/APIReference/OnContactEvaluationSubmit.html#ContactEvaluation-results)

**Parameters that represent the question:**
+ Operator - "EQUALS"
+ Operands – An array of string, array length can only be 1. Value is the question reference ID. 
+ ComparisonValue – "\$1.ContactLens.ContactEvaluation.Question.QuestionRefId"
+ Negate – false

**Parameters that represent a numeric answer:**
+ Operator - "NumberLessOrEqualTo" \$1 "NumberGreaterOrEqualTo"
+ Operands – An array of number, array length can only be 1. Value is the answer value. 
+ ComparisonValue – "\$1.ContactLens.ContactEvaluation.Question.Answer.Value"
+ Negate – false

Following is an example for a numeric question type.

```
{
    "Operator": "AND",
    "Operands": [
        {
            "Operator": "EQUALS",
            "Operands": ["11111111-1234-5678-9123-12345678012"],
            "ComparisonValue": "$.ContactLens.ContactEvaluation.Form.FormId",
            "Negate": false
        },
        {
            "Operator": "EQUALS",
            "Operands": ["s12345678"],
            "ComparisonValue": "$.ContactLens.ContactEvaluation.Question.QuestionRefId",
            "Negate":false
        },
        {
            "Operator": "NumberLessOrEqualTo",
            "Operands": [5],
            "ComparisonValue": "$.ContactLens.ContactEvaluation.Question.Answer.Value",
            "Negate":false
        }
    ]
}
```

**Parameters that represent a single select answer:**
+ Operator - "EQUALS"
+ Operands – An array of string, array length can only be 1. Value is the answer reference ID.
+ ComparisonValue – "\$1.ContactLens.ContactEvaluation.Question.Answer.ValueRefId"
+ Negate – true/false. If set to true, it means *The answer is not equal to the answer reference ID specified in the Operands*.

Following is an example for single select question type.

```
{
    "Operator": "AND",
    "Operands": [
        {
            "Operator": "EQUALS",
            "Operands": ["11111111-1234-5678-9123-12345678012"],
            "ComparisonValue": "$.ContactLens.ContactEvaluation.Form.FormId",
            "Negate": false
        },
        {
            "Operator": "EQUALS",
            "Operands": ["q12345678"],
            "ComparisonValue": "$.ContactLens.ContactEvaluation.Question.QuestionRefId",
            "Negate":false
        },
        { // for single select question type
            "Operator": "EQUALS",
            "Operands": ["o12345678"],
            "ComparisonValue": "$.ContactLens.ContactEvaluation.Question.Answer.ValueRefId",
            "Negate":false
       },
    ]
}
```

## ContactEvaluation - agent condition


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

## ContactEvaluation - queue condition


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

## ContactEvaluation - contact attributes condition


**Parameters**
+ Operator - "EQUALS"
+ Operands – An array of string, array length can only be 1. Value is the contact attribute value.
+ ComparisonValue – "\$1.ContactLens.ContactEvaluation.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.