Newer Version Available
OrderSettings
For more information, see “Set Up Orders” in Salesforce Help.
In the package manifest, all organization settings metadata types are accessed using the “Settings” name. See Settings for more details.
File Suffix and Directory Location
There is one OrderSettings component in a file named Order.settings in the settings folder. The .settings files are different from other named components because there is only one settings file for each settings component.
Version
OrderSettings components are available in API version 30.0 and later.
Fields
| Field Name | Field Type | Description |
|---|---|---|
| enableEnhancedCommerceOrders | boolean | Indicates whether enhanced commerce orders are enabled for the org (true) or not (false). This preference is available only in orgs with the Salesforce Order Management license. Default value is false. Available in API versions 48.0 and later. |
| enableNegativeQuantity | boolean | Indicates whether users in the org can add order products with
quantities of less than zero (true) or not (false). To enable this preference, enableOrders must be set to true. |
| enableOrders | boolean | Indicates whether orders are enabled for the org (true) or not (false). |
| enableReductionOrders | boolean | Indicates whether reduction orders are enabled for the org
(true) or not (false). For more information, see
“Reduction Orders” in Salesforce Help. To enable this preference, enableOrders must be set to true. |
| enableZeroQuantity | boolean | Indicates whether users in the org can add order products with
quantities of zero (true) or
not (false). Default value is
false. To enable this preference, enableOrders must be set to true. Available in API version 42.0 and later. |
Declarative Metadata Sample Definition
This is a sample OrderSettings component.
1<?xml version="1.0" encoding="UTF-8"?>
2<OrderSettings xmlns="http://soap.sforce.com/2006/04/metadata">
3 <enableEnhancedCommerceOrders>true</enableEnhancedCommerceOrders/>
4
5 <enableReductionOrders>false</enableReductionOrders>
6 <enableNegativeQuantity>true</enableNegativeQuantity>
7</OrderSettings>The following is an example package.xml that references the previous definition.
1<?xml version="1.0" encoding="UTF-8"?>
2<Package xmlns="http://soap.sforce.com/2006/04/metadata">
3 <types>
4 <members>Order</members>
5 <name>Settings</name>
6 </types>
7 <version>30.0</version>
8</Package>Wildcard Support in the Manifest File
The wildcard character * (asterisk) in the package.xml manifest file doesn’t apply to metadata types for feature settings. The wildcard applies only when retrieving all settings, not for an individual setting. For details, see Settings. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.