---
schema_version: "1"
id: 6aa11f8184098bb33abef98e6d2e65ca4689d4adec05b527570b5c239bd1d9c8
title: Granular Replication Events
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/cc/264-0-0/b2c_event_replication_granular.md
canonical_url: https://help.salesforce.com/s/articleView?id=cc.b2c_event_replication_granular.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 110258c374039d512c1716d71bbd2ab5902ebb74f2282e5aaa283f8f7867b124
description: The B2C Commerce system fires granular replication events when the granular replication job completes, partially fails, or fully fails. Granular replication operates at the per-object level (products, price tables, content assets) rather than the bulk replication-process level, so its events report which individual object IDs succeeded and which failed.
products:
  - Commerce
  - B2C Commerce
release: "264"
---
# Granular Replication Events

The B2C Commerce system fires granular replication events when the granular replication job completes, partially fails, or fully fails. Granular replication operates at the per-object level (products, price tables, content assets) rather than the bulk replication-process level, so its events report which individual object IDs succeeded and which failed.

**Available in:** B2C Commerce release 26.7 and later.

## Event IDs

| Event ID | Description | When fired |
| --- | --- | --- |
| `sf.cc.replication.granular.completed` | Granular replication completed successfully | When the granular replication job finishes with no target error and zero non-started, non-published, and non-invalidated objects |
| `sf.cc.replication.granular.failed` | Granular replication failed entirely | When the job finishes in an error state and no objects in this execution succeeded |
| `sf.cc.replication.granular.incomplete` | Granular replication completed with a mix of successes and failures | When the job finishes in an error state but at least one object in this execution succeeded |

## HTTP headers

Granular replication events use the standard Commerce Cloud platform headers documented in [Common HTTP Headers for B2C Commerce Events](https://help.salesforce.com/s/articleView?id=cc.b2c_event_common_headers.htm&release=264.0.0&type=5 "Every B2C Commerce event includes the same set of standard x-sf-cc-* headers, so your connector can identify and correlate events consistently regardless of the event type."), with `x-sf-cc-event-id` set to the granular replication event ID (for example, `sf.cc.replication.granular.completed`).

## JSON payload structure — common fields

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `processId` | integer | Yes | Job execution ID of the granular replication run |
| `type` | string | Yes | Always the literal `GRANULAR`; distinguishes granular replication events from process-level replication events |
| `targetSystem` | string | Yes | Target system name, typically Development or Production |
| `state` | string | Yes | Final state of the job (see Granular process states) |
| `success` | boolean | Yes | `true` only for completed events; `false` for failed and incomplete events |
| `startDate` | string | Yes | ISO-8601 timestamp of the job start; empty string when no job start time was recorded |
| `endDate` | string | Yes | ISO-8601 timestamp when the event was emitted |

## Event-specific fields

| Event | Additional fields |
| --- | --- |
| `sf.cc.replication.granular.completed` | `objects`: per-trackable lists of object IDs that completed successfully |
| `sf.cc.replication.granular.failed` | `errorState` (always `GRANULAR_REPLICATION_FAILURE`) and `failedObjects`: per-trackable lists of objects that failed, each with an `id` and a `status` |
| `sf.cc.replication.granular.incomplete` | `errorState` (always `GRANULAR_REPLICATION_INCOMPLETE`), `successfulObjects`, and `failedObjects` |

## Granular process states

The `state` field indicates the final state of the granular replication job.

| Value | Description |
| --- | --- |
| `COMPLETED` | All queued objects exported, imported, and invalidated cleanly |
| `FAILED` | The job ended in error and produced no successful objects |
| `INCOMPLETE` | The job ended in error but at least one object succeeded (partial result) |

## Object buckets

The `objects`, `successfulObjects`, and `failedObjects` payload fields share the same three-bucket structure, one bucket per trackable type.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `products` | array | Yes | Per-product entries |
| `priceTables` | array | Yes | Per-price-table entries |
| `contentAssets` | array | Yes | Per-content-asset entries |

Successful entries (in `objects` and `successfulObjects`) contain an `id` string. Failed entries (in `failedObjects`) contain an `id` string and a machine-readable `status` code.

## Failure status values

The `status` field on each `failedObjects` entry contains a machine-readable code.

| Value | Description |
| --- | --- |
| `EXPORT_ERROR` | Export from the source system failed for this object |
| `IMPORT_ERROR` | Import into the target system failed for this object |
| `NOT_FINISHED` | Object was queued or exported but never reached a finished state |
| `TARGET_ERROR` | Target system reported an error for this object after export |

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-cc-b2c_merchandiser_administrator-264-0-0-production-enus/ea76f372-6cfa-42a6-8e7c-05c6df7abed8/images/icon_note.png)

Note `NOT_INVALIDATED` objects don't appear in `failedObjects`. When an object imports successfully but the cache invalidation step doesn't finish, the object is still reported in the success lists (`objects` or `successfulObjects`). A non-zero job-level non-invalidated count is what causes the job to emit an `sf.cc.replication.granular.incomplete` event rather than a `completed` event.

## Example: successful granular replication event

```json

{
"processId": 456,
"type": "GRANULAR",
"targetSystem": "Production",
"state": "COMPLETED",
"success": true,
"objects": {
"products": [
{ "id": "prod-001" }
],
"priceTables": [
{ "id": "prod-001@usd-prices" }
],
"contentAssets": []
},
"startDate": "2026-03-11T22:13:20Z",
"endDate": "2026-03-11T22:13:25Z"
}
```

## Example: failed granular replication event

```json

{
"processId": 456,
"type": "GRANULAR",
"targetSystem": "Production",
"state": "FAILED",
"success": false,
"errorState": "GRANULAR_REPLICATION_FAILURE",
"failedObjects": {
"products": [
{ "id": "prod-001", "status": "TARGET_ERROR" }
],
"priceTables": [],
"contentAssets": []
},
"startDate": "2026-03-11T22:13:20Z",
"endDate": "2026-03-11T22:13:25Z"
}
```

## Example: incomplete granular replication event

```json

{
"processId": 456,
"type": "GRANULAR",
"targetSystem": "Production",
"state": "INCOMPLETE",
"success": false,
"errorState": "GRANULAR_REPLICATION_INCOMPLETE",
"successfulObjects": {
"products": [
{ "id": "prod-001" }
],
"priceTables": [
{ "id": "prod-001@usd-prices" }
],
"contentAssets": []
},
"failedObjects": {
"products": [
{ "id": "prod-002", "status": "IMPORT_ERROR" }
],
"priceTables": [
{ "id": "prod-003@eur-prices", "status": "NOT_FINISHED" }
],
"contentAssets": []
},
"startDate": "2026-03-11T22:13:20Z",
"endDate": "2026-03-11T22:13:25Z"
}
```

## Granular replication implementation notes

- `type` is the literal string `GRANULAR`; the per-object granular replication flow is distinct from the process-level `Replication`, `Publication`, and `Code*` event types.
- `processId` is the granular replication job execution ID, not a process UUID.
- `endDate` reflects when the event was emitted, not the final job end time.
- `errorState` is `GRANULAR_REPLICATION_FAILURE` for failed events and `GRANULAR_REPLICATION_INCOMPLETE` for incomplete events.
- Each object bucket (`products`, `priceTables`, `contentAssets`) is always present in the payload, even when empty.
- Failure status values are machine-readable codes, not localized text.
- Each event type is gated by both the global replication eventing property and a per-event feature toggle (one each for the completed, failed, and incomplete events). If either is disabled, the event isn't sent.