{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/nice/json-schema/nice-interaction-wrapper-schema.json",
  "title": "InteractionWrapper",
  "description": "response that contain interactions and metadata for the current page",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/nice-interactionanalytics-interactions-openapi.yml#/components/schemas/InteractionWrapper",
  "type": "object",
  "properties": {
    "totalRecords": {
      "type": "integer",
      "format": "int32",
      "description": "total number of records matching the given criteria"
    },
    "interactions": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Interaction"
      },
      "description": "list of interactions being returned in current page"
    },
    "links": {
      "type": "object",
      "properties": {
        "self": {
          "type": "string",
          "description": "link to self/current page"
        },
        "previous": {
          "type": "string",
          "description": "link to previous page if present"
        },
        "next": {
          "type": "string",
          "description": "link to next page if present"
        }
      },
      "description": "links to paginate through the results"
    }
  },
  "$defs": {
    "Category": {
      "type": "object",
      "description": "single category",
      "properties": {
        "channelName": {
          "type": "string",
          "description": "The side of the conversation where the category match occurred. Possible values are CLIENT or AGENT."
        },
        "fullPaths": {
          "uniqueItems": true,
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Hierarchical locations of the category. For example, the category Contacted Multiple Times is part of the category set First Contact Resolution Issues, which in turn is part of the Agent Performance set. If this category is matched in the interaction, this metric value is Agent Performance/First Contact Resolution Issues/Contacted Multiple Times."
        }
      }
    },
    "Channel": {
      "type": "object",
      "description": "single channel",
      "properties": {
        "name": {
          "type": "string",
          "description": "The type of participant within the interaction. The participant is either the AGENT or the CLIENT."
        },
        "sentiment": {
          "allOf": [
            {
              "$ref": "#/$defs/Sentiment"
            }
          ],
          "description": "Level of frustration displayed in the interaction. Possible values are Low, HIGH, or NONE. This metric is shown only if the channel name value is CLIENT. Frustration is not measured for the agent side of the conversation."
        },
        "beginSentiment": {
          "allOf": [
            {
              "$ref": "#/$defs/Sentiment"
            }
          ],
          "description": "Sentiment displayed at the beginning of the interaction by either the client or the agent, depending on the channel participant. Determined by the first 400 words, or first 30%, of the interaction, whichever occurs first. It can help you identify common reasons or problems clients call about. The value can be POSITIVE, NEGATIVE, or NEUTRAL."
        },
        "endSentiment": {
          "allOf": [
            {
              "$ref": "#/$defs/Sentiment"
            }
          ],
          "description": "Sentiment displayed at the end of the interaction by either the client or the agent, depending on the channel participant. Determined by the last 30% of an interaction. The value can be POSITIVE, NEGATIVE, or NEUTRAL."
        },
        "frustration": {
          "$ref": "#/$defs/Frustration"
        }
      }
    },
    "EnlightenMetric": {
      "type": "object",
      "description": "represents enlighten metrics",
      "properties": {
        "behaviorName": {
          "type": "string",
          "description": "Name of the Enlighten behavioral metric depending on the Enlighten package model."
        },
        "indexScore": {
          "type": "integer",
          "format": "int32",
          "description": "Normalized score value from zero to ten for the metric. The NICE Enlighten AI index provides a standardized scoring approach-based ranges of results on billions of real-life consumer interactions. A score of 6 or higher is considered a positive performance for the behavior. A score of 4 or lower is considered a negative performance for the behavior."
        },
        "rawScore": {
          "type": "number",
          "format": "double",
          "description": "The raw score for the agent performance in the behavioral metric for this interaction. The index score is more helpful for finding insights."
        },
        "enlightenPackageModels": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The type of Enlighten model. Possible values are CustomerSatisfaction or SalesEffectiveness."
        }
      }
    },
    "Entity": {
      "type": "object",
      "description": "one of the entity defined in https://help.nice-incontact.com/content/interactionanalyticspro/companyprofile/companyprofile.htm",
      "properties": {
        "channelName": {
          "type": "string",
          "description": "The participant that mentioned the entity. Possible values are CLIENT or AGENT."
        },
        "displayText": {
          "type": "string",
          "description": "The word or phrase mentioned during the interaction associated with the entity. Possible values vary depending on the custom entities you've created."
        },
        "type": {
          "type": "string",
          "description": "Entity type for this mention. For example, if the client mentions the custom entity \"widgets\" you created in the Products entity type, the value here is PRODUCTS."
        },
        "sentimentValue": {
          "type": "string",
          "description": "Sentiment associated with the entity. This can be either a default sentiment or the custom sentiment you've set for the entity. Possible values are POSITIVE, NEGATIVE, and NEUTRAL."
        },
        "custom": {
          "type": "boolean",
          "description": "Whether the entity was added to the company profile or was included as an out-of-the-box (OOB) entity. If it is a custom entity, the value is true. If it is an OOB entity, the value is false."
        }
      }
    },
    "Frustration": {
      "type": "object",
      "description": "Level of frustration displayed in the interaction. Possible values are Low, HIGH, or NONE. This metric is shown only if the channel name value is CLIENT. Frustration is not measured for the agent side of the conversation.",
      "properties": {
        "type": {
          "type": "string"
        }
      }
    },
    "Interaction": {
      "type": "object",
      "properties": {
        "tenantId": {
          "type": "string",
          "description": "The ID unique to your tenant. Always the same for every interaction"
        },
        "segmentId": {
          "type": "string",
          "description": "Unique identifier for each segment of an interaction. An interaction can be made up of multiple segments if contacts are transferred or conferenced."
        },
        "acdContactId": {
          "type": "integer",
          "format": "int64",
          "description": "Unique numeric identifier assigned by CXone to a contact."
        },
        "agentContactId": {
          "type": "string",
          "description": "Same as the acdContactId."
        },
        "resolved": {
          "type": "boolean",
          "description": "If contact's issue was resolved in the interaction, the value is true. If not, the value is false."
        },
        "publishedAt": {
          "type": "string",
          "format": "date-time",
          "description": "Data received from ACD or Recording. The date and time stamp for when the segment ended. The date format is YYYY-MM-DD. The time stamp used 24-hour format: HH:MM:SS. For example, \"2023-08-15T12:32:16Z\""
        },
        "startTime": {
          "type": "string",
          "format": "date-time",
          "description": "The date and time an interaction began to the second."
        },
        "endTime": {
          "type": "string",
          "format": "date-time",
          "description": "The date and time an interaction ended to the second."
        },
        "enlightenMetrics": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/EnlightenMetric"
          },
          "description": "Groups the following sub-metrics based on the Enlighten customer satisfaction and sales effectiveness metrics. This feature requires Interaction Analytics Advanced or Premium and Enlighten enabled features. If you don't have this feature, the value for each sub-metric is null."
        },
        "channels": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Channel"
          },
          "description": "Groups the following sub-metrics based on the participant within the interaction. The participant is either the AGENT or the CLIENT."
        },
        "categoryMatches": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Category"
          },
          "description": "Groups the following sub-metrics for each category match during the interaction, based on the dataset in which the category is used. For example, if a category is used in four different datasets, there are four sub-metric groupings for that category. This raw data does not show where in the interaction a category match occurred, nor how many times the category was matched."
        },
        "entities": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Entity"
          },
          "description": "Groups the following sub-metrics for mentions of the custom entities you've created in the company profile. Mentions are further separated by channelName. For example, if both the client and the agent mention the custom entity 'website', there is an entity grouping for each participant."
        },
        "mediaType": {
          "type": "string",
          "description": "Identifies the media type, or CXone channel, used for the interaction, such as Chat, PhoneCall etc."
        },
        "firstAnnotatedAt": {
          "type": "string",
          "format": "date-time",
          "description": "the date on which the interaction was first annotated"
        },
        "contactNo": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "list of contact numbers associated with this interaction segment"
        },
        "interactionId": {
          "type": "string",
          "description": "Unique alphanumeric identifier assigned by CXone to the interaction."
        },
        "holdCount": {
          "type": "integer",
          "format": "int32",
          "description": "The total number of times a caller was placed on hold during an interaction"
        },
        "holdSeconds": {
          "type": "integer",
          "format": "int64",
          "description": "The total duration (in seconds) a caller spent on hold during an interaction"
        },
        "contactEndReason": {
          "type": "string",
          "description": "Indicates how the interaction ended based on CTI disconnect events (e.g., agent hung up, customer disconnected)"
        },
        "dispositionCode": {
          "type": "string",
          "description": "A system-generated code indicating the final outcome or status of the interaction"
        },
        "nonHoldNotableSilenceSeconds": {
          "type": "integer",
          "format": "int64",
          "description": "Duration of silence during a call excluding any time spent on hold"
        },
        "nonHoldNotableSilencePercentage": {
          "type": "integer",
          "format": "int32",
          "description": "Percentage of the interaction that was silent, excluding hold time"
        },
        "notableSilenceSeconds": {
          "type": "integer",
          "format": "int32",
          "description": "Represents the total number of seconds during an interaction where notable silence occurred"
        },
        "notableSilencePercentage": {
          "type": "integer",
          "format": "int32",
          "description": "Indicates the percentage of the total interaction duration that was marked by notable silence"
        },
        "enlightenSentimentRawScore": {
          "type": "number",
          "format": "double",
          "description": "The raw CSAT score for this interaction"
        },
        "enlightenSentimentIndexScore": {
          "type": "integer",
          "format": "int32",
          "description": "Normalized CSAT score value from zero to ten for this interaction"
        },
        "segmentSummaryPrimaryIntentCategory": {
          "type": "string",
          "description": "primary intent category of this interaction, from the segment summary engine"
        },
        "segmentSummaryPrimaryIntentTopic": {
          "type": "string",
          "description": "primary intent topic of this interaction, from the segment summary engine"
        },
        "segmentSummaryPrimaryIntentName": {
          "type": "string",
          "description": "primary intent name of this interaction, from the segment summary engine"
        },
        "segmentSummaryActions": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "actions recommended by the segment summary engine"
        },
        "segmentSummaryOutcomes": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "outcomes of the interaction from segment summary engine"
        }
      }
    },
    "Sentiment": {
      "type": "object",
      "description": "represents sentiment",
      "properties": {
        "value": {
          "type": "string"
        }
      }
    }
  }
}