Loading
Upcoming Mandatory Changes to Public Key Infrastructure (PKI)Read More
Salesforce Enforces New Security Requirements in Summer 2026Read More
Get Started with B2C Commerce
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Granular Replication Events

          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, 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
          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

          
          {
          "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

          
          {
          "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

          
          {
          "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.
           
          Loading
          Salesforce Help | Article