Fluent Commerce Logo
Docs
Sign In

Inventory Batch Events

Essential knowledge

Author:

Fluent Commerce

Changed on:

4 July 2025

Overview

Batch Events offer insights into the processing status of Batches, helping to determine whether the corresponding records within a batch were successfully submitted for processing.

Key points

  • Batch `CREATE` and `BATCH_COMPLETE` events provide insights into the processing status of Inventory Batches
  • The events can be used to measure the duration of Inventory Batch processing
  • Inventory Batch Events are currently not operational for Inventory Batches going through Batch Pre-Processing

For each Batch that is submitted to the platform, a `CREATE` is generated, indicating that the batch has been received. When all the corresponding records in an Batch have been processed a `BATCH_COMPLETE` is generated. The `generatedOn` values in the events can be used to calculate the load duration. The of these events is `JOB`, and can be used to query for a collection of batches and their corresponding events. If multiple batches are submitted for the same job, the overall job duration can be measured by using the `generatedOn` times of the earliest `CREATE`  and the latest `BATCH_COMPLETE` .

The generated events can be retrieved via the API providing the Job ID and optionally the Batch ID.

1https://{{fluent.account.id}}.api.fluentretail.com/api/v4.1/event?context.rootEntityType=JOB&context.rootEntityId={{job.id}}&context.rootEntityType=JOB&context.entityId={{batch.id}}&context.entityType=BATCH

`CREATE` example:

1
2{
3  "id": "d134a570-4157-11ea-bc71-fdd97c11135c",
4  "name": "CREATE",
5  "type": "ORCHESTRATION",
6  "accountId": "TEST",
7  "retailerId": "1",
8  "category": "ORDER WORKFLOW",
9  "context": {
10    "sourceEvents": [],
11    "entityType": "BATCH",
12    "entityId": "2",
13    "entityRef": "2",
14    "rootEntityType": "JOB",
15    "rootEntityId": "1",
16    "rootEntityRef": "1"
17  },
18  "eventStatus": "PENDING",
19  "attributes": [
20    {
21      "name": "S3_bucket",
22      "value": "rubix-batch-inventory-ap-southeast-2-multi-sandbox",
23      "type": "STRING"
24    },
25    {
26      "name": "S3_object",
27      "value": "batch/account=TEST/type=INVENTORY/year=2020/month=01/date=27/1558-1580165601465",
28      "type": "STRING"
29    }
30  ],
31  "source": "Fluent-API",
32  "generatedBy": "retrailer",
33  "generatedOn": "2020-01-27T22:53:21.607+0000"
34}

`BATCH_COMPLETE` example:

1{
2  "id": "d1b01700-4157-11ea-b9f2-5fe6d7129603",
3  "name": "BATCH_COMPLETE",
4  "type": "ORCHESTRATION_AUDIT",
5  "accountId": "TEST",
6  "retailerId": "1",
7  "category": "BATCH",
8  "context": {
9    "sourceEvents": [
10      "d134a570-4157-11ea-bc71-fdd97c11135c"
11    ],
12    "entityType": "BATCH",
13    "entityId": "2",
14    "entityRef": "2",
15    "rootEntityType": "JOB",
16    "rootEntityId": "1",
17    "rootEntityRef": "1"
18  },
19  "eventStatus": "COMPLETE",
20  "attributes": null,
21  "source": null,
22  "generatedBy": "Rubix User",
23  "generatedOn": "2020-01-27T22:53:22.347+0000"
24}
Fluent Commerce

Fluent Commerce