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 item, in the Summary section, in the drop-down menu, click Add Entity Version.

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

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

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

  4. Make any required changes to the Commerce item.

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.