Understand publishing

Commerce saves publishable changes to named worksets. When you want to publish changes, you publish the workset that contains them. You can publish the changes in all worksets at once, or you can pick a specific workset to publish.

This section provides details about how Commerce handles publishible changes. See Understand worksets to learn about how Commerce uses worksets to organize those changes.

Keep the following points in mind as you prepare to publish changes:

  • Commerce does not use versioning for items you edit and publish. There is only one version of each item in your system.

    For example, a merchandiser changes the long description and list price of a product and then saves his changes but does not publish the workset they are saved in. Later that day, his manager changes the product’s list price again, saves her changes to the same workset and then publishes the workset. The most recent changes to the product—the merchandiser’s long description and the manager’s list price—are published.

    Similarly, a single item can be saved to multiple worksets. In this case, the most recent changes to the item, no matter which workset they are in, get published first. Looking at the previous example, suppose the merchandiser saved a product’s new long description and price list in #julyWorkset and then his manager changed the product’s price list again and saved the change in #default. No matter which of these worksets is published first, the result is the same: the merchandiser’s long description and the manager’s list price are published. Then Commerce removes the product from the workset that has not yet published.

  • You cannot roll back or undo published changes.
  • Some changes do not need to be published, and take effect on your production server as soon as you save them. See Changes that do not require publishing for more information.
  • Some changes must be published together to maintain the integrity of their relationships. See Understand dependencies for more information.
  • While changes are being published, you cannot work with any publishable items in the administration interface. Commerce displays a Publish in Progress message dialog to inform you of this state.

    Although you cannot use the administration interface, programs that implement the Commerce REST APIs might still attempt to update endpoints while changes are being published. During a publish operation, Commerce responds to all PUT or POST calls to endpoints that update publishable resources with HTTP status code 503, Service Unavailable.

Changes that do not require publishing

Not all changes you make are added to worksets for publishing. Some changes made in the administration interface take effect on your production storefront as soon as you save them. Some changes are automatically published during the next publish.

The following types of changes take effect as soon as you save them and are not added to worksets for publishing. Commerce lets you know you are making these types of changes by displaying a message in the changes tracker. See Understand worksets for more information.

  • Shopper settings, such as changes to the password policy.
  • Access control settings, such as changes to internal user profiles.
  • Inventory updates.
  • Account settings, for stores that support account-based commerce.
  • If direct price editing is enabled for your Commerce store, any price changes you make are available on the storefront without publishing. See Update prices without publishing for more information.
  • If direct catalog editing is enabled for your Commerce store, any catalog changes you make are available on the storefront without publishing. See Edit catalog items without publishing for more information.

The following types of changes are automatically published with the next workset or full publish that happens after they are saved. Commerce lets you know you are making these types of changes by displaying a message in the changes tracker. See Understand worksets for more information.

  • Search settings, like index fields. Search settings to not appear in any workset changes list.
  • Certain changes you make to the catalog, such as creating a new product type or changing a price list group, appear as a single item called Catalog Configuration. The Catalog Configuration item appears at the top of the changes list in every workset until it is published.

Understand dependencies

Some Commerce items must be published together to maintain the integrity of their relationships. For example, if you update the description of a shipping method, Commerce must also publish the method's associated shipping regions, even if you did not make any changes to them. When you save changes to the shipping method, Commerce calculates the appropriate dependencies (the associated shipping regions) and also adds them to the same workset as the shipping method you saved.

Additionally, Commerce performs a final check before publishing a workset and displays dependencies that are not already in the changes list on the workset's Review and Schedule page. This list is populated by changes to dependencies that are saved in two different worksets. Consider the shipping method example described above. Both the shipping method and its associated shipping regions added to the same workset. But before that workset is published, suppose another user saves changes to one of the associated shipping regions in a different workset. The shipping method whose changes are saved in the first workset is not automatically added to the changes list in the second workset. But when the second workset is published, Commerce displays the shipping method as a dependency on that workset's Review and Schedule page.