Loading
Get Started with B2C Commerce
Índice
Selecionar filtros

          Sem resultados
          Sem resultados
          Aqui estão algumas dicas de pesquisa

          Verifique a grafia das palavras-chave.
          Tente utilizar termos mais genéricos.
          Selecione menos filtros para ampliar sua pesquisa.

          Pesquisar em toda a Ajuda do Salesforce
          Set Up Eventing in B2C Commerce (Pilot)

          Set Up Eventing in B2C Commerce (Pilot)

          Use eventing in B2C Commerce to receive notifications when certain data or processing events occur in your Commerce Cloud environment. You enable event types and configure connectors in Business Manager; B2C Commerce routes events directly to your configured connectors.

          Required Editions

          Available in: B2C Commerce
          Note
          Note The B2C Commerce eventing framework is a pilot or beta service that is subject to the Beta Services Terms at Salesforce.com or a written Unified Pilot Agreement if executed by Customer, and applicable terms in the Product Terms Directory. Use of this pilot or beta service is at the Customer's sole discretion.

          Eventing provides notifications when specific changes occur in B2C Commerce so you can trigger business processes in external systems, for example, invalidating cache outside the platform, syncing data to external search or order systems, or running downstream order or marketing workflows. It helps keep storefronts accurate, reduces manual tracking of when platform operations complete, and decouples your business logic from platform operations. This is especially useful for hybrid or headless storefront implementations. Eventing is intended for customer developers and merchandisers who react to platform events.

          Eventing supports two main use cases: notifying your own systems (or external services) when data or processing events occur in B2C Commerce, and notifying other Commerce Cloud services. B2C Commerce delivers events only to destinations that you configure. For the pilot, there's no separate event bus; B2C Commerce routes events directly to your configured connectors (such as webhooks) from within the platform.

          You enable the event types that you care about for your tenant, then configure one or more connectors, for example, a webhook URL, in Business Manager. When an enabled event occurs, B2C Commerce sends it asynchronously to each configured connector. Only enabled event types are sent, and only to the connectors you set up. If you don't configure any connector for an event type, no notifications are sent for that type.

          Event types: the framework supports data events and processing events. For the current pilot scope, the supported event types cover replication processing and shopper registration. The two process-level replication event types listed below are available with B2C Commerce release 26.6. Three granular replication event types and one shopper registered event type are available with B2C Commerce release 26.7.

          Event ID Description When fired
          sf.cc.replication.completed Replication completed successfully When a replication process reaches COMPLETED state
          sf.cc.replication.failed Replication failed When a replication process reaches FAILED state

          HTTP headers: all replication events include standard Commerce Cloud platform headers.

          Header Description Example
          x-sf-cc-timestamp ISO-8601 timestamp when event was generated 2026-03-11T13:31:13.755934395Z
          x-sf-cc-instance-id Instance identifier (lowercase) zzzz_prd
          x-sf-cc-site-id Site identifier (empty for org-level operations) RefArch or ""
          x-sf-cc-correlation-id Correlation ID for tracking across systems 550e8400-e29b-41d4-a716-446655440000
          x-sf-cc-event-id Event type identifier sf.cc.replication.completed

          JSON payload structure: all replication events include these common fields.

          Field Type Required Description
          processIdstringYesUnique identifier for the replication process
          uuidstringYesUUID of the replication process
          typestringYesType of replication process (see process types)
          targetSystemstringYesTarget system name, typically Development or Production
          statestringYesCurrent state of the process (see process states)
          isDataReplicationbooleanYestrue for data replication, false for code replication
          successbooleanYestrue for completed events, false for failed events
          descriptionstringNoUser-provided description of the replication process
          codeVersionstringNoCode version identifier for code replications
          replicationGroupsarrayYesList of replication groups included (see replication groups)
          startDatestringYesISO-8601 timestamp when process started
          endDatestringYesISO-8601 timestamp when process ended

          Failure-specific field: failed events (sf.cc.replication.failed) include errorState, a machine-readable error state code.

          Process types: the type field indicates the replication operation.

          Data replication valueDescription
          ReplicationPublicationData transfer and immediate publishing
          ReplicationData transfer only (two-stage replication)
          PublicationPublishing previously transferred data
          UndoUndo a previous replication
          Code replication valueDescription
          CodeReplicationPublicationCode transfer and immediate publishing
          CodeReplicationCode transfer only
          CodePublicationPublishing previously transferred code
          CodeUndoUndo a previous code replication

          Process states: the state field indicates the process state.

          ValueDescription
          WAITINGProcess is created and ready to start
          INITIALIZINGProcess is preparing to run
          RUNNINGProcess is in progress
          FINALIZINGProcess is finalizing
          COMPLETEDProcess completed successfully
          FAILEDProcess failed
          Note
          Note CANCELED is deprecated and should not appear in new events.

          Replication groups: the replicationGroups array describes what was replicated.

          FieldTypeRequiredDescription
          idstringYesMachine-readable group identifier
          typestringYesGroup scope: ORGANIZATION, SITE, or REPOSITORY
          domainstringNoDomain name for repository-scoped groups

          Organization-level group IDs

          IDDescription
          ORGANIZATION_CATALOGAll catalogs
          ORGANIZATION_CATALOG_STATICStatic content for all catalogs
          ORGANIZATION_CSC_SETTINGSCustomer Service Center settings
          ORGANIZATION_CSRF_WHITELIST_PIPELINESCSRF allowlist pipeline/start nodes
          ORGANIZATION_CUSTOMERLISTAll customer lists
          ORGANIZATION_CUSTOM_OBJECTOrganization custom objects
          ORGANIZATION_TYPE_DEFINITIONCustom object types and system extensions
          ORGANIZATION_REFERENCE_DATAGeolocation data
          ORGANIZATION_LIBRARYAll shared libraries
          ORGANIZATION_OAUTH_PROVIDERSOAuth providers
          ORGANIZATION_OCAPI_SETTINGSGlobal OCAPI settings
          ORGANIZATION_PAGE_META_TAGSPage meta tag definitions
          ORGANIZATION_PREFERENCEOrganization preferences
          ORGANIZATION_PREFERENCE_CUSTOMCustom preferences only
          ORGANIZATION_PREFERENCE_SYSTEMSystem preferences only
          ORGANIZATION_PRICE_BOOKAll price books
          ORGANIZATION_SITEAll sites
          ORGANIZATION_STATIC_CONTENTGlobal static content
          ORGANIZATION_WEBDAV_CLIENT_PERMISSIONSWebDAV client permissions
          ORGANIZATION_SORTINGGlobal sorting rules
          ORGANIZATION_PAYMENTS_CONFIGPayments configuration
          ORGANIZATION_ASSIGNMENTAssignments and qualifiers

          Site-level group IDs

          IDDescription
          SITE_ABTESTA/B tests and experiences
          SITE_ABTEST_ONLYA/B tests only
          SITE_ACTIVEDATAFEEDActive data feed definitions
          SITE_CACHE_SETTINGSCache settings
          SITE_CONTENTContent library
          SITE_COUPONCoupons
          SITE_CUSTOMER_GROUPCustomer groups
          SITE_CUSTOM_OBJECTSite-specific custom objects
          SITE_DYNAMICDynamic content
          SITE_OCAPI_SETTINGSSite OCAPI settings
          SITE_PAYMENT_METHODPayment configuration
          SITE_PREFERENCESite preferences
          SITE_PREFERENCE_SYSTEMSite system preferences
          SITE_PREFERENCE_CUSTOMSite custom preferences
          SITE_PROMOTIONCampaigns and promotions
          SITE_SEARCH_INDEXSearch indexes
          SITE_SHIPPING_METHODShipping methods
          SITE_SLOTContent slots
          SITE_SORTINGSite-specific sorting
          SITE_SOURCECODESource codes
          SITE_STOREStores
          SITE_TAXTaxation settings
          SITE_URLStorefront URLs
          SITE_URL_CATEGORYCatalog URLs
          SITE_URL_FOLDERContent URLs
          SITE_URL_PIPELINEPipeline URLs
          SITE_URL_REDIRECTURL redirects

          Repository-level group IDs

          IDDescription
          CATALOGSpecific catalog (domain contains catalog name)
          CATALOG_STATICSpecific catalog static content
          SITESpecific site (domain contains site name)
          LIBRARYSpecific library (domain contains library name)
          PRICE_BOOKSpecific price book (domain contains price book name)

          Error states: failed events include machine-readable errorState values.

          ValueDescription
          ERROR_INITIALIZATIONReplication process could not be initialized
          ERROR_STAGING_PROCESS_CREATIONCould not create staging process
          ErrorInternalLiveInternal error in target system
          ErrorInternalEditInternal error in source system
          ErrorNonStagedParentSitesSelected content belongs to sites not yet replicated
          ErrorConnectLiveSystemCould not connect to target system
          ErrorCreatingLiveStagingProcessFailed to initialize process in target system
          ErrorExecutingEditingStagingPipelineInternal error in source system pipeline
          ErrorLiveStagingProcessKilledProcess aborted in target system
          ErrorEditingStagingProcessKilledProcess aborted in source system
          ErrorStagingProcessCancelledProcess was cancelled
          NoStagingProcessCreatedProcess could not be initialized
          ErrorStagingProcessModeNotSupportedProcess mode not supported
          ErrorTableLockedLocked database table
          ErrorInitializingStagingProcessorsCould not initialize processors
          ErrorCallingLivePipelineConnection to target system failed
          ErrorSynonymStateCritical invalid internal state on target
          ErrorAcquiringEditingLocksCould not acquire locks in source system
          ErrorAcquiringLiveLocksCould not acquire locks in target system
          ErrorPreparationPreparation failed in source system
          ErrorRefreshCacheCache refresh failed in target system
          ErrorReplicationData transfer to target system failed
          ErrorPublicationPublishing of transferred data failed

          Configure Event Types

          After you configure connectors, review and enable event types for your tenant. The following sample payloads show the event data your connector receives for completed, failed, and code replication events.

          Successful replication event

          
          {
          "eventType": "sf.cc.replication.completed",
          "timestamp": "2026-03-11T13:31:13.755934395Z",
          "tenantId": "zzzz_stg",
          "payload": {
          "processId": "12345",
          "uuid": "550e8400-e29b-41d4-a716-446655440000",
          "type": "ReplicationPublication",
          "targetSystem": "Production",
          "state": "COMPLETED",
          "isDataReplication": true,
          "success": true,
          "description": "Weekly catalog update",
          "replicationGroups": [
          {
          "id": "ORGANIZATION_CATALOG",
          "type": "ORGANIZATION"
          },
          {
          "id": "CATALOG",
          "type": "REPOSITORY",
          "domain": "storefront-catalog-m-en"
          }
          ],
          "startDate": "2026-03-11T13:31:03Z",
          "endDate": "2026-03-11T13:31:13.727Z"
          }
          }
          

          Failed replication event

          
          {
          "eventType": "sf.cc.replication.failed",
          "timestamp": "2026-03-11T14:22:18.442Z",
          "tenantId": "zzzz_prd",
          "payload": {
          "processId": "12346",
          "uuid": "660e8400-e29b-41d4-a716-446655440001",
          "type": "Replication",
          "targetSystem": "Production",
          "state": "FAILED",
          "isDataReplication": true,
          "success": false,
          "description": "Emergency content update",
          "errorState": "ErrorConnectLiveSystem",
          "replicationGroups": [
          {
          "id": "SITE_CONTENT",
          "type": "SITE"
          },
          {
          "id": "SITE",
          "type": "REPOSITORY",
          "domain": "RefArch"
          }
          ],
          "startDate": "2026-03-11T14:22:15Z",
          "endDate": "2026-03-11T14:22:18.442Z"
          }
          }
          

          Code replication event

          
          {
          "eventType": "sf.cc.replication.completed",
          "timestamp": "2026-03-11T15:05:32.118Z",
          "tenantId": "zzzz_prd",
          "payload": {
          "processId": "12347",
          "uuid": "770e8400-e29b-41d4-a716-446655440002",
          "type": "CodeReplicationPublication",
          "targetSystem": "Development",
          "state": "COMPLETED",
          "isDataReplication": false,
          "success": true,
          "codeVersion": "version1",
          "replicationGroups": [],
          "startDate": "2026-03-11T15:00:00Z",
          "endDate": "2026-03-11T15:05:32.118Z"
          }
          }
          

          Implementation notes

          • All timestamps use ISO-8601 format with timezone indicator.
          • Instance IDs are normalized to lowercase.
          • Site ID is empty for organization-level operations (replication processes are organization-level).
          • The description field is optional user-provided text.
          • An empty replicationGroups array indicates code-only replication.
          • Error states are machine-readable codes, not localized text.

          Granular replication events (Release 26.7): the system fires 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.

          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 same standard Commerce Cloud platform headers listed earlier, 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
          processIdintegerYesJob execution ID of the granular replication run
          typestringYesAlways the literal GRANULAR; distinguishes granular replication events from process-level replication events
          targetSystemstringYesTarget system name, typically Development or Production
          statestringYesFinal state of the job (see granular process states)
          successbooleanYestrue only for completed events; false for failed and incomplete events
          startDatestringYesISO-8601 timestamp of the job start; empty string when no job start time was recorded
          endDatestringYesISO-8601 timestamp when the event was emitted

          Event-specific fields

          EventAdditional fields
          sf.cc.replication.granular.completedobjects: per-trackable lists of object IDs that completed successfully
          sf.cc.replication.granular.failederrorState (always GRANULAR_REPLICATION_FAILURE) and failedObjects: per-trackable lists of objects that failed, each with an id and a status
          sf.cc.replication.granular.incompleteerrorState (always GRANULAR_REPLICATION_INCOMPLETE), successfulObjects, and failedObjects

          Granular process states: the state field indicates the final state of the granular replication job.

          ValueDescription
          COMPLETEDAll queued objects exported, imported, and invalidated cleanly
          FAILEDThe job ended in error and produced no successful objects
          INCOMPLETEThe 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.

          FieldTypeRequiredDescription
          productsarrayYesPer-product entries
          priceTablesarrayYesPer-price-table entries
          contentAssetsarrayYesPer-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.

          ValueDescription
          EXPORT_ERRORExport from the source system failed for this object
          IMPORT_ERRORImport into the target system failed for this object
          NOT_FINISHEDObject was queued or exported but never reached a finished state
          TARGET_ERRORTarget 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.

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

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

          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.

          Shopper registered event (Release 26.7): the system fires an event when a new customer profile is successfully created and committed. This event contains core customer information needed by external systems. Unlike replication events, which operate at the organization level, the shopper registered event is site-specific, so you can register and route it independently per site.

          Event ID Description When fired
          sf.cc.shopper.registered Shopper registered successfully When a customer profile is successfully created and the transaction is committed

          HTTP headers: the shopper registered event uses the standard Commerce Cloud platform headers listed earlier, with x-sf-cc-event-id set to sf.cc.shopper.registered.

          JSON payload structure

          Field Type Required Description
          customerIdstringYesUnique identifier (UUID) for the customer
          registrationDatestringYesISO-8601 timestamp when the customer was created
          loginIdstringYesCustomer's login identifier
          customerNostringYesCustomer number assigned by the system
          emailstringNoCustomer's email address (included if profile exists and email is not blank)
          firstNamestringNoCustomer's first name (included if profile exists and first name is not blank)
          lastNamestringNoCustomer's last name (included if profile exists and last name is not blank)
          phoneMobilestringNoCustomer's mobile phone number (included if profile exists and phone is not blank)
          sitesarray of stringsYesList of site IDs where the customer is registered. Site names are normalized by stripping the Sites- prefix and -Site suffix.

          Full shopper registered event

          
          {
          "customerId": "abc123-uuid-def456",
          "registrationDate": "2026-06-15T10:30:00Z",
          "loginId": "john.doe@example.com",
          "customerNo": "00000001",
          "email": "john.doe@example.com",
          "firstName": "John",
          "lastName": "Doe",
          "phoneMobile": "+1-555-0100",
          "sites": ["RefArch", "SiteGenesis"]
          }
          

          Minimal shopper registered event

          
          {
          "customerId": "minimal-uuid-123",
          "registrationDate": "2026-06-15T10:30:00Z",
          "loginId": "john.doe@example.com",
          "customerNo": "00000001",
          "sites": ["RefArch", "SiteGenesis"]
          }
          

          Shopper registered implementation notes

          • The event is fired asynchronously after successful customer creation and transaction commit.
          • Optional fields are only included if they have non-blank values.
          • Site IDs are normalized by removing the Sites- prefix and -Site suffix (for example, Sites-RefArch-Site becomes RefArch).
          • The event is site-specific, so you can register different connectors for different sites.
          • The event is controlled by a feature toggle that's enabled by default.
          • If event serialization or firing fails, the customer creation process still succeeds.

          Connectors: Connectors are the destinations to which B2C Commerce sends event notifications (for example, an HTTP webhook to a URL you provide). Delivery is asynchronous via an internal event-dispatch component in near real time. For the pilot, the platform guarantees best-effort delivery. Beyond the pilot, Salesforce plans to add mechanisms for retries and more robust error handling. Authentication and security controls govern access to events. Only enabled event types generate notifications, and events are sent only to connectors you’ve configured. The current design uses a push model: B2C Commerce initiates the HTTP request to your endpoint. Confirm your endpoint returns a successful response (for example, HTTP 200) when you've accepted and processed the event. For more information about the B2C Commerce Connector, see B2C Commerce Connector.

          To set up eventing, perform the following steps:

          1. In Business Manager, open the eventing or integrations area (path can vary by release).
            Add the required information for a connector (webhook) where you want B2C Commerce to deliver event notifications. Configure more than one connector so that the different events are sent to different systems:
            1. URL — URL — Enter the full endpoint URL (for example, ). Commerce Cloud requires access to the endpoint; configure firewall rules to allow Commerce Cloud to call your URL. Placeholder: example HTTP request that your webhook receives. Replace with actual sample when available. POST /events HTTP/1.1 Host: your-system.example.com Content-Type: application/json
            2. Authentication — If your endpoint requires authentication, configure the method (for example, API key, OAuth, or mutual Transport Layer Security (TLS)) and credentials or tokens as provided by the Business Manager UI. Store credentials securely. Do not share them.
            3. Headers — If your endpoint expects specific HTTP headers (for example, a custom API key header), configure them in the connector settings. The platform can automatically add standard headers (for example, Content-Type: application/json).

              Connector Event URL

          2. Review the list of available event types and their descriptions.

            Event Types and Descriptions

          3. For each event type you want to use, enable it for your tenant.
            Only enabled event types generate notifications; disabled types do not send events. Enable or disable event types at any time. Simply specify the desired existing connector (webhook) for your interested event type. Note: You can only choose from an existing webhook when enabling an event type, so make sure that Step 1 is complete before this.
            Save your changes.

          Use the B2C Commerce Log Center to monitor and diagnose delivery or endpoint issues. See Log Center.

           
          Carregando
          Salesforce Help | Article