Unify and manage your data

Entity status counts for a conversation

Learn more about entity status counts for a conversation.

Use the Entity status counts for a conversation to get the entity status counts for a conversation. This lets you get per-entity status counts without listing every entity.

HTTP method and endpoint

Use the following HTTP method and endpoint path to entity status counts for a conversation.

POST {TenantURL}/ai/agentflow/api/v202605/{tenant_id}/lrt/jobs/conversation/{conversation_id}/entities/summary

The following table describes the endpoint path parameters.

ParameterTypeRequiredDescription
TenantURLStringYesThe base URL for your tenant.
conversation_idStringYesThe unique identifier of the conversation associated with the job.
tenant_idStringYesThe tenant identifier.

Request headers

The following request headers must be included.

HeaderValueRequired
Authorization<access_token>Yes
Content-Typeapplication/jsonYes

Request body

The following table describes the request body parameters.

ParameterTypeRequiredDescriptionAccepted values / Default
filter_conditionObjectNoThe entity type or status filter to scope the counts.—
filter_condition.entity_typeStringNoReturns only entities of this entity type.—
filter_condition.entity_idStringNoReturns only the entity with this identifier.—
filter_condition.statusStringNoReturns only entities with this processing status.—
filter_condition.decision_codeStringNoReturns only entities with this decision code (for example NO_MATCH).—
run_idStringNoScopes the counts to a single worker run.—

Example request

Use the following example to see how a complete request is structured, with headers and a JSON body.

POST {TenantURL}/ai/agentflow/api/v202605/tenant-xyz/lrt/jobs/conversation/example-id/entities/summary
Authorization: <access_token>
Content-Type: application/json

{
  "filter_condition": {
    "entity_type": "<string>",
    "entity_id": "<string>",
    "status": "<string>",
    "decision_code": "<string>"
  },
  "run_id": "<string>"
}

Response body

The following table describes the fields returned in the response body.

ParameterTypeDescription
conversation_idStringThe unique identifier of the conversation.
totalIntegerThe total number of entities counted.
countsObjectThe entity counts, grouped by status.
counts.processedIntegerThe number of entities that completed successfully.
counts.failedIntegerThe number of entities that failed processing.
counts.needs_reviewIntegerThe number of entities that are waiting for review.
by_entity_typeArrayThe status counts, broken down by entity type.
by_entity_type[].entity_typeStringThe entity type, or unknown when the agent did not provide one.
by_entity_type[].processedIntegerThe number of entities of this type that completed successfully.
by_entity_type[].failedIntegerThe number of entities of this type that failed processing.
by_entity_type[].needs_reviewIntegerThe number of entities of this type that are waiting for review.
by_entity_type[].totalIntegerThe total number of entities of this type.
top_reasonsArrayThe most common short reasons, ordered by count (highest first).
top_reasons[].reasonStringThe short explanation text.
top_reasons[].statusStringThe status that the reason was recorded against.
top_reasons[].countIntegerThe number of entities with this reason.
top_reasons_truncatedBooleanWhether some reasons were omitted because the top-reasons limit was reached.
by_decision_codeArrayThe counts grouped by decision code.
by_decision_code[].decision_codeStringThe outcome code for the entity (for example NO_MATCH).
by_decision_code[].statusStringThe status that the decision code was recorded against.
by_decision_code[].countIntegerThe number of entities with this decision code.
sample_entitiesArrayA few matching entity rows, so you can see example entity_id, decision_code, and reason values before building a filter.
sample_entities[].entity_idStringThe unique identifier of the entity.
sample_entities[].entity_typeStringThe entity type name.
sample_entities[].labelStringThe display label of the entity.
sample_entities[].statusStringThe processing status of the entity: processed, failed, or needs_review.
sample_entities[].decision_codeStringThe outcome code for the entity (for example NO_MATCH).
sample_entities[].reasonStringA short explanation of the outcome, shortened for display.
sample_entities[].confidenceStringThe confidence band for the outcome, when available.
sample_entities[].run_idStringThe unique identifier of the run that processed this entity.
filtered_totalIntegerThe count for the requested status filter, when one was supplied.
truncatedBooleanWhether the count reached the page limit, so the counts may be lower than the actual totals.

Example response

The following example shows a response with successful response.

{
  "conversation_id": "<string>",
  "total": 0,
  "counts": {
    "processed": 0,
    "failed": 0,
    "needs_review": 0
  },
  "by_entity_type": [
    {
      "entity_type": "<string>",
      "processed": 0,
      "failed": 0,
      "needs_review": 0,
      "total": 0
    }
  ],
  "top_reasons": [
    {
      "reason": "<string>",
      "status": "<string>",
      "count": 0
    }
  ],
  "top_reasons_truncated": false,
  "by_decision_code": [
    {
      "decision_code": "<string>",
      "status": "<string>",
      "count": 0
    }
  ],
  "sample_entities": [
    {
      "entity_id": "<string>",
      "entity_type": "<string>",
      "label": "<string>",
      "status": "<string>",
      "decision_code": "<string>",
      "reason": "<string>",
      "confidence": "<string>",
      "run_id": "<string>"
    }
  ],
  "filtered_total": 0,
  "truncated": false
}

The following table lists the possible error responses returned by this API.

HTTP statusDescriptionRecommended action
422 Unprocessable EntityValidation ErrorReview the request parameters or body, correct the invalid values, and resend the request.