Create an Order or OrderItem Field Set
To update any fields other than the fields in the preceding list, you can create a field set on Orders for Order field updates and OrderProducts for OrderItem field updates. The fieldset name and label should match CartAllowedFieldSet for both Orders and OrderProducts.
To create a new field set:
-
Navigate to Setup then select either Orders or OrderProducts, then select Field Sets.
-
Add a new fieldset with name and label. For this example, we will use:
CartAllowedFieldSet
-
Any customer created custom fields are allowed by SF Field Data security, when it is part of CartAllowedFieldSet Field Set. In this example, we are adding
Order Start Date
. -
Verify the new custom field is present:
-
Use the Create Cart API to create a new basket and save the CartContextKey.
-
Call the Create Cart API again using the CartContextKey and the new fieldset as shown using REST Explorer below:
-