---
title: "Policy keys"
slug: "policy-keys"
abstract: "Describes policy keys and their usage."
---
# Policy keys

The Commerce Engine implements a `PolicyKeys` property that has flags as values. You use policy keys to set flags that specify which pipeline blocks are skipped during the execution of a request to the Commerce Engine.

Within a pipeline block, the mention of the `PolicyTriggerConditionalPipelineBlock` block (or the `AsyncPolicyTriggerConditionalPipelineBlock` block) identifies that pipeline block as conditional. You can override the execution of a conditional pipeline block by including a policy key defined as a string by the `"ShouldNotRunPolicyTrigger"` property value.

You can use policy keys explicitly, [passing their values in headers](https://doc.sitecore.com/xp/en/developers/101/sitecore-experience-commerce/policy-keys.html#UUID-e84901f8-7c65-108e-1c26-2dd0777b16f2_section-idm231820679363192 "Passing policy keys in headers"). In the following code sample, the `IndexUpdatedSitecoreItemBlock` class implements the `IgnoreIndexUpdatedSitecoreItem` policy key. During the execution of a `ImportCatalogs` request, if the `IgnoreIndexUpdatedSitecoreItem` string is passed in the header, the `IndexUpdatedSitecoreItemBlock` block is skipped when the pipeline runs.

```csharp
public class IndexUpdatedSitecoreItemBlock : PolicyTriggerConditionalPipelineBlock<PersistEntityArgument, PersistEntityArgument>
{
    public override string ShouldNotRunPolicyTrigger => "IgnoreIndexUpdatedSitecoreItem";

```

The Commerce Engine also makes an implicit usage of policy keys, where policy keys hard-coded within the engine allow pipeline blocks to be skipped. For example, during the execution of a **GetCart** request, the Commerce Engine adds the `"IgnorePromotions"` policy key to skip pipeline blocks that are unnecessary to the operation, for maximized performance.

<details>
<summary><h2>Passing policy keys in headers</h2></summary>

You can include the `PolicyKeys` property in some [API request headers](https://doc.sitecore.com/xp/en/developers/101/sitecore-experience-commerce/service-api-headers.html "Service API headers") (as shown in this [example using a Postman sample](https://doc.sitecore.com/xp/en/developers/101/sitecore-experience-commerce/walkthrough--importing-catalog-data.html#UUID-e5fad2a5-b3aa-ccb6-0d6c-c6e0d8b4963a_section-idm45729030304896 "Import a Commerce catalog (for deployments not using containers)")). You can also pass policy key headers in code, as part of the Commerce context (as shown [in this example](https://doc.sitecore.com/xp/en/developers/101/sitecore-experience-commerce/optimizing-custom-catalog-import-operations.html#UUID-7d58fdad-284a-b084-7123-d4482771db82_section-idm46212280987840 "How to pass policy keys programmatically")).

</details>

<details>
<summary><h2>Header policy keys</h2></summary>

The following table lists header policy keys defined in the Commerce Engine.

| Policy key | Usage |
| --- | --- |
| IgnoreCaching | Sets a flag to bypass catalog item caching for most catalog operations and APIs. |
| IgnoreAvailability | Sets a flag so that sellable item availability is not returned when the ` IGetSellableItemPipeline` pipeline is called. |
| IgnorePricing | Sets a flag so that sellable item pricing is not returned when the `IGetSellableItemPipeline` pipeline is called. |
| IgnoreIndexUpdatedSitecoreItem | Sets a flag to skip the `IndexUpdatedSitecoreItemBlock` block executed during the incremental update process of catalog entities in Sitecore search indexes.<br><br>Passed in:<br><br><ul><li>`ImportCatalogs` requests (with or without publishing).</li><li>`ImportLocalCatalogs` requests.</li></ul> |
| IgnoreAddEntityToIndexList | Sets a flag to skip the `AddEntityToIndexListBlock` block executed during the incremental update process of catalog entities in Sitecore search indexes.<br><br>Passed in:<br><br><ul><li>`ImportCatalogs` requests (with or without publishing).</li><li>`ImportLocalCatalogs` requests.</li></ul> |
| IgnoreLocalizeEntity | Sets a flag to skip the `LocalizeEntityBlock` block executed during the incremental update process of catalog entities in Sitecore search indexes.<br><br>Passed in:<br><br><ul><li>`ImportCatalogs `requests (with or without publishing).</li><li>`ImportLocalCatalogs `requests.</li></ul> |
| IgnoreIndexDeletedSitecoreItem | Sets a flag to ignore the `IndexUpdatedSitecoreItemBlock` block executed during the incremental update process of catalog entities in Sitecore search indexes.<br><br>Passed in:<br><br><ul><li>`ImportCatalogs` requests (with or without publishing).</li><li>`ImportLocalCatalogs` requests.</li></ul> |
| DoNotCalculateCart | Indicates that the cart should not be recalculated.<br><br>Passed in:<br><br><ul><li>`GetCartCommand` requests.</li></ul> |
| IgnorePromotions | Sets a flag so that promotions associated with the sellable item are not returned until items are added to the cart. To improve performance, set this flag to true.<br><br>Passed in:<br><br><ul><li>`GetSellableItemSummary`</li><li>`GetSellableItem`</li><li>`GetBulkPrice`</li></ul> |
| IgnoreSampleData | During the environment initialization, prevents loading the sample data for the given environment.<br><br>Passed in:<br><br><ul><li>`InitializeEnvironment()` when the parameter `"sampleData=True"`.</li></ul> |
| IgnoreVersioningEntity | Sets a flag to ignore entity versioning. Mostly used internally by the bulk catalog items import process. |
| ZeroMinionDelay | Sets a flag to run the order processing minion immediately to commit the order instead of waiting to run at a predefined interval.<br><br>Passed in:<br><br><ul><li>`CreateOrder` requests</li></ul> |
| MinionFault | Sets a flag to listen for errors when testing or troubleshooting running minions.<br><br>Passed in:<br><br><ul><li>`Run PendingOrder Minion` request in Postman.</li></ul> |

</details>