Skip to main content

Work with entity versions

Abstract

How to create and publish an entity version or view information about a particular version.

By default, versioning is enabled for catalogs, categories, and sellable items. If you want to enable versioning for other types of Commerce entities, you can configure the functionality by changing the configuration policy.

Note

Relationships are not versioned. All entity versions have the same defined relationships. This means if you make a change to the relationships associated with one entity version, the change is automatically applied to all versions. Changes to relationships are automatically reflected on the live site if any of the versions are already published. The only exceptions are BundleToSellableItem and BundleToSellableItemVariant, which are versioned and can be different with each version.

If you want to make changes to a Commerce item, you must create a new version of the item.

To create a new entity version:

  1. On the Details page of the Commerce entity, in the Entity Versions section, click (to highlight) the existing version upon which to base the new version. The new entity version will be an editable copy of the one you highlight.

    Note

    When you first load the page, the last version is highlighted by default, regardless of its publishing status.

  2. In the Summary section, in the drop-down menu, click Add Entity Version.

    A new version is added, modeled on the version you selected in step 1.

  3. In the confirmation dialog box, to confirm your choice, click OK.

  4. To edit the new version, in the Entity Versions section, in the Version field, click the corresponding number.

    Note

    The browser URL also changes to reflect the active entity version.

  5. In the Details section, click the Edit icon, and in the Edit Details dialog box, make the required changes.

  6. Click the check mark to save your changes.

When you are ready to publish your changes to the Commerce item, you place the entity version in the publishing workflow.

By default, a new entity version is always in a Draft state until it is promoted to the next state in the workflow. If an entity has already been published, you cannot change or re-publish it.

To publish an entity version:

  1. On the Details page of the Commerce item, in the Summary section, in the drop-down menu, click Promote to next workflow state option.

  2. In the Promote to next workflow state window, the current workflow state is shown as Draft. In the Command field, click Submit and then click the checkmark to confirm.

  3. To move the Commerce item to the next state, in the Summary section, in the drop-down menu, click Promote to next workflow state.

  4. In the Promote to next workflow state window, the current workflow state is shown as Awaiting Approval. In the Command field:

    • To accept changes to the item, click Approve - Sitecore publishes the new version of the Commerce item and sets the value of the Published field to true.

    • To reject the changes to the item, click Reject - Sitecore returns the entity version to the Awaiting Approval state ( and the value of the Published field remains false).

Note

As long as you have not published the entity version, you can continue to edit that version of the Commerce item, including when the entity is in the Awaiting Approval state.

You can view different versions of an entity if you want to review the change history on an item.

To view the information associated with a particular entity version:

  • On the Details page of the Commerce item, in the Summary section, click the relevant version number.

When you display the details for an older entity version, the system displays a message at the top of the page that a newer version exists (if the latest version has not been published), or that a newer version has been published.

When there are multiple versions of an entity with a published status, the newest is the version published on the storefront.