> ## Documentation Index
> Fetch the complete documentation index at: https://docs.togai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Event Statuses

## INGESTION\_IN\_PROGRESS

1. If the ingested event already exists and

   * if it is an entitled event,

     * if the status of the existing event is not IN\_PROGRESS, we consider the ingested event as separate correction event and mark it as IN\_PROGRESS

     * else we do an event sha check to check if event is a duplicate. If found duplicate we mark it as INGESTION\_FAILED\_DUPLICATE\_EVENT else we process the existing event.

   * else
     * on idempotency check success, we mark event as IN\_PROGRESS

     * else event is marked as INGESTION\_FAILED\_DUPLICATE\_EVENT upon duplicate check

   else we mark it as IN\_PROGRESS

## INGESTION\_FAILED

1. If the event is not of internal schema type and if the attributes or dimensions are missing in the event.
2. On failure of getting the necessary details to process the events like schema, account etc.

## INGESTION\_FAILED\_SCHEMA\_NOT\_DEFINED

1. Upon processing an IN\_PROGRESS event if the schema definition is not found
2. Upon processing an IN\_PROGRESS event internal schema defined task like named\_license, usage events, if the name of the internal schema is mentioned wrong

## INGESTION\_FAILED\_UNITS\_INVALID

1. On computation of usage from matched usage\_meters, if the json logic parsing, evaluation, big decimal conversion of usage\_units fails

## INGESTION\_COMPLETED\_NO\_MATCHING\_METERS

1. In case of entitledEvent from IN\_PROGRESS state, if the presence of usageMeter is not found before ingestion of the entitled event
2. In case of non named\_license event, if there is no usage meters found.

## INGESTION\_COMPLETED\_EVENT\_METERED

1. On succesful completion of named\_license\_event
2. On succesful insertion of usage\_metadata for any other event than named\_license\_event

## INGESTION\_COMPLETED\_EVENT\_NOT\_METERED

1. If no usage\_metadata is generated

## UNKNOWN

1. On failure of transformation of valid event status number to IngestionStatus

## INGESTION\_FAILED\_ENRICHMENT\_FAILED

1. For entitled event in IN\_PROGRESS, if enrichment processing fails

## INGESTION\_FAILED\_PAST\_GRACE\_PERIOD

1. On processing an IN\_PROGRESS event, if the ingestion\_timestamp is more than the cycle end date plus grace\_period

## INGESTION\_FAILED\_ACCOUNT\_NOT\_FOUND

1. If the process of getting account details fails as a part of processing IN\_PROGRESS events

## INGESTION\_FAILED\_DUPLICATE\_EVENT

1. If insertion of usage\_metadata, usage\_entries, usage\_for\_cycle results in EntityAlreadyExistsException

## REVERTED

1. For undo event corrections, in case of existing event status not in (IN\_PROGRESS, INGESTION\_FAILED\_DUPLICATE\_EVENT, INGESTION\_FAILED\_INSUFFICIENT\_CREDITS, REVERTED)
2. For redo event corrections, in case of existing event status not in (IN\_PROGRESS, INGESTION\_FAILED\_DUPLICATE\_EVENT, REVERTED, INGESTION\_FAILED\_UNITS\_INVALID, INGESTION\_FAILED\_PAST\_GRACE\_PERIOD)
3. For redo\_event event corrections, in case of existing event status not in (IN\_PROGRESS, INGESTION\_FAILED\_DUPLICATE\_EVENT, REVERTED, INGESTION\_FAILED\_UNITS\_INVALID, INGESTION\_FAILED\_PAST\_GRACE\_PERIOD, INGESTION\_FAILED\_ACCOUNT\_NOT\_FOUND)

## INGESTION\_FAILED\_NO\_EVENT\_ID

1. If event with no id is received and there is no eventIdTemplate or eventIdTemplate parsing fails

## INGESTION\_FAILED\_INVALID\_NAMED\_LICENSE\_EVENT

1. On processing an IN\_PROGRESS named license event, if the event is not a valid internal event type

## INGESTION\_FAILED\_INSUFFICIENT\_CREDITS

1. On processing an IN\_PROGRESS event, if the event is not entitled and the schema has feature\_details we try to deduct wallet entries, on failure of deduct wallet entries we mark it as INGESTION\_FAILED\_INSUFFICIENT\_CREDITS
