1. Commerce Core

Core policies

Version:

The Core plugin contributes configuration policies that define behavior for the functionality provided by the plugin.

Note

Do not extend or inherit from out-of-the-box policies; instead, create your own.

You can change the values of default policies by modifying the PolicySet JSON or the Environment JSON, depending on where the policy is defined, and then re-running Bootstrap.

The following policies can be configured through the Core plugin.

PolicyDescriptionProperties / Default Values
ControllerMethodRolesPolicyDefines which user roles have access to the different service routes.ControllerMethodRegularExpression<br>
AuthorizedRoles \ List<string>
KnownMessageCodePolicyDefines the code for messages added to entities.Pricing `"Pricing"<br><br>Promotions\"Promotions"`
ListNamePolicyDefines the naming convention for entity lists.Prefix \ "List"

Suffix \ "ByDate"

Separator \ "-"
MaxLengthPolicyDefines the maximum length allowed for text properties.MaxLengthAllow \ 0
MinMaxValuePolicyDefines the minimum and maximum value for decimal properties.MaxAllow \ 0

MinAllow \ 0
PaginationPolicyDefines settings for pagination.PageSize \ 10

PageSizeOptions \ List<int> { 5, 10, 25, 100 }
ApprovalStatusPolicyDefines the status names that are part of the approval processes.Draft \ "Draft"

Approved ` "Approved"<br><br>ReadyForApproval \"ReadyForApproval"`
EntityCachingPolicy
Note

The

EntityMemoryCachingPolicy is deprecated as of Sitecore XC release 9.2.
Defines the cache policy for entities.EntityFullName = string.Empty

AllowCaching \ false

Priority ` string.Empty<br><br>Expiration \ 300000<br><br>AbsoluteExpirationRelativeToNow\null<br><br>SlidingExpiration\null<br><br>HasNegativeCaching \ false<br><br>CacheName = string.Empty<br><br>EntityIdPrefix=true`
KnownResultCodesDefines the result codes for command requests and messages.Error \ "Error"

Warning \ "Warning"

Information \ "Information"

ValidationError \ "ValidationError"
LocalizeEntityComponentPolicyDefines which entity component properties can be localized.Path <br>
Properties <br>
ActionView <br>
IsItemComponent \ false
LocalizeEntityPolicyDefines which entity properties can be localized.Type <br>
Properties <br>
ActionView <br>
ComponentsPolicies \ Enumerable.Empty<LocalizeEntityComponentPolicy>
EnvironmentInitializationPolicyDefines which artifact should be initialize for an environment.InitialArtifactSets \ List<string>
GlobalCurrencyPolicyDefines global currency settings.DefaultCurrencySet ` string.Empty`
LocalizedTermsCachePolicyDefines the cache policy for localized terms.Expiration \ 300000

AllowCaching \ true

CacheName ` "LocalizedTerms"`
MinionBossPolicyDefines settings for a minion boss.FullyQualifiedName <br>
WakeupInterval <br>
ItemsPerBatch \ 10

SleepBetweenBatches \ 500

Children \ List()
MinionPolicyDefines settings for a minion.ListsToWatch <br>
FullyQualifiedName <br>
WakeupInterval <br>
ItemsPerBatch \ 10

SleepBetweenBatches \ 500
NodeHeartBeatPolicyDefines the behavior of the context node.LogHeartBeats \ false
PerformancePolicyDefines performance settings.WriteCounters \ true

CountersVersion \ string.Empty
PluginPolicyDefines settings for a plugin.Plugin \ string.Empty

Icon \ string.Empty
KnownServiceRoutesPolicyDefines the service routes.CommerceOps \ "commerceops"

Shops \ "api"

Authoring \ "api"
TransactionsPolicyDefines settings for transactions.TransactionalityEnabled \ true

TransactionTimeOut \ 60 (this represents seconds)

AsyncFlowOption \ TransactionScopeAsyncFlowOption.Enabled
ValidationPolicyDefines validation settings for entities.TypeFullName \ string.Empty
RedirectOnCreationPolicyDetermines whether a Business Tools user is redirected to the a new entity instance upon creation.Presence of this policy in the authoring environment configuration .json file implements the action to redirect the business user to the newly created entity instance.
IgnorePublishedPolicyDetermines whether a request for an entity in a given environment applies without regards to the entity's publishing workflow state, that is, whether or not the entity is published to the Content Delivery role.Presence of this policy in an environment configuration allows the environment to see all entities - unpublished or published. The IgnorePublishedPolicy policy is present in the default CommerceAuthoring and CommerceMinions environment .json files. The policy also affects entity caching and indexing processes.

When the Business Tools send a request to the Commerce Engine for an entity, the publishing status of the entity is ignored, and the request targets the latest version of the entity. Commerce engine minions process entities whether published or unpublished.

This policy is not used in the Shops environments. Requests to the Commerce Engine from storefronts always target published entities.
Note

Do not extend or inherit from out-of-the-box policies; instead, create your own.

You can change the values of default policies by modifying the PolicySet JSON or the Environment JSON, depending on where the policy is defined, and then re-running Bootstrap.

If you have suggestions for improving this article, let us know!