> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kibocommerce.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create From Cart (After)

<Note>
  **Related API:** This extension modifies the [Create Order](/api-reference/order/create-order) operation.
</Note>

This action occurs after an order is created from the cart. Changes made to the order or order items in this action persist in Kibo.

<table><tbody><tr><th>Action Type</th><td>[Embedded](/pages/types-of-actions)</td></tr><tr><th>Full Action ID</th><td>embedded.commerce.orders.createFromCart.after</td></tr><tr><th>Runs multiple custom functions?</th><td>No</td></tr></tbody></table>

## JavaScript File Structure

Action files share the following basic structure:

```
module.exports = _function_(_context_, _callback_) {
   // Your custom code here
   callback();
};
```

When you code the custom function for an action, you have access to two arguments:

`callback`—This argument follows the established JavaScript callback pattern: it takes an error as the first argument (or null if there is no error) and a result as the second argument (if required).

`context`—This argument provides the function access to relevant objects and methods that interface with Kibo.

## Context: Order

The methods and objects documented here are available to this action through the use of the `context` argument.

**Microservice Operation**\
This action corresponds to the microservice that creates orders from the cart.

## Get

### get.order

Obtains a response that includes information about the current order.

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| N/A       | N/A  | N/A         |

Example:

```
context.get.order();
```

Response:

```
{
   "acceptedDate": "DateTime",
   "acceptsMarketing": "bool",
   "adjustment": {
      "amount": "decimal",
      "description": "string",
      "internalComment": "string"
   },
   "amountAvailableForRefund": "decimal",
   "amountRefunded": "decimal",
   "amountRemainingForPayment": "decimal",
   "attributes": [
      {
         "attributeDefinitionId": "int",
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "fullyQualifiedName": "string",
         "values": "object"
      }
   ],
   "auditInfo": {
      "createBy": "string",
      "createDate": "DateTime",
      "updateBy": "string",
      "updateDate": "DateTime"
   },
   "availableActions": "string",
   "billingInfo": {
      "auditInfo": {
         "createBy": "string",
         "createDate": "DateTime",
         "updateBy": "string",
         "updateDate": "DateTime"
      },
      "billingContact": {
         "address": {
            "address1": "string",
            "address2": "string",
            "address3": "string",
            "address4": "string",
            "addressType": "string",
            "cityOrTown": "string",
            "countryCode": "string",
            "isValidated": "bool",
            "postalOrZipCode": "string",
            "stateOrProvince": "string"
         },
         "companyOrOrganization": "string",
         "email": "string",
         "firstName": "string",
         "id": "int",
         "lastNameOrSurname": "string",
         "middleNameOrInitial": "string",
         "phoneNumbers": {
            "home": "string",
            "mobile": "string",
            "work": "string"
         }
      },
      "card": {
         "cardNumberPartOrMask": "string",
         "expireMonth": "short",
         "expireYear": "short",
         "isCardInfoSaved": "bool",
         "isUsedRecurring": "bool",
         "nameOnCard": "string",
         "paymentOrCardType": "string",
         "paymentServiceCardId": "string"
      },
      "isSameBillingShippingAddress": "bool",
      "paymentType": "string",
      "storeCreditCode": "string"
   },
   "cancelledDate": "DateTime",
   "changeMessages": [
      {
         "amount": "decimal",
         "appId": "string",
         "appKey": "string",
         "appName": "string",
         "correlationId": "string",
         "createDate": "DateTime",
         "id": "string",
         "identifier": "string",
         "message": "string",
         "metadata": "object",
         "newValue": "string",
         "oldValue": "string",
         "subject": "string",
         "subjectType": "string",
         "success": "bool",
         "userFirstName": "string",
         "userId": "string",
         "userLastName": "string",
         "userScopeType": "string",
         "verb": "string"
      }
   ],
   "channelCode": "string",
   "closedDate": "DateTime",
   "couponCodes": "string",
   "currencyCode": "string",
   "customerAccountId": "int",
   "customerInteractionType": "string",
   "customerTaxId": "string",
   "data": "string",
   "digitalPackages": [
      {
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "availableActions": "string",
         "changeMessages": [
            {
               "amount": "decimal",
               "appId": "string",
               "appKey": "string",
               "appName": "string",
               "correlationId": "string",
               "createDate": "DateTime",
               "id": "string",
               "identifier": "string",
               "message": "string",
               "metadata": "object",
               "newValue": "string",
               "oldValue": "string",
               "subject": "string",
               "subjectType": "string",
               "success": "bool",
               "userFirstName": "string",
               "userId": "string",
               "userLastName": "string",
               "userScopeType": "string",
               "verb": "string"
            }
         ],
         "code": "string",
         "fulfillmentDate": "DateTime",
         "fulfillmentLocationCode": "string",
         "id": "string",
         "items": [
            {
               "fulfillmentItemType": "string",
               "giftCardCode": "string",
               "lineId": "int",
               "productCode": "string",
               "quantity": "int"
            }
         ],
         "status": "string"
      }
   ],
   "discountedSubtotal": "decimal",
   "discountedTotal": "decimal",
   "discountTotal": "decimal",
   "dutyAmount": "decimal",
   "dutyTotal": "decimal",
   "email": "string",
   "expirationDate": "DateTime",
   "extendedProperties": [
      {
         "key": "string",
         "value": "string"
      }
   ],
   "externalId": "string",
   "feeTotal": "decimal",
   "fulfillmentInfo": {
      "auditInfo": {
         "createBy": "string",
         "createDate": "DateTime",
         "updateBy": "string",
         "updateDate": "DateTime"
      },
      "data": "string",
      "fulfillmentContact": {
         "address": {
            "address1": "string",
            "address2": "string",
            "address3": "string",
            "address4": "string",
            "addressType": "string",
            "cityOrTown": "string",
            "countryCode": "string",
            "isValidated": "bool",
            "postalOrZipCode": "string",
            "stateOrProvince": "string"
         },
         "companyOrOrganization": "string",
         "email": "string",
         "firstName": "string",
         "id": "int",
         "lastNameOrSurname": "string",
         "middleNameOrInitial": "string",
         "phoneNumbers": {
            "home": "string",
            "mobile": "string",
            "work": "string"
         }
      },
      "isDestinationCommercial": "bool",
      "shippingMethodCode": "string",
      "shippingMethodName": "string"
   },
   "fulfillmentStatus": "string",
   "handlingAmount": "decimal",
   "handlingDiscounts": [
      {
         "couponCode": "string",
         "discount": {
            "expirationDate": "DateTime",
            "id": "int",
            "itemIds": "string",
            "name": "string"
         },
         "excluded": "bool",
         "impact": "decimal"
      }
   ],
   "handlingSubTotal": "decimal",
   "handlingTaxTotal": "decimal",
   "handlingTotal": "decimal",
   "hasDraft": "bool",
   "id": "string",
   "importDate": "DateTime",
   "invalidCoupons": [
      {
         "couponCode": "string",
         "createDate": "DateTime",
         "discountId": "int",
         "reason": "string",
         "reasonCode": "int"
      }
   ],
   "ipAddress": "string",
   "isDraft": "bool",
   "isEligibleForReturns": "bool",
   "isImport": "bool",
   "isTaxExempt": "bool",
   "items": [
      {
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "data": "string",
         "discountedTotal": "decimal",
         "discountTotal": "decimal",
         "dutyAmount": "decimal",
         "extendedTotal": "decimal",
         "feeTotal": "decimal",
         "fulfillmentLocationCode": "string",
         "fulfillmentMethod": "string",
         "handlingAmount": "decimal",
         "id": "string",
         "isRecurring": "bool",
         "isTaxable": "bool",
         "itemTaxTotal": "decimal",
         "lineId": "int",
         "localeCode": "string",
         "originalCartItemId": "string",
         "product": {
            "allocationExpiration": "DateTime",
            "allocationId": "int",
            "bundledProducts": [
               {
                  "allocationExpiration": "DateTime",
                  "allocationId": "int",
                  "creditValue": "decimal",
                  "description": "string",
                  "fulfillmentStatus": "string",
                  "goodsType": "string",
                  "isPackagedStandAlone": "bool",
                  "measurements": {
                     "height": {
                        "unit": "string",
                        "value": "decimal"
                     },
                     "length": {
                        "unit": "string",
                        "value": "decimal"
                     },
                     "weight": {
                        "unit": "string",
                        "value": "decimal"
                     },
                     "width": {
                        "unit": "string",
                        "value": "decimal"
                     }
                  },
                  "name": "string",
                  "optionAttributeFQN": "string",
                  "optionValue": "object",
                  "productCode": "string",
                  "productReservationId": "int",
                  "quantity": "int"
               }
            ],
            "categories": [
               {
                  "id": "int",
                  "parent": "self"
               }
            ],
            "description": "string",
            "discountsRestricted": "bool",
            "discountsRestrictedEndDate": "DateTime",
            "discountsRestrictedStartDate": "DateTime",
            "fulfillmentStatus": "string",
            "fulfillmentTypesSupported": "string",
            "goodsType": "string",
            "imageAlternateText": "string",
            "imageUrl": "string",
            "isPackagedStandAlone": "bool",
            "isRecurring": "bool",
            "isTaxable": "bool",
            "measurements": {
               "height": {
                  "unit": "string",
                  "value": "decimal"
               },
               "length": {
                  "unit": "string",
                  "value": "decimal"
               },
               "weight": {
                  "unit": "string",
                  "value": "decimal"
               },
               "width": {
                  "unit": "string",
                  "value": "decimal"
               }
            },
            "mfgPartNumber": "string",
            "name": "string",
            "options": [
               {
                  "attributeFQN": "string",
                  "dataType": "string",
                  "name": "string",
                  "shopperEnteredValue": "object",
                  "stringValue": "string",
                  "value": "object"
               }
            ],
            "price": {
               "creditValue": "decimal",
               "msrp": "decimal",
               "price": "decimal",
               "salePrice": "decimal",
               "tenantOverridePrice": "decimal"
            },
            "productCode": "string",
            "productReservationId": "int",
            "productType": "string",
            "productUsage": "string",
            "properties": [
               {
                  "attributeFQN": "string",
                  "dataType": "string",
                  "isMultiValue": "bool",
                  "name": "string",
                  "values": [
                     {
                        "stringValue": "string",
                        "value": "object"
                     }
                  ]
               }
            ],
            "upc": "string",
            "variationProductCode": "string"
         },
         "productDiscount": {
            "appliesToSalePrice": "bool",
            "couponCode": "string",
            "discount": {
               "expirationDate": "DateTime",
               "id": "int",
               "itemIds": "string",
               "name": "string"
            },
            "discountQuantity": "int",
            "excluded": "bool",
            "impact": "decimal",
            "impactPerUnit": "decimal",
            "productQuantity": "int"
         },
         "productDiscounts": [
            {
               "appliesToSalePrice": "bool",
               "couponCode": "string",
               "discount": {
                  "expirationDate": "DateTime",
                  "id": "int",
                  "itemIds": "string",
                  "name": "string"
               },
               "discountQuantity": "int",
               "excluded": "bool",
               "impact": "decimal",
               "impactPerUnit": "decimal",
               "productQuantity": "int"
            }
         ],
         "quantity": "int",
         "shippingDiscounts": [
            {
               "discount": {
                  "couponCode": "string",
                  "discount": {
                     "expirationDate": "DateTime",
                     "id": "int",
                     "itemIds": "string",
                     "name": "string"
                  },
                  "excluded": "bool",
                  "impact": "decimal"
               },
               "discountQuantity": "int",
               "impactPerUnit": "decimal",
               "methodCode": "string"
            }
         ],
         "shippingTaxTotal": "decimal",
         "shippingTotal": "decimal",
         "subtotal": "decimal",
         "taxableTotal": "decimal",
         "total": "decimal",
         "unitPrice": {
            "extendedAmount": "decimal",
            "listAmount": "decimal",
            "overrideAmount": "decimal",
            "saleAmount": "decimal"
         }
      }
   ],
   "itemTaxTotal": "decimal",
   "lastValidationDate": "DateTime",
   "locationCode": "string",
   "notes": [
      {
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "id": "string",
         "text": "string"
      }
   ],
   "orderDiscounts": [
      {
         "couponCode": "string",
         "discount": {
            "expirationDate": "DateTime",
            "id": "int",
            "itemIds": "string",
            "name": "string"
         },
         "excluded": "bool",
         "impact": "decimal"
      }
   ],
   "orderNumber": "int",
   "originalCartId": "string",
   "packages": [
      {
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "availableActions": "string",
         "changeMessages": [
            {
               "amount": "decimal",
               "appId": "string",
               "appKey": "string",
               "appName": "string",
               "correlationId": "string",
               "createDate": "DateTime",
               "id": "string",
               "identifier": "string",
               "message": "string",
               "metadata": "object",
               "newValue": "string",
               "oldValue": "string",
               "subject": "string",
               "subjectType": "string",
               "success": "bool",
               "userFirstName": "string",
               "userId": "string",
               "userLastName": "string",
               "userScopeType": "string",
               "verb": "string"
            }
         ],
         "code": "string",
         "fulfillmentDate": "DateTime",
         "fulfillmentLocationCode": "string",
         "hasLabel": "bool",
         "id": "string",
         "items": [
            {
               "fulfillmentItemType": "string",
               "lineId": "int",
               "productCode": "string",
               "quantity": "int"
            }
         ],
         "measurements": {
            "height": {
               "unit": "string",
               "value": "decimal"
            },
            "length": {
               "unit": "string",
               "value": "decimal"
            },
            "weight": {
               "unit": "string",
               "value": "decimal"
            },
            "width": {
               "unit": "string",
               "value": "decimal"
            }
         },
         "packagingType": "string",
         "shipmentId": "string",
         "shippingMethodCode": "string",
         "shippingMethodName": "string",
         "status": "string",
         "trackingNumber": "string"
      }
   ],
   "parentOrderId": "string",
   "parentReturnId": "string",
   "payments": [
      {
         "amountCollected": "decimal",
         "amountCredited": "decimal",
         "amountRequested": "decimal",
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "availableActions": "string",
         "billingInfo": {
            "auditInfo": {
               "createBy": "string",
               "createDate": "DateTime",
               "updateBy": "string",
               "updateDate": "DateTime"
            },
            "billingContact": {
               "address": {
                  "address1": "string",
                  "address2": "string",
                  "address3": "string",
                  "address4": "string",
                  "addressType": "string",
                  "cityOrTown": "string",
                  "countryCode": "string",
                  "isValidated": "bool",
                  "postalOrZipCode": "string",
                  "stateOrProvince": "string"
               },
               "companyOrOrganization": "string",
               "email": "string",
               "firstName": "string",
               "id": "int",
               "lastNameOrSurname": "string",
               "middleNameOrInitial": "string",
               "phoneNumbers": {
                  "home": "string",
                  "mobile": "string",
                  "work": "string"
               }
            },
            "card": {
               "cardNumberPartOrMask": "string",
               "expireMonth": "short",
               "expireYear": "short",
               "isCardInfoSaved": "bool",
               "isUsedRecurring": "bool",
               "nameOnCard": "string",
               "paymentOrCardType": "string",
               "paymentServiceCardId": "string"
            },
            "isSameBillingShippingAddress": "bool",
            "paymentType": "string",
            "storeCreditCode": "string"
         },
         "changeMessages": [
            {
               "amount": "decimal",
               "appId": "string",
               "appKey": "string",
               "appName": "string",
               "correlationId": "string",
               "createDate": "DateTime",
               "id": "string",
               "identifier": "string",
               "message": "string",
               "metadata": "object",
               "newValue": "string",
               "oldValue": "string",
               "subject": "string",
               "subjectType": "string",
               "success": "bool",
               "userFirstName": "string",
               "userId": "string",
               "userLastName": "string",
               "userScopeType": "string",
               "verb": "string"
            }
         ],
         "id": "string",
         "interactions": [
            {
               "amount": "decimal",
               "auditInfo": {
                  "createBy": "string",
                  "createDate": "DateTime",
                  "updateBy": "string",
                  "updateDate": "DateTime"
               },
               "checkNumber": "string",
               "currencyCode": "string",
               "gatewayAuthCode": "string",
               "gatewayAVSCodes": "string",
               "gatewayCVV2Codes": "string",
               "gatewayInteractionId": "int",
               "gatewayResponseCode": "string",
               "gatewayResponseText": "string",
               "gatewayTransactionId": "string",
               "id": "string",
               "interactionDate": "DateTime",
               "interactionType": "string",
               "isManual": "bool",
               "isRecurring": "bool",
               "note": "string",
               "orderId": "string",
               "paymentEntryStatus": "string",
               "paymentId": "string",
               "paymentTransactionInteractionIdReference": "int",
               "status": "string"
            }
         ],
         "isRecurring": "bool",
         "orderId": "string",
         "paymentServiceTransactionId": "string",
         "paymentType": "string",
         "status": "string"
      }
   ],
   "paymentStatus": "string",
   "pickups": [
      {
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "availableActions": "string",
         "changeMessages": [
            {
               "amount": "decimal",
               "appId": "string",
               "appKey": "string",
               "appName": "string",
               "correlationId": "string",
               "createDate": "DateTime",
               "id": "string",
               "identifier": "string",
               "message": "string",
               "metadata": "object",
               "newValue": "string",
               "oldValue": "string",
               "subject": "string",
               "subjectType": "string",
               "success": "bool",
               "userFirstName": "string",
               "userId": "string",
               "userLastName": "string",
               "userScopeType": "string",
               "verb": "string"
            }
         ],
         "code": "string",
         "fulfillmentDate": "DateTime",
         "fulfillmentLocationCode": "string",
         "id": "string",
         "items": [
            {
               "fulfillmentItemType": "string",
               "lineId": "int",
               "productCode": "string",
               "quantity": "int"
            }
         ],
         "status": "string"
      }
   ],
   "refunds": [
      {
         "amount": "decimal",
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "id": "string",
         "orderId": "string",
         "payment": {
            "amountCollected": "decimal",
            "amountCredited": "decimal",
            "amountRequested": "decimal",
            "auditInfo": {
               "createBy": "string",
               "createDate": "DateTime",
               "updateBy": "string",
               "updateDate": "DateTime"
            },
            "availableActions": "string",
            "billingInfo": {
               "auditInfo": {
                  "createBy": "string",
                  "createDate": "DateTime",
                  "updateBy": "string",
                  "updateDate": "DateTime"
               },
               "billingContact": {
                  "address": {
                     "address1": "string",
                     "address2": "string",
                     "address3": "string",
                     "address4": "string",
                     "addressType": "string",
                     "cityOrTown": "string",
                     "countryCode": "string",
                     "isValidated": "bool",
                     "postalOrZipCode": "string",
                     "stateOrProvince": "string"
                  },
                  "companyOrOrganization": "string",
                  "email": "string",
                  "firstName": "string",
                  "id": "int",
                  "lastNameOrSurname": "string",
                  "middleNameOrInitial": "string",
                  "phoneNumbers": {
                     "home": "string",
                     "mobile": "string",
                     "work": "string"
                  }
               },
               "card": {
                  "cardNumberPartOrMask": "string",
                  "expireMonth": "short",
                  "expireYear": "short",
                  "isCardInfoSaved": "bool",
                  "isUsedRecurring": "bool",
                  "nameOnCard": "string",
                  "paymentOrCardType": "string",
                  "paymentServiceCardId": "string"
               },
               "isSameBillingShippingAddress": "bool",
               "paymentType": "string",
               "storeCreditCode": "string"
            },
            "changeMessages": [
               {
                  "amount": "decimal",
                  "appId": "string",
                  "appKey": "string",
                  "appName": "string",
                  "correlationId": "string",
                  "createDate": "DateTime",
                  "id": "string",
                  "identifier": "string",
                  "message": "string",
                  "metadata": "object",
                  "newValue": "string",
                  "oldValue": "string",
                  "subject": "string",
                  "subjectType": "string",
                  "success": "bool",
                  "userFirstName": "string",
                  "userId": "string",
                  "userLastName": "string",
                  "userScopeType": "string",
                  "verb": "string"
               }
            ],
            "id": "string",
            "interactions": [
               {
                  "amount": "decimal",
                  "auditInfo": {
                     "createBy": "string",
                     "createDate": "DateTime",
                     "updateBy": "string",
                     "updateDate": "DateTime"
                  },
                  "checkNumber": "string",
                  "currencyCode": "string",
                  "gatewayAuthCode": "string",
                  "gatewayAVSCodes": "string",
                  "gatewayCVV2Codes": "string",
                  "gatewayInteractionId": "int",
                  "gatewayResponseCode": "string",
                  "gatewayResponseText": "string",
                  "gatewayTransactionId": "string",
                  "id": "string",
                  "interactionDate": "DateTime",
                  "interactionType": "string",
                  "isManual": "bool",
                  "isRecurring": "bool",
                  "note": "string",
                  "orderId": "string",
                  "paymentEntryStatus": "string",
                  "paymentId": "string",
                  "paymentTransactionInteractionIdReference": "int",
                  "status": "string"
               }
            ],
            "isRecurring": "bool",
            "orderId": "string",
            "paymentServiceTransactionId": "string",
            "paymentType": "string",
            "status": "string"
         },
         "reason": "string"
      }
   ],
   "returnStatus": "string",
   "shipments": [
      {
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "cost": "decimal",
         "currencyCode": "string",
         "destinationAddress": {
            "address": {
               "address1": "string",
               "address2": "string",
               "address3": "string",
               "address4": "string",
               "addressType": "string",
               "cityOrTown": "string",
               "countryCode": "string",
               "isValidated": "bool",
               "postalOrZipCode": "string",
               "stateOrProvince": "string"
            },
            "companyOrOrganization": "string",
            "email": "string",
            "firstName": "string",
            "id": "int",
            "lastNameOrSurname": "string",
            "middleNameOrInitial": "string",
            "phoneNumbers": {
               "home": "string",
               "mobile": "string",
               "work": "string"
            }
         },
         "id": "string",
         "originAddress": {
            "address": {
               "address1": "string",
               "address2": "string",
               "address3": "string",
               "address4": "string",
               "addressType": "string",
               "cityOrTown": "string",
               "countryCode": "string",
               "isValidated": "bool",
               "postalOrZipCode": "string",
               "stateOrProvince": "string"
            },
            "companyOrOrganization": "string",
            "email": "string",
            "firstName": "string",
            "id": "int",
            "lastNameOrSurname": "string",
            "middleNameOrInitial": "string",
            "phoneNumbers": {
               "home": "string",
               "mobile": "string",
               "work": "string"
            }
         },
         "packageIds": "string",
         "shippingMethodCode": "string",
         "signatureRequired": "bool",
         "trackingNumber": "string"
      }
   ],
   "shippingAdjustment": {
      "amount": "decimal",
      "description": "string",
      "internalComment": "string"
   },
   "shippingDiscounts": [
      {
         "discount": {
            "couponCode": "string",
            "discount": {
               "expirationDate": "DateTime",
               "id": "int",
               "itemIds": "string",
               "name": "string"
            },
            "excluded": "bool",
            "impact": "decimal"
         },
         "methodCode": "string"
      }
   ],
   "shippingSubTotal": "decimal",
   "shippingTaxTotal": "decimal",
   "shippingTotal": "decimal",
   "shopperNotes": {
      "comments": "string",
      "giftMessage": "string"
   },
   "siteId": "int",
   "sourceDevice": "string",
   "status": "string",
   "submittedDate": "DateTime",
   "subtotal": "decimal",
   "taxTotal": "decimal",
   "tenantId": "int",
   "total": "decimal",
   "totalCollected": "decimal",
   "type": "string",
   "validationResults": [
      {
         "createdDate": "DateTime",
         "messages": [
            {
               "message": "string",
               "messageType": "string",
               "orderItemId": "string"
            }
         ],
         "status": "string",
         "validationId": "string",
         "validatorName": "string",
         "validatorType": "string"
      }
   ],
   "version": "string",
   "visitId": "string",
   "webSessionId": "string"
}
```

For information about the properties in the response, refer to the [REST API Help](/api-overviews/openapi_commerce_overview).

## Exec

### exec.setItemAllocation

Sets soft allocation information on an order item.

| Parameter    | Type      | Description                                                                                                                                                               |
| ------------ | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| allocationId | int       | Id of the allocation to set on the order item.                                                                                                                            |
| expiration   | date/time | Date/time of the allocation expiration.                                                                                                                                   |
| productCode  | string    | Code of the product or product variation that is allocated.                                                                                                               |
| itemId       | string    | Id of the item to set the allocation on if applied to a line item that is not the current line item. Current line item only applies when called for an order item action. |

Example:

```
context.exec.setItemAllocation(5, dateVariable, "LUC-SAMPLE-PROD", "123");
```

Response:

```
{
   "auditInfo": {
      "createBy": "string",
      "createDate": "DateTime",
      "updateBy": "string",
      "updateDate": "DateTime"
   },
   "data": "string",
   "discountedTotal": "decimal",
   "discountTotal": "decimal",
   "dutyAmount": "decimal",
   "extendedTotal": "decimal",
   "feeTotal": "decimal",
   "fulfillmentLocationCode": "string",
   "fulfillmentMethod": "string",
   "handlingAmount": "decimal",
   "id": "string",
   "isRecurring": "bool",
   "isTaxable": "bool",
   "itemTaxTotal": "decimal",
   "lineId": "int",
   "localeCode": "string",
   "originalCartItemId": "string",
   "product": {
      "allocationExpiration": "DateTime",
      "allocationId": "int",
      "bundledProducts": [
         {
            "allocationExpiration": "DateTime",
            "allocationId": "int",
            "creditValue": "decimal",
            "description": "string",
            "fulfillmentStatus": "string",
            "goodsType": "string",
            "isPackagedStandAlone": "bool",
            "measurements": {
               "height": {
                  "unit": "string",
                  "value": "decimal"
               },
               "length": {
                  "unit": "string",
                  "value": "decimal"
               },
               "weight": {
                  "unit": "string",
                  "value": "decimal"
               },
               "width": {
                  "unit": "string",
                  "value": "decimal"
               }
            },
            "name": "string",
            "optionAttributeFQN": "string",
            "optionValue": "object",
            "productCode": "string",
            "productReservationId": "int",
            "quantity": "int"
         }
      ],
      "categories": [
         {
            "id": "int",
            "parent": "self"
         }
      ],
      "description": "string",
      "discountsRestricted": "bool",
      "discountsRestrictedEndDate": "DateTime",
      "discountsRestrictedStartDate": "DateTime",
      "fulfillmentStatus": "string",
      "fulfillmentTypesSupported": "string",
      "goodsType": "string",
      "imageAlternateText": "string",
      "imageUrl": "string",
      "isPackagedStandAlone": "bool",
      "isRecurring": "bool",
      "isTaxable": "bool",
      "measurements": {
         "height": {
            "unit": "string",
            "value": "decimal"
         },
         "length": {
            "unit": "string",
            "value": "decimal"
         },
         "weight": {
            "unit": "string",
            "value": "decimal"
         },
         "width": {
            "unit": "string",
            "value": "decimal"
         }
      },
      "mfgPartNumber": "string",
      "name": "string",
      "options": [
         {
            "attributeFQN": "string",
            "dataType": "string",
            "name": "string",
            "shopperEnteredValue": "object",
            "stringValue": "string",
            "value": "object"
         }
      ],
      "price": {
         "creditValue": "decimal",
         "msrp": "decimal",
         "price": "decimal",
         "salePrice": "decimal",
         "tenantOverridePrice": "decimal"
      },
      "productCode": "string",
      "productReservationId": "int",
      "productType": "string",
      "productUsage": "string",
      "properties": [
         {
            "attributeFQN": "string",
            "dataType": "string",
            "isMultiValue": "bool",
            "name": "string",
            "values": [
               {
                  "stringValue": "string",
                  "value": "object"
               }
            ]
         }
      ],
      "upc": "string",
      "variationProductCode": "string"
   },
   "productDiscount": {
      "appliesToSalePrice": "bool",
      "couponCode": "string",
      "discount": {
         "expirationDate": "DateTime",
         "id": "int",
         "itemIds": "string",
         "name": "string"
      },
      "discountQuantity": "int",
      "excluded": "bool",
      "impact": "decimal",
      "impactPerUnit": "decimal",
      "productQuantity": "int"
   },
   "productDiscounts": [
      {
         "appliesToSalePrice": "bool",
         "couponCode": "string",
         "discount": {
            "expirationDate": "DateTime",
            "id": "int",
            "itemIds": "string",
            "name": "string"
         },
         "discountQuantity": "int",
         "excluded": "bool",
         "impact": "decimal",
         "impactPerUnit": "decimal",
         "productQuantity": "int"
      }
   ],
   "quantity": "int",
   "shippingDiscounts": [
      {
         "discount": {
            "couponCode": "string",
            "discount": {
               "expirationDate": "DateTime",
               "id": "int",
               "itemIds": "string",
               "name": "string"
            },
            "excluded": "bool",
            "impact": "decimal"
         },
         "discountQuantity": "int",
         "impactPerUnit": "decimal",
         "methodCode": "string"
      }
   ],
   "shippingTaxTotal": "decimal",
   "shippingTotal": "decimal",
   "subtotal": "decimal",
   "taxableTotal": "decimal",
   "total": "decimal",
   "unitPrice": {
      "extendedAmount": "decimal",
      "listAmount": "decimal",
      "overrideAmount": "decimal",
      "saleAmount": "decimal"
   }
}
```

For information about the properties in the response, refer to the [REST API Help](/api-overviews/openapi_commerce_overview).

### exec.setAttribute

Sets an attribute from the order.

| Parameter | Type   | Description                                                                                     |
| --------- | ------ | ----------------------------------------------------------------------------------------------- |
| fqn       | string | Fully-qualified name of the attribute to set on the order. Must apply to an existing attribute. |
| value     | object | Value or values to set on the order for the specified attribute.                                |

Example:

```
context.exec.setAttribute("attributeName", value);
```

Response:

```
{
   "acceptedDate": "DateTime",
   "acceptsMarketing": "bool",
   "adjustment": {
      "amount": "decimal",
      "description": "string",
      "internalComment": "string"
   },
   "amountAvailableForRefund": "decimal",
   "amountRefunded": "decimal",
   "amountRemainingForPayment": "decimal",
   "attributes": [
      {
         "attributeDefinitionId": "int",
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "fullyQualifiedName": "string",
         "values": "object"
      }
   ],
   "auditInfo": {
      "createBy": "string",
      "createDate": "DateTime",
      "updateBy": "string",
      "updateDate": "DateTime"
   },
   "availableActions": "string",
   "billingInfo": {
      "auditInfo": {
         "createBy": "string",
         "createDate": "DateTime",
         "updateBy": "string",
         "updateDate": "DateTime"
      },
      "billingContact": {
         "address": {
            "address1": "string",
            "address2": "string",
            "address3": "string",
            "address4": "string",
            "addressType": "string",
            "cityOrTown": "string",
            "countryCode": "string",
            "isValidated": "bool",
            "postalOrZipCode": "string",
            "stateOrProvince": "string"
         },
         "companyOrOrganization": "string",
         "email": "string",
         "firstName": "string",
         "id": "int",
         "lastNameOrSurname": "string",
         "middleNameOrInitial": "string",
         "phoneNumbers": {
            "home": "string",
            "mobile": "string",
            "work": "string"
         }
      },
      "card": {
         "cardNumberPartOrMask": "string",
         "expireMonth": "short",
         "expireYear": "short",
         "isCardInfoSaved": "bool",
         "isUsedRecurring": "bool",
         "nameOnCard": "string",
         "paymentOrCardType": "string",
         "paymentServiceCardId": "string"
      },
      "isSameBillingShippingAddress": "bool",
      "paymentType": "string",
      "storeCreditCode": "string"
   },
   "cancelledDate": "DateTime",
   "changeMessages": [
      {
         "amount": "decimal",
         "appId": "string",
         "appKey": "string",
         "appName": "string",
         "correlationId": "string",
         "createDate": "DateTime",
         "id": "string",
         "identifier": "string",
         "message": "string",
         "metadata": "object",
         "newValue": "string",
         "oldValue": "string",
         "subject": "string",
         "subjectType": "string",
         "success": "bool",
         "userFirstName": "string",
         "userId": "string",
         "userLastName": "string",
         "userScopeType": "string",
         "verb": "string"
      }
   ],
   "channelCode": "string",
   "closedDate": "DateTime",
   "couponCodes": "string",
   "currencyCode": "string",
   "customerAccountId": "int",
   "customerInteractionType": "string",
   "customerTaxId": "string",
   "data": "string",
   "digitalPackages": [
      {
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "availableActions": "string",
         "changeMessages": [
            {
               "amount": "decimal",
               "appId": "string",
               "appKey": "string",
               "appName": "string",
               "correlationId": "string",
               "createDate": "DateTime",
               "id": "string",
               "identifier": "string",
               "message": "string",
               "metadata": "object",
               "newValue": "string",
               "oldValue": "string",
               "subject": "string",
               "subjectType": "string",
               "success": "bool",
               "userFirstName": "string",
               "userId": "string",
               "userLastName": "string",
               "userScopeType": "string",
               "verb": "string"
            }
         ],
         "code": "string",
         "fulfillmentDate": "DateTime",
         "fulfillmentLocationCode": "string",
         "id": "string",
         "items": [
            {
               "fulfillmentItemType": "string",
               "giftCardCode": "string",
               "lineId": "int",
               "productCode": "string",
               "quantity": "int"
            }
         ],
         "status": "string"
      }
   ],
   "discountedSubtotal": "decimal",
   "discountedTotal": "decimal",
   "discountTotal": "decimal",
   "dutyAmount": "decimal",
   "dutyTotal": "decimal",
   "email": "string",
   "expirationDate": "DateTime",
   "extendedProperties": [
      {
         "key": "string",
         "value": "string"
      }
   ],
   "externalId": "string",
   "feeTotal": "decimal",
   "fulfillmentInfo": {
      "auditInfo": {
         "createBy": "string",
         "createDate": "DateTime",
         "updateBy": "string",
         "updateDate": "DateTime"
      },
      "data": "string",
      "fulfillmentContact": {
         "address": {
            "address1": "string",
            "address2": "string",
            "address3": "string",
            "address4": "string",
            "addressType": "string",
            "cityOrTown": "string",
            "countryCode": "string",
            "isValidated": "bool",
            "postalOrZipCode": "string",
            "stateOrProvince": "string"
         },
         "companyOrOrganization": "string",
         "email": "string",
         "firstName": "string",
         "id": "int",
         "lastNameOrSurname": "string",
         "middleNameOrInitial": "string",
         "phoneNumbers": {
            "home": "string",
            "mobile": "string",
            "work": "string"
         }
      },
      "isDestinationCommercial": "bool",
      "shippingMethodCode": "string",
      "shippingMethodName": "string"
   },
   "fulfillmentStatus": "string",
   "handlingAmount": "decimal",
   "handlingDiscounts": [
      {
         "couponCode": "string",
         "discount": {
            "expirationDate": "DateTime",
            "id": "int",
            "itemIds": "string",
            "name": "string"
         },
         "excluded": "bool",
         "impact": "decimal"
      }
   ],
   "handlingSubTotal": "decimal",
   "handlingTaxTotal": "decimal",
   "handlingTotal": "decimal",
   "hasDraft": "bool",
   "id": "string",
   "importDate": "DateTime",
   "invalidCoupons": [
      {
         "couponCode": "string",
         "createDate": "DateTime",
         "discountId": "int",
         "reason": "string",
         "reasonCode": "int"
      }
   ],
   "ipAddress": "string",
   "isDraft": "bool",
   "isEligibleForReturns": "bool",
   "isImport": "bool",
   "isTaxExempt": "bool",
   "items": [
      {
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "data": "string",
         "discountedTotal": "decimal",
         "discountTotal": "decimal",
         "dutyAmount": "decimal",
         "extendedTotal": "decimal",
         "feeTotal": "decimal",
         "fulfillmentLocationCode": "string",
         "fulfillmentMethod": "string",
         "handlingAmount": "decimal",
         "id": "string",
         "isRecurring": "bool",
         "isTaxable": "bool",
         "itemTaxTotal": "decimal",
         "lineId": "int",
         "localeCode": "string",
         "originalCartItemId": "string",
         "product": {
            "allocationExpiration": "DateTime",
            "allocationId": "int",
            "bundledProducts": [
               {
                  "allocationExpiration": "DateTime",
                  "allocationId": "int",
                  "creditValue": "decimal",
                  "description": "string",
                  "fulfillmentStatus": "string",
                  "goodsType": "string",
                  "isPackagedStandAlone": "bool",
                  "measurements": {
                     "height": {
                        "unit": "string",
                        "value": "decimal"
                     },
                     "length": {
                        "unit": "string",
                        "value": "decimal"
                     },
                     "weight": {
                        "unit": "string",
                        "value": "decimal"
                     },
                     "width": {
                        "unit": "string",
                        "value": "decimal"
                     }
                  },
                  "name": "string",
                  "optionAttributeFQN": "string",
                  "optionValue": "object",
                  "productCode": "string",
                  "productReservationId": "int",
                  "quantity": "int"
               }
            ],
            "categories": [
               {
                  "id": "int",
                  "parent": "self"
               }
            ],
            "description": "string",
            "discountsRestricted": "bool",
            "discountsRestrictedEndDate": "DateTime",
            "discountsRestrictedStartDate": "DateTime",
            "fulfillmentStatus": "string",
            "fulfillmentTypesSupported": "string",
            "goodsType": "string",
            "imageAlternateText": "string",
            "imageUrl": "string",
            "isPackagedStandAlone": "bool",
            "isRecurring": "bool",
            "isTaxable": "bool",
            "measurements": {
               "height": {
                  "unit": "string",
                  "value": "decimal"
               },
               "length": {
                  "unit": "string",
                  "value": "decimal"
               },
               "weight": {
                  "unit": "string",
                  "value": "decimal"
               },
               "width": {
                  "unit": "string",
                  "value": "decimal"
               }
            },
            "mfgPartNumber": "string",
            "name": "string",
            "options": [
               {
                  "attributeFQN": "string",
                  "dataType": "string",
                  "name": "string",
                  "shopperEnteredValue": "object",
                  "stringValue": "string",
                  "value": "object"
               }
            ],
            "price": {
               "creditValue": "decimal",
               "msrp": "decimal",
               "price": "decimal",
               "salePrice": "decimal",
               "tenantOverridePrice": "decimal"
            },
            "productCode": "string",
            "productReservationId": "int",
            "productType": "string",
            "productUsage": "string",
            "properties": [
               {
                  "attributeFQN": "string",
                  "dataType": "string",
                  "isMultiValue": "bool",
                  "name": "string",
                  "values": [
                     {
                        "stringValue": "string",
                        "value": "object"
                     }
                  ]
               }
            ],
            "upc": "string",
            "variationProductCode": "string"
         },
         "productDiscount": {
            "appliesToSalePrice": "bool",
            "couponCode": "string",
            "discount": {
               "expirationDate": "DateTime",
               "id": "int",
               "itemIds": "string",
               "name": "string"
            },
            "discountQuantity": "int",
            "excluded": "bool",
            "impact": "decimal",
            "impactPerUnit": "decimal",
            "productQuantity": "int"
         },
         "productDiscounts": [
            {
               "appliesToSalePrice": "bool",
               "couponCode": "string",
               "discount": {
                  "expirationDate": "DateTime",
                  "id": "int",
                  "itemIds": "string",
                  "name": "string"
               },
               "discountQuantity": "int",
               "excluded": "bool",
               "impact": "decimal",
               "impactPerUnit": "decimal",
               "productQuantity": "int"
            }
         ],
         "quantity": "int",
         "shippingDiscounts": [
            {
               "discount": {
                  "couponCode": "string",
                  "discount": {
                     "expirationDate": "DateTime",
                     "id": "int",
                     "itemIds": "string",
                     "name": "string"
                  },
                  "excluded": "bool",
                  "impact": "decimal"
               },
               "discountQuantity": "int",
               "impactPerUnit": "decimal",
               "methodCode": "string"
            }
         ],
         "shippingTaxTotal": "decimal",
         "shippingTotal": "decimal",
         "subtotal": "decimal",
         "taxableTotal": "decimal",
         "total": "decimal",
         "unitPrice": {
            "extendedAmount": "decimal",
            "listAmount": "decimal",
            "overrideAmount": "decimal",
            "saleAmount": "decimal"
         }
      }
   ],
   "itemTaxTotal": "decimal",
   "lastValidationDate": "DateTime",
   "locationCode": "string",
   "notes": [
      {
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "id": "string",
         "text": "string"
      }
   ],
   "orderDiscounts": [
      {
         "couponCode": "string",
         "discount": {
            "expirationDate": "DateTime",
            "id": "int",
            "itemIds": "string",
            "name": "string"
         },
         "excluded": "bool",
         "impact": "decimal"
      }
   ],
   "orderNumber": "int",
   "originalCartId": "string",
   "packages": [
      {
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "availableActions": "string",
         "changeMessages": [
            {
               "amount": "decimal",
               "appId": "string",
               "appKey": "string",
               "appName": "string",
               "correlationId": "string",
               "createDate": "DateTime",
               "id": "string",
               "identifier": "string",
               "message": "string",
               "metadata": "object",
               "newValue": "string",
               "oldValue": "string",
               "subject": "string",
               "subjectType": "string",
               "success": "bool",
               "userFirstName": "string",
               "userId": "string",
               "userLastName": "string",
               "userScopeType": "string",
               "verb": "string"
            }
         ],
         "code": "string",
         "fulfillmentDate": "DateTime",
         "fulfillmentLocationCode": "string",
         "hasLabel": "bool",
         "id": "string",
         "items": [
            {
               "fulfillmentItemType": "string",
               "lineId": "int",
               "productCode": "string",
               "quantity": "int"
            }
         ],
         "measurements": {
            "height": {
               "unit": "string",
               "value": "decimal"
            },
            "length": {
               "unit": "string",
               "value": "decimal"
            },
            "weight": {
               "unit": "string",
               "value": "decimal"
            },
            "width": {
               "unit": "string",
               "value": "decimal"
            }
         },
         "packagingType": "string",
         "shipmentId": "string",
         "shippingMethodCode": "string",
         "shippingMethodName": "string",
         "status": "string",
         "trackingNumber": "string"
      }
   ],
   "parentOrderId": "string",
   "parentReturnId": "string",
   "payments": [
      {
         "amountCollected": "decimal",
         "amountCredited": "decimal",
         "amountRequested": "decimal",
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "availableActions": "string",
         "billingInfo": {
            "auditInfo": {
               "createBy": "string",
               "createDate": "DateTime",
               "updateBy": "string",
               "updateDate": "DateTime"
            },
            "billingContact": {
               "address": {
                  "address1": "string",
                  "address2": "string",
                  "address3": "string",
                  "address4": "string",
                  "addressType": "string",
                  "cityOrTown": "string",
                  "countryCode": "string",
                  "isValidated": "bool",
                  "postalOrZipCode": "string",
                  "stateOrProvince": "string"
               },
               "companyOrOrganization": "string",
               "email": "string",
               "firstName": "string",
               "id": "int",
               "lastNameOrSurname": "string",
               "middleNameOrInitial": "string",
               "phoneNumbers": {
                  "home": "string",
                  "mobile": "string",
                  "work": "string"
               }
            },
            "card": {
               "cardNumberPartOrMask": "string",
               "expireMonth": "short",
               "expireYear": "short",
               "isCardInfoSaved": "bool",
               "isUsedRecurring": "bool",
               "nameOnCard": "string",
               "paymentOrCardType": "string",
               "paymentServiceCardId": "string"
            },
            "isSameBillingShippingAddress": "bool",
            "paymentType": "string",
            "storeCreditCode": "string"
         },
         "changeMessages": [
            {
               "amount": "decimal",
               "appId": "string",
               "appKey": "string",
               "appName": "string",
               "correlationId": "string",
               "createDate": "DateTime",
               "id": "string",
               "identifier": "string",
               "message": "string",
               "metadata": "object",
               "newValue": "string",
               "oldValue": "string",
               "subject": "string",
               "subjectType": "string",
               "success": "bool",
               "userFirstName": "string",
               "userId": "string",
               "userLastName": "string",
               "userScopeType": "string",
               "verb": "string"
            }
         ],
         "id": "string",
         "interactions": [
            {
               "amount": "decimal",
               "auditInfo": {
                  "createBy": "string",
                  "createDate": "DateTime",
                  "updateBy": "string",
                  "updateDate": "DateTime"
               },
               "checkNumber": "string",
               "currencyCode": "string",
               "gatewayAuthCode": "string",
               "gatewayAVSCodes": "string",
               "gatewayCVV2Codes": "string",
               "gatewayInteractionId": "int",
               "gatewayResponseCode": "string",
               "gatewayResponseText": "string",
               "gatewayTransactionId": "string",
               "id": "string",
               "interactionDate": "DateTime",
               "interactionType": "string",
               "isManual": "bool",
               "isRecurring": "bool",
               "note": "string",
               "orderId": "string",
               "paymentEntryStatus": "string",
               "paymentId": "string",
               "paymentTransactionInteractionIdReference": "int",
               "status": "string"
            }
         ],
         "isRecurring": "bool",
         "orderId": "string",
         "paymentServiceTransactionId": "string",
         "paymentType": "string",
         "status": "string"
      }
   ],
   "paymentStatus": "string",
   "pickups": [
      {
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "availableActions": "string",
         "changeMessages": [
            {
               "amount": "decimal",
               "appId": "string",
               "appKey": "string",
               "appName": "string",
               "correlationId": "string",
               "createDate": "DateTime",
               "id": "string",
               "identifier": "string",
               "message": "string",
               "metadata": "object",
               "newValue": "string",
               "oldValue": "string",
               "subject": "string",
               "subjectType": "string",
               "success": "bool",
               "userFirstName": "string",
               "userId": "string",
               "userLastName": "string",
               "userScopeType": "string",
               "verb": "string"
            }
         ],
         "code": "string",
         "fulfillmentDate": "DateTime",
         "fulfillmentLocationCode": "string",
         "id": "string",
         "items": [
            {
               "fulfillmentItemType": "string",
               "lineId": "int",
               "productCode": "string",
               "quantity": "int"
            }
         ],
         "status": "string"
      }
   ],
   "refunds": [
      {
         "amount": "decimal",
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "id": "string",
         "orderId": "string",
         "payment": {
            "amountCollected": "decimal",
            "amountCredited": "decimal",
            "amountRequested": "decimal",
            "auditInfo": {
               "createBy": "string",
               "createDate": "DateTime",
               "updateBy": "string",
               "updateDate": "DateTime"
            },
            "availableActions": "string",
            "billingInfo": {
               "auditInfo": {
                  "createBy": "string",
                  "createDate": "DateTime",
                  "updateBy": "string",
                  "updateDate": "DateTime"
               },
               "billingContact": {
                  "address": {
                     "address1": "string",
                     "address2": "string",
                     "address3": "string",
                     "address4": "string",
                     "addressType": "string",
                     "cityOrTown": "string",
                     "countryCode": "string",
                     "isValidated": "bool",
                     "postalOrZipCode": "string",
                     "stateOrProvince": "string"
                  },
                  "companyOrOrganization": "string",
                  "email": "string",
                  "firstName": "string",
                  "id": "int",
                  "lastNameOrSurname": "string",
                  "middleNameOrInitial": "string",
                  "phoneNumbers": {
                     "home": "string",
                     "mobile": "string",
                     "work": "string"
                  }
               },
               "card": {
                  "cardNumberPartOrMask": "string",
                  "expireMonth": "short",
                  "expireYear": "short",
                  "isCardInfoSaved": "bool",
                  "isUsedRecurring": "bool",
                  "nameOnCard": "string",
                  "paymentOrCardType": "string",
                  "paymentServiceCardId": "string"
               },
               "isSameBillingShippingAddress": "bool",
               "paymentType": "string",
               "storeCreditCode": "string"
            },
            "changeMessages": [
               {
                  "amount": "decimal",
                  "appId": "string",
                  "appKey": "string",
                  "appName": "string",
                  "correlationId": "string",
                  "createDate": "DateTime",
                  "id": "string",
                  "identifier": "string",
                  "message": "string",
                  "metadata": "object",
                  "newValue": "string",
                  "oldValue": "string",
                  "subject": "string",
                  "subjectType": "string",
                  "success": "bool",
                  "userFirstName": "string",
                  "userId": "string",
                  "userLastName": "string",
                  "userScopeType": "string",
                  "verb": "string"
               }
            ],
            "id": "string",
            "interactions": [
               {
                  "amount": "decimal",
                  "auditInfo": {
                     "createBy": "string",
                     "createDate": "DateTime",
                     "updateBy": "string",
                     "updateDate": "DateTime"
                  },
                  "checkNumber": "string",
                  "currencyCode": "string",
                  "gatewayAuthCode": "string",
                  "gatewayAVSCodes": "string",
                  "gatewayCVV2Codes": "string",
                  "gatewayInteractionId": "int",
                  "gatewayResponseCode": "string",
                  "gatewayResponseText": "string",
                  "gatewayTransactionId": "string",
                  "id": "string",
                  "interactionDate": "DateTime",
                  "interactionType": "string",
                  "isManual": "bool",
                  "isRecurring": "bool",
                  "note": "string",
                  "orderId": "string",
                  "paymentEntryStatus": "string",
                  "paymentId": "string",
                  "paymentTransactionInteractionIdReference": "int",
                  "status": "string"
               }
            ],
            "isRecurring": "bool",
            "orderId": "string",
            "paymentServiceTransactionId": "string",
            "paymentType": "string",
            "status": "string"
         },
         "reason": "string"
      }
   ],
   "returnStatus": "string",
   "shipments": [
      {
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "cost": "decimal",
         "currencyCode": "string",
         "destinationAddress": {
            "address": {
               "address1": "string",
               "address2": "string",
               "address3": "string",
               "address4": "string",
               "addressType": "string",
               "cityOrTown": "string",
               "countryCode": "string",
               "isValidated": "bool",
               "postalOrZipCode": "string",
               "stateOrProvince": "string"
            },
            "companyOrOrganization": "string",
            "email": "string",
            "firstName": "string",
            "id": "int",
            "lastNameOrSurname": "string",
            "middleNameOrInitial": "string",
            "phoneNumbers": {
               "home": "string",
               "mobile": "string",
               "work": "string"
            }
         },
         "id": "string",
         "originAddress": {
            "address": {
               "address1": "string",
               "address2": "string",
               "address3": "string",
               "address4": "string",
               "addressType": "string",
               "cityOrTown": "string",
               "countryCode": "string",
               "isValidated": "bool",
               "postalOrZipCode": "string",
               "stateOrProvince": "string"
            },
            "companyOrOrganization": "string",
            "email": "string",
            "firstName": "string",
            "id": "int",
            "lastNameOrSurname": "string",
            "middleNameOrInitial": "string",
            "phoneNumbers": {
               "home": "string",
               "mobile": "string",
               "work": "string"
            }
         },
         "packageIds": "string",
         "shippingMethodCode": "string",
         "signatureRequired": "bool",
         "trackingNumber": "string"
      }
   ],
   "shippingAdjustment": {
      "amount": "decimal",
      "description": "string",
      "internalComment": "string"
   },
   "shippingDiscounts": [
      {
         "discount": {
            "couponCode": "string",
            "discount": {
               "expirationDate": "DateTime",
               "id": "int",
               "itemIds": "string",
               "name": "string"
            },
            "excluded": "bool",
            "impact": "decimal"
         },
         "methodCode": "string"
      }
   ],
   "shippingSubTotal": "decimal",
   "shippingTaxTotal": "decimal",
   "shippingTotal": "decimal",
   "shopperNotes": {
      "comments": "string",
      "giftMessage": "string"
   },
   "siteId": "int",
   "sourceDevice": "string",
   "status": "string",
   "submittedDate": "DateTime",
   "subtotal": "decimal",
   "taxTotal": "decimal",
   "tenantId": "int",
   "total": "decimal",
   "totalCollected": "decimal",
   "type": "string",
   "validationResults": [
      {
         "createdDate": "DateTime",
         "messages": [
            {
               "message": "string",
               "messageType": "string",
               "orderItemId": "string"
            }
         ],
         "status": "string",
         "validationId": "string",
         "validatorName": "string",
         "validatorType": "string"
      }
   ],
   "version": "string",
   "visitId": "string",
   "webSessionId": "string"
}
```

For information about the properties in the response, refer to the [REST API Help](/api-overviews/openapi_commerce_overview).

### exec.removeAttribute

Removes an attribute from the order.

| Parameter | Type   | Description                                                                                     |
| --------- | ------ | ----------------------------------------------------------------------------------------------- |
| fqn       | string | Fully-qualified name of the attribute to set on the order. Must apply to an existing attribute. |

Example:

```
context.exec.removeAttribute("attributeName");
```

Response:

```
{
   "acceptedDate": "DateTime",
   "acceptsMarketing": "bool",
   "adjustment": {
      "amount": "decimal",
      "description": "string",
      "internalComment": "string"
   },
   "amountAvailableForRefund": "decimal",
   "amountRefunded": "decimal",
   "amountRemainingForPayment": "decimal",
   "attributes": [
      {
         "attributeDefinitionId": "int",
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "fullyQualifiedName": "string",
         "values": "object"
      }
   ],
   "auditInfo": {
      "createBy": "string",
      "createDate": "DateTime",
      "updateBy": "string",
      "updateDate": "DateTime"
   },
   "availableActions": "string",
   "billingInfo": {
      "auditInfo": {
         "createBy": "string",
         "createDate": "DateTime",
         "updateBy": "string",
         "updateDate": "DateTime"
      },
      "billingContact": {
         "address": {
            "address1": "string",
            "address2": "string",
            "address3": "string",
            "address4": "string",
            "addressType": "string",
            "cityOrTown": "string",
            "countryCode": "string",
            "isValidated": "bool",
            "postalOrZipCode": "string",
            "stateOrProvince": "string"
         },
         "companyOrOrganization": "string",
         "email": "string",
         "firstName": "string",
         "id": "int",
         "lastNameOrSurname": "string",
         "middleNameOrInitial": "string",
         "phoneNumbers": {
            "home": "string",
            "mobile": "string",
            "work": "string"
         }
      },
      "card": {
         "cardNumberPartOrMask": "string",
         "expireMonth": "short",
         "expireYear": "short",
         "isCardInfoSaved": "bool",
         "isUsedRecurring": "bool",
         "nameOnCard": "string",
         "paymentOrCardType": "string",
         "paymentServiceCardId": "string"
      },
      "isSameBillingShippingAddress": "bool",
      "paymentType": "string",
      "storeCreditCode": "string"
   },
   "cancelledDate": "DateTime",
   "changeMessages": [
      {
         "amount": "decimal",
         "appId": "string",
         "appKey": "string",
         "appName": "string",
         "correlationId": "string",
         "createDate": "DateTime",
         "id": "string",
         "identifier": "string",
         "message": "string",
         "metadata": "object",
         "newValue": "string",
         "oldValue": "string",
         "subject": "string",
         "subjectType": "string",
         "success": "bool",
         "userFirstName": "string",
         "userId": "string",
         "userLastName": "string",
         "userScopeType": "string",
         "verb": "string"
      }
   ],
   "channelCode": "string",
   "closedDate": "DateTime",
   "couponCodes": "string",
   "currencyCode": "string",
   "customerAccountId": "int",
   "customerInteractionType": "string",
   "customerTaxId": "string",
   "data": "string",
   "digitalPackages": [
      {
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "availableActions": "string",
         "changeMessages": [
            {
               "amount": "decimal",
               "appId": "string",
               "appKey": "string",
               "appName": "string",
               "correlationId": "string",
               "createDate": "DateTime",
               "id": "string",
               "identifier": "string",
               "message": "string",
               "metadata": "object",
               "newValue": "string",
               "oldValue": "string",
               "subject": "string",
               "subjectType": "string",
               "success": "bool",
               "userFirstName": "string",
               "userId": "string",
               "userLastName": "string",
               "userScopeType": "string",
               "verb": "string"
            }
         ],
         "code": "string",
         "fulfillmentDate": "DateTime",
         "fulfillmentLocationCode": "string",
         "id": "string",
         "items": [
            {
               "fulfillmentItemType": "string",
               "giftCardCode": "string",
               "lineId": "int",
               "productCode": "string",
               "quantity": "int"
            }
         ],
         "status": "string"
      }
   ],
   "discountedSubtotal": "decimal",
   "discountedTotal": "decimal",
   "discountTotal": "decimal",
   "dutyAmount": "decimal",
   "dutyTotal": "decimal",
   "email": "string",
   "expirationDate": "DateTime",
   "extendedProperties": [
      {
         "key": "string",
         "value": "string"
      }
   ],
   "externalId": "string",
   "feeTotal": "decimal",
   "fulfillmentInfo": {
      "auditInfo": {
         "createBy": "string",
         "createDate": "DateTime",
         "updateBy": "string",
         "updateDate": "DateTime"
      },
      "data": "string",
      "fulfillmentContact": {
         "address": {
            "address1": "string",
            "address2": "string",
            "address3": "string",
            "address4": "string",
            "addressType": "string",
            "cityOrTown": "string",
            "countryCode": "string",
            "isValidated": "bool",
            "postalOrZipCode": "string",
            "stateOrProvince": "string"
         },
         "companyOrOrganization": "string",
         "email": "string",
         "firstName": "string",
         "id": "int",
         "lastNameOrSurname": "string",
         "middleNameOrInitial": "string",
         "phoneNumbers": {
            "home": "string",
            "mobile": "string",
            "work": "string"
         }
      },
      "isDestinationCommercial": "bool",
      "shippingMethodCode": "string",
      "shippingMethodName": "string"
   },
   "fulfillmentStatus": "string",
   "handlingAmount": "decimal",
   "handlingDiscounts": [
      {
         "couponCode": "string",
         "discount": {
            "expirationDate": "DateTime",
            "id": "int",
            "itemIds": "string",
            "name": "string"
         },
         "excluded": "bool",
         "impact": "decimal"
      }
   ],
   "handlingSubTotal": "decimal",
   "handlingTaxTotal": "decimal",
   "handlingTotal": "decimal",
   "hasDraft": "bool",
   "id": "string",
   "importDate": "DateTime",
   "invalidCoupons": [
      {
         "couponCode": "string",
         "createDate": "DateTime",
         "discountId": "int",
         "reason": "string",
         "reasonCode": "int"
      }
   ],
   "ipAddress": "string",
   "isDraft": "bool",
   "isEligibleForReturns": "bool",
   "isImport": "bool",
   "isTaxExempt": "bool",
   "items": [
      {
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "data": "string",
         "discountedTotal": "decimal",
         "discountTotal": "decimal",
         "dutyAmount": "decimal",
         "extendedTotal": "decimal",
         "feeTotal": "decimal",
         "fulfillmentLocationCode": "string",
         "fulfillmentMethod": "string",
         "handlingAmount": "decimal",
         "id": "string",
         "isRecurring": "bool",
         "isTaxable": "bool",
         "itemTaxTotal": "decimal",
         "lineId": "int",
         "localeCode": "string",
         "originalCartItemId": "string",
         "product": {
            "allocationExpiration": "DateTime",
            "allocationId": "int",
            "bundledProducts": [
               {
                  "allocationExpiration": "DateTime",
                  "allocationId": "int",
                  "creditValue": "decimal",
                  "description": "string",
                  "fulfillmentStatus": "string",
                  "goodsType": "string",
                  "isPackagedStandAlone": "bool",
                  "measurements": {
                     "height": {
                        "unit": "string",
                        "value": "decimal"
                     },
                     "length": {
                        "unit": "string",
                        "value": "decimal"
                     },
                     "weight": {
                        "unit": "string",
                        "value": "decimal"
                     },
                     "width": {
                        "unit": "string",
                        "value": "decimal"
                     }
                  },
                  "name": "string",
                  "optionAttributeFQN": "string",
                  "optionValue": "object",
                  "productCode": "string",
                  "productReservationId": "int",
                  "quantity": "int"
               }
            ],
            "categories": [
               {
                  "id": "int",
                  "parent": "self"
               }
            ],
            "description": "string",
            "discountsRestricted": "bool",
            "discountsRestrictedEndDate": "DateTime",
            "discountsRestrictedStartDate": "DateTime",
            "fulfillmentStatus": "string",
            "fulfillmentTypesSupported": "string",
            "goodsType": "string",
            "imageAlternateText": "string",
            "imageUrl": "string",
            "isPackagedStandAlone": "bool",
            "isRecurring": "bool",
            "isTaxable": "bool",
            "measurements": {
               "height": {
                  "unit": "string",
                  "value": "decimal"
               },
               "length": {
                  "unit": "string",
                  "value": "decimal"
               },
               "weight": {
                  "unit": "string",
                  "value": "decimal"
               },
               "width": {
                  "unit": "string",
                  "value": "decimal"
               }
            },
            "mfgPartNumber": "string",
            "name": "string",
            "options": [
               {
                  "attributeFQN": "string",
                  "dataType": "string",
                  "name": "string",
                  "shopperEnteredValue": "object",
                  "stringValue": "string",
                  "value": "object"
               }
            ],
            "price": {
               "creditValue": "decimal",
               "msrp": "decimal",
               "price": "decimal",
               "salePrice": "decimal",
               "tenantOverridePrice": "decimal"
            },
            "productCode": "string",
            "productReservationId": "int",
            "productType": "string",
            "productUsage": "string",
            "properties": [
               {
                  "attributeFQN": "string",
                  "dataType": "string",
                  "isMultiValue": "bool",
                  "name": "string",
                  "values": [
                     {
                        "stringValue": "string",
                        "value": "object"
                     }
                  ]
               }
            ],
            "upc": "string",
            "variationProductCode": "string"
         },
         "productDiscount": {
            "appliesToSalePrice": "bool",
            "couponCode": "string",
            "discount": {
               "expirationDate": "DateTime",
               "id": "int",
               "itemIds": "string",
               "name": "string"
            },
            "discountQuantity": "int",
            "excluded": "bool",
            "impact": "decimal",
            "impactPerUnit": "decimal",
            "productQuantity": "int"
         },
         "productDiscounts": [
            {
               "appliesToSalePrice": "bool",
               "couponCode": "string",
               "discount": {
                  "expirationDate": "DateTime",
                  "id": "int",
                  "itemIds": "string",
                  "name": "string"
               },
               "discountQuantity": "int",
               "excluded": "bool",
               "impact": "decimal",
               "impactPerUnit": "decimal",
               "productQuantity": "int"
            }
         ],
         "quantity": "int",
         "shippingDiscounts": [
            {
               "discount": {
                  "couponCode": "string",
                  "discount": {
                     "expirationDate": "DateTime",
                     "id": "int",
                     "itemIds": "string",
                     "name": "string"
                  },
                  "excluded": "bool",
                  "impact": "decimal"
               },
               "discountQuantity": "int",
               "impactPerUnit": "decimal",
               "methodCode": "string"
            }
         ],
         "shippingTaxTotal": "decimal",
         "shippingTotal": "decimal",
         "subtotal": "decimal",
         "taxableTotal": "decimal",
         "total": "decimal",
         "unitPrice": {
            "extendedAmount": "decimal",
            "listAmount": "decimal",
            "overrideAmount": "decimal",
            "saleAmount": "decimal"
         }
      }
   ],
   "itemTaxTotal": "decimal",
   "lastValidationDate": "DateTime",
   "locationCode": "string",
   "notes": [
      {
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "id": "string",
         "text": "string"
      }
   ],
   "orderDiscounts": [
      {
         "couponCode": "string",
         "discount": {
            "expirationDate": "DateTime",
            "id": "int",
            "itemIds": "string",
            "name": "string"
         },
         "excluded": "bool",
         "impact": "decimal"
      }
   ],
   "orderNumber": "int",
   "originalCartId": "string",
   "packages": [
      {
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "availableActions": "string",
         "changeMessages": [
            {
               "amount": "decimal",
               "appId": "string",
               "appKey": "string",
               "appName": "string",
               "correlationId": "string",
               "createDate": "DateTime",
               "id": "string",
               "identifier": "string",
               "message": "string",
               "metadata": "object",
               "newValue": "string",
               "oldValue": "string",
               "subject": "string",
               "subjectType": "string",
               "success": "bool",
               "userFirstName": "string",
               "userId": "string",
               "userLastName": "string",
               "userScopeType": "string",
               "verb": "string"
            }
         ],
         "code": "string",
         "fulfillmentDate": "DateTime",
         "fulfillmentLocationCode": "string",
         "hasLabel": "bool",
         "id": "string",
         "items": [
            {
               "fulfillmentItemType": "string",
               "lineId": "int",
               "productCode": "string",
               "quantity": "int"
            }
         ],
         "measurements": {
            "height": {
               "unit": "string",
               "value": "decimal"
            },
            "length": {
               "unit": "string",
               "value": "decimal"
            },
            "weight": {
               "unit": "string",
               "value": "decimal"
            },
            "width": {
               "unit": "string",
               "value": "decimal"
            }
         },
         "packagingType": "string",
         "shipmentId": "string",
         "shippingMethodCode": "string",
         "shippingMethodName": "string",
         "status": "string",
         "trackingNumber": "string"
      }
   ],
   "parentOrderId": "string",
   "parentReturnId": "string",
   "payments": [
      {
         "amountCollected": "decimal",
         "amountCredited": "decimal",
         "amountRequested": "decimal",
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "availableActions": "string",
         "billingInfo": {
            "auditInfo": {
               "createBy": "string",
               "createDate": "DateTime",
               "updateBy": "string",
               "updateDate": "DateTime"
            },
            "billingContact": {
               "address": {
                  "address1": "string",
                  "address2": "string",
                  "address3": "string",
                  "address4": "string",
                  "addressType": "string",
                  "cityOrTown": "string",
                  "countryCode": "string",
                  "isValidated": "bool",
                  "postalOrZipCode": "string",
                  "stateOrProvince": "string"
               },
               "companyOrOrganization": "string",
               "email": "string",
               "firstName": "string",
               "id": "int",
               "lastNameOrSurname": "string",
               "middleNameOrInitial": "string",
               "phoneNumbers": {
                  "home": "string",
                  "mobile": "string",
                  "work": "string"
               }
            },
            "card": {
               "cardNumberPartOrMask": "string",
               "expireMonth": "short",
               "expireYear": "short",
               "isCardInfoSaved": "bool",
               "isUsedRecurring": "bool",
               "nameOnCard": "string",
               "paymentOrCardType": "string",
               "paymentServiceCardId": "string"
            },
            "isSameBillingShippingAddress": "bool",
            "paymentType": "string",
            "storeCreditCode": "string"
         },
         "changeMessages": [
            {
               "amount": "decimal",
               "appId": "string",
               "appKey": "string",
               "appName": "string",
               "correlationId": "string",
               "createDate": "DateTime",
               "id": "string",
               "identifier": "string",
               "message": "string",
               "metadata": "object",
               "newValue": "string",
               "oldValue": "string",
               "subject": "string",
               "subjectType": "string",
               "success": "bool",
               "userFirstName": "string",
               "userId": "string",
               "userLastName": "string",
               "userScopeType": "string",
               "verb": "string"
            }
         ],
         "id": "string",
         "interactions": [
            {
               "amount": "decimal",
               "auditInfo": {
                  "createBy": "string",
                  "createDate": "DateTime",
                  "updateBy": "string",
                  "updateDate": "DateTime"
               },
               "checkNumber": "string",
               "currencyCode": "string",
               "gatewayAuthCode": "string",
               "gatewayAVSCodes": "string",
               "gatewayCVV2Codes": "string",
               "gatewayInteractionId": "int",
               "gatewayResponseCode": "string",
               "gatewayResponseText": "string",
               "gatewayTransactionId": "string",
               "id": "string",
               "interactionDate": "DateTime",
               "interactionType": "string",
               "isManual": "bool",
               "isRecurring": "bool",
               "note": "string",
               "orderId": "string",
               "paymentEntryStatus": "string",
               "paymentId": "string",
               "paymentTransactionInteractionIdReference": "int",
               "status": "string"
            }
         ],
         "isRecurring": "bool",
         "orderId": "string",
         "paymentServiceTransactionId": "string",
         "paymentType": "string",
         "status": "string"
      }
   ],
   "paymentStatus": "string",
   "pickups": [
      {
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "availableActions": "string",
         "changeMessages": [
            {
               "amount": "decimal",
               "appId": "string",
               "appKey": "string",
               "appName": "string",
               "correlationId": "string",
               "createDate": "DateTime",
               "id": "string",
               "identifier": "string",
               "message": "string",
               "metadata": "object",
               "newValue": "string",
               "oldValue": "string",
               "subject": "string",
               "subjectType": "string",
               "success": "bool",
               "userFirstName": "string",
               "userId": "string",
               "userLastName": "string",
               "userScopeType": "string",
               "verb": "string"
            }
         ],
         "code": "string",
         "fulfillmentDate": "DateTime",
         "fulfillmentLocationCode": "string",
         "id": "string",
         "items": [
            {
               "fulfillmentItemType": "string",
               "lineId": "int",
               "productCode": "string",
               "quantity": "int"
            }
         ],
         "status": "string"
      }
   ],
   "refunds": [
      {
         "amount": "decimal",
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "id": "string",
         "orderId": "string",
         "payment": {
            "amountCollected": "decimal",
            "amountCredited": "decimal",
            "amountRequested": "decimal",
            "auditInfo": {
               "createBy": "string",
               "createDate": "DateTime",
               "updateBy": "string",
               "updateDate": "DateTime"
            },
            "availableActions": "string",
            "billingInfo": {
               "auditInfo": {
                  "createBy": "string",
                  "createDate": "DateTime",
                  "updateBy": "string",
                  "updateDate": "DateTime"
               },
               "billingContact": {
                  "address": {
                     "address1": "string",
                     "address2": "string",
                     "address3": "string",
                     "address4": "string",
                     "addressType": "string",
                     "cityOrTown": "string",
                     "countryCode": "string",
                     "isValidated": "bool",
                     "postalOrZipCode": "string",
                     "stateOrProvince": "string"
                  },
                  "companyOrOrganization": "string",
                  "email": "string",
                  "firstName": "string",
                  "id": "int",
                  "lastNameOrSurname": "string",
                  "middleNameOrInitial": "string",
                  "phoneNumbers": {
                     "home": "string",
                     "mobile": "string",
                     "work": "string"
                  }
               },
               "card": {
                  "cardNumberPartOrMask": "string",
                  "expireMonth": "short",
                  "expireYear": "short",
                  "isCardInfoSaved": "bool",
                  "isUsedRecurring": "bool",
                  "nameOnCard": "string",
                  "paymentOrCardType": "string",
                  "paymentServiceCardId": "string"
               },
               "isSameBillingShippingAddress": "bool",
               "paymentType": "string",
               "storeCreditCode": "string"
            },
            "changeMessages": [
               {
                  "amount": "decimal",
                  "appId": "string",
                  "appKey": "string",
                  "appName": "string",
                  "correlationId": "string",
                  "createDate": "DateTime",
                  "id": "string",
                  "identifier": "string",
                  "message": "string",
                  "metadata": "object",
                  "newValue": "string",
                  "oldValue": "string",
                  "subject": "string",
                  "subjectType": "string",
                  "success": "bool",
                  "userFirstName": "string",
                  "userId": "string",
                  "userLastName": "string",
                  "userScopeType": "string",
                  "verb": "string"
               }
            ],
            "id": "string",
            "interactions": [
               {
                  "amount": "decimal",
                  "auditInfo": {
                     "createBy": "string",
                     "createDate": "DateTime",
                     "updateBy": "string",
                     "updateDate": "DateTime"
                  },
                  "checkNumber": "string",
                  "currencyCode": "string",
                  "gatewayAuthCode": "string",
                  "gatewayAVSCodes": "string",
                  "gatewayCVV2Codes": "string",
                  "gatewayInteractionId": "int",
                  "gatewayResponseCode": "string",
                  "gatewayResponseText": "string",
                  "gatewayTransactionId": "string",
                  "id": "string",
                  "interactionDate": "DateTime",
                  "interactionType": "string",
                  "isManual": "bool",
                  "isRecurring": "bool",
                  "note": "string",
                  "orderId": "string",
                  "paymentEntryStatus": "string",
                  "paymentId": "string",
                  "paymentTransactionInteractionIdReference": "int",
                  "status": "string"
               }
            ],
            "isRecurring": "bool",
            "orderId": "string",
            "paymentServiceTransactionId": "string",
            "paymentType": "string",
            "status": "string"
         },
         "reason": "string"
      }
   ],
   "returnStatus": "string",
   "shipments": [
      {
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "cost": "decimal",
         "currencyCode": "string",
         "destinationAddress": {
            "address": {
               "address1": "string",
               "address2": "string",
               "address3": "string",
               "address4": "string",
               "addressType": "string",
               "cityOrTown": "string",
               "countryCode": "string",
               "isValidated": "bool",
               "postalOrZipCode": "string",
               "stateOrProvince": "string"
            },
            "companyOrOrganization": "string",
            "email": "string",
            "firstName": "string",
            "id": "int",
            "lastNameOrSurname": "string",
            "middleNameOrInitial": "string",
            "phoneNumbers": {
               "home": "string",
               "mobile": "string",
               "work": "string"
            }
         },
         "id": "string",
         "originAddress": {
            "address": {
               "address1": "string",
               "address2": "string",
               "address3": "string",
               "address4": "string",
               "addressType": "string",
               "cityOrTown": "string",
               "countryCode": "string",
               "isValidated": "bool",
               "postalOrZipCode": "string",
               "stateOrProvince": "string"
            },
            "companyOrOrganization": "string",
            "email": "string",
            "firstName": "string",
            "id": "int",
            "lastNameOrSurname": "string",
            "middleNameOrInitial": "string",
            "phoneNumbers": {
               "home": "string",
               "mobile": "string",
               "work": "string"
            }
         },
         "packageIds": "string",
         "shippingMethodCode": "string",
         "signatureRequired": "bool",
         "trackingNumber": "string"
      }
   ],
   "shippingAdjustment": {
      "amount": "decimal",
      "description": "string",
      "internalComment": "string"
   },
   "shippingDiscounts": [
      {
         "discount": {
            "couponCode": "string",
            "discount": {
               "expirationDate": "DateTime",
               "id": "int",
               "itemIds": "string",
               "name": "string"
            },
            "excluded": "bool",
            "impact": "decimal"
         },
         "methodCode": "string"
      }
   ],
   "shippingSubTotal": "decimal",
   "shippingTaxTotal": "decimal",
   "shippingTotal": "decimal",
   "shopperNotes": {
      "comments": "string",
      "giftMessage": "string"
   },
   "siteId": "int",
   "sourceDevice": "string",
   "status": "string",
   "submittedDate": "DateTime",
   "subtotal": "decimal",
   "taxTotal": "decimal",
   "tenantId": "int",
   "total": "decimal",
   "totalCollected": "decimal",
   "type": "string",
   "validationResults": [
      {
         "createdDate": "DateTime",
         "messages": [
            {
               "message": "string",
               "messageType": "string",
               "orderItemId": "string"
            }
         ],
         "status": "string",
         "validationId": "string",
         "validatorName": "string",
         "validatorType": "string"
      }
   ],
   "version": "string",
   "visitId": "string",
   "webSessionId": "string"
}
```

For information about the properties in the response, refer to the [REST API Help](/api-overviews/openapi_commerce_overview).

### exec.setData

Sets custom key/value data on the current order.

| Parameter | Type   | Description                          |
| --------- | ------ | ------------------------------------ |
| key       | string | Key of the data to set on the order. |
| value     | object | Value of the data to set.            |

Example:

```
context.exec.setData("customField", value);
```

Response:

```
{
   "acceptedDate": "DateTime",
   "acceptsMarketing": "bool",
   "adjustment": {
      "amount": "decimal",
      "description": "string",
      "internalComment": "string"
   },
   "amountAvailableForRefund": "decimal",
   "amountRefunded": "decimal",
   "amountRemainingForPayment": "decimal",
   "attributes": [
      {
         "attributeDefinitionId": "int",
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "fullyQualifiedName": "string",
         "values": "object"
      }
   ],
   "auditInfo": {
      "createBy": "string",
      "createDate": "DateTime",
      "updateBy": "string",
      "updateDate": "DateTime"
   },
   "availableActions": "string",
   "billingInfo": {
      "auditInfo": {
         "createBy": "string",
         "createDate": "DateTime",
         "updateBy": "string",
         "updateDate": "DateTime"
      },
      "billingContact": {
         "address": {
            "address1": "string",
            "address2": "string",
            "address3": "string",
            "address4": "string",
            "addressType": "string",
            "cityOrTown": "string",
            "countryCode": "string",
            "isValidated": "bool",
            "postalOrZipCode": "string",
            "stateOrProvince": "string"
         },
         "companyOrOrganization": "string",
         "email": "string",
         "firstName": "string",
         "id": "int",
         "lastNameOrSurname": "string",
         "middleNameOrInitial": "string",
         "phoneNumbers": {
            "home": "string",
            "mobile": "string",
            "work": "string"
         }
      },
      "card": {
         "cardNumberPartOrMask": "string",
         "expireMonth": "short",
         "expireYear": "short",
         "isCardInfoSaved": "bool",
         "isUsedRecurring": "bool",
         "nameOnCard": "string",
         "paymentOrCardType": "string",
         "paymentServiceCardId": "string"
      },
      "isSameBillingShippingAddress": "bool",
      "paymentType": "string",
      "storeCreditCode": "string"
   },
   "cancelledDate": "DateTime",
   "changeMessages": [
      {
         "amount": "decimal",
         "appId": "string",
         "appKey": "string",
         "appName": "string",
         "correlationId": "string",
         "createDate": "DateTime",
         "id": "string",
         "identifier": "string",
         "message": "string",
         "metadata": "object",
         "newValue": "string",
         "oldValue": "string",
         "subject": "string",
         "subjectType": "string",
         "success": "bool",
         "userFirstName": "string",
         "userId": "string",
         "userLastName": "string",
         "userScopeType": "string",
         "verb": "string"
      }
   ],
   "channelCode": "string",
   "closedDate": "DateTime",
   "couponCodes": "string",
   "currencyCode": "string",
   "customerAccountId": "int",
   "customerInteractionType": "string",
   "customerTaxId": "string",
   "data": "string",
   "digitalPackages": [
      {
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "availableActions": "string",
         "changeMessages": [
            {
               "amount": "decimal",
               "appId": "string",
               "appKey": "string",
               "appName": "string",
               "correlationId": "string",
               "createDate": "DateTime",
               "id": "string",
               "identifier": "string",
               "message": "string",
               "metadata": "object",
               "newValue": "string",
               "oldValue": "string",
               "subject": "string",
               "subjectType": "string",
               "success": "bool",
               "userFirstName": "string",
               "userId": "string",
               "userLastName": "string",
               "userScopeType": "string",
               "verb": "string"
            }
         ],
         "code": "string",
         "fulfillmentDate": "DateTime",
         "fulfillmentLocationCode": "string",
         "id": "string",
         "items": [
            {
               "fulfillmentItemType": "string",
               "giftCardCode": "string",
               "lineId": "int",
               "productCode": "string",
               "quantity": "int"
            }
         ],
         "status": "string"
      }
   ],
   "discountedSubtotal": "decimal",
   "discountedTotal": "decimal",
   "discountTotal": "decimal",
   "dutyAmount": "decimal",
   "dutyTotal": "decimal",
   "email": "string",
   "expirationDate": "DateTime",
   "extendedProperties": [
      {
         "key": "string",
         "value": "string"
      }
   ],
   "externalId": "string",
   "feeTotal": "decimal",
   "fulfillmentInfo": {
      "auditInfo": {
         "createBy": "string",
         "createDate": "DateTime",
         "updateBy": "string",
         "updateDate": "DateTime"
      },
      "data": "string",
      "fulfillmentContact": {
         "address": {
            "address1": "string",
            "address2": "string",
            "address3": "string",
            "address4": "string",
            "addressType": "string",
            "cityOrTown": "string",
            "countryCode": "string",
            "isValidated": "bool",
            "postalOrZipCode": "string",
            "stateOrProvince": "string"
         },
         "companyOrOrganization": "string",
         "email": "string",
         "firstName": "string",
         "id": "int",
         "lastNameOrSurname": "string",
         "middleNameOrInitial": "string",
         "phoneNumbers": {
            "home": "string",
            "mobile": "string",
            "work": "string"
         }
      },
      "isDestinationCommercial": "bool",
      "shippingMethodCode": "string",
      "shippingMethodName": "string"
   },
   "fulfillmentStatus": "string",
   "handlingAmount": "decimal",
   "handlingDiscounts": [
      {
         "couponCode": "string",
         "discount": {
            "expirationDate": "DateTime",
            "id": "int",
            "itemIds": "string",
            "name": "string"
         },
         "excluded": "bool",
         "impact": "decimal"
      }
   ],
   "handlingSubTotal": "decimal",
   "handlingTaxTotal": "decimal",
   "handlingTotal": "decimal",
   "hasDraft": "bool",
   "id": "string",
   "importDate": "DateTime",
   "invalidCoupons": [
      {
         "couponCode": "string",
         "createDate": "DateTime",
         "discountId": "int",
         "reason": "string",
         "reasonCode": "int"
      }
   ],
   "ipAddress": "string",
   "isDraft": "bool",
   "isEligibleForReturns": "bool",
   "isImport": "bool",
   "isTaxExempt": "bool",
   "items": [
      {
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "data": "string",
         "discountedTotal": "decimal",
         "discountTotal": "decimal",
         "dutyAmount": "decimal",
         "extendedTotal": "decimal",
         "feeTotal": "decimal",
         "fulfillmentLocationCode": "string",
         "fulfillmentMethod": "string",
         "handlingAmount": "decimal",
         "id": "string",
         "isRecurring": "bool",
         "isTaxable": "bool",
         "itemTaxTotal": "decimal",
         "lineId": "int",
         "localeCode": "string",
         "originalCartItemId": "string",
         "product": {
            "allocationExpiration": "DateTime",
            "allocationId": "int",
            "bundledProducts": [
               {
                  "allocationExpiration": "DateTime",
                  "allocationId": "int",
                  "creditValue": "decimal",
                  "description": "string",
                  "fulfillmentStatus": "string",
                  "goodsType": "string",
                  "isPackagedStandAlone": "bool",
                  "measurements": {
                     "height": {
                        "unit": "string",
                        "value": "decimal"
                     },
                     "length": {
                        "unit": "string",
                        "value": "decimal"
                     },
                     "weight": {
                        "unit": "string",
                        "value": "decimal"
                     },
                     "width": {
                        "unit": "string",
                        "value": "decimal"
                     }
                  },
                  "name": "string",
                  "optionAttributeFQN": "string",
                  "optionValue": "object",
                  "productCode": "string",
                  "productReservationId": "int",
                  "quantity": "int"
               }
            ],
            "categories": [
               {
                  "id": "int",
                  "parent": "self"
               }
            ],
            "description": "string",
            "discountsRestricted": "bool",
            "discountsRestrictedEndDate": "DateTime",
            "discountsRestrictedStartDate": "DateTime",
            "fulfillmentStatus": "string",
            "fulfillmentTypesSupported": "string",
            "goodsType": "string",
            "imageAlternateText": "string",
            "imageUrl": "string",
            "isPackagedStandAlone": "bool",
            "isRecurring": "bool",
            "isTaxable": "bool",
            "measurements": {
               "height": {
                  "unit": "string",
                  "value": "decimal"
               },
               "length": {
                  "unit": "string",
                  "value": "decimal"
               },
               "weight": {
                  "unit": "string",
                  "value": "decimal"
               },
               "width": {
                  "unit": "string",
                  "value": "decimal"
               }
            },
            "mfgPartNumber": "string",
            "name": "string",
            "options": [
               {
                  "attributeFQN": "string",
                  "dataType": "string",
                  "name": "string",
                  "shopperEnteredValue": "object",
                  "stringValue": "string",
                  "value": "object"
               }
            ],
            "price": {
               "creditValue": "decimal",
               "msrp": "decimal",
               "price": "decimal",
               "salePrice": "decimal",
               "tenantOverridePrice": "decimal"
            },
            "productCode": "string",
            "productReservationId": "int",
            "productType": "string",
            "productUsage": "string",
            "properties": [
               {
                  "attributeFQN": "string",
                  "dataType": "string",
                  "isMultiValue": "bool",
                  "name": "string",
                  "values": [
                     {
                        "stringValue": "string",
                        "value": "object"
                     }
                  ]
               }
            ],
            "upc": "string",
            "variationProductCode": "string"
         },
         "productDiscount": {
            "appliesToSalePrice": "bool",
            "couponCode": "string",
            "discount": {
               "expirationDate": "DateTime",
               "id": "int",
               "itemIds": "string",
               "name": "string"
            },
            "discountQuantity": "int",
            "excluded": "bool",
            "impact": "decimal",
            "impactPerUnit": "decimal",
            "productQuantity": "int"
         },
         "productDiscounts": [
            {
               "appliesToSalePrice": "bool",
               "couponCode": "string",
               "discount": {
                  "expirationDate": "DateTime",
                  "id": "int",
                  "itemIds": "string",
                  "name": "string"
               },
               "discountQuantity": "int",
               "excluded": "bool",
               "impact": "decimal",
               "impactPerUnit": "decimal",
               "productQuantity": "int"
            }
         ],
         "quantity": "int",
         "shippingDiscounts": [
            {
               "discount": {
                  "couponCode": "string",
                  "discount": {
                     "expirationDate": "DateTime",
                     "id": "int",
                     "itemIds": "string",
                     "name": "string"
                  },
                  "excluded": "bool",
                  "impact": "decimal"
               },
               "discountQuantity": "int",
               "impactPerUnit": "decimal",
               "methodCode": "string"
            }
         ],
         "shippingTaxTotal": "decimal",
         "shippingTotal": "decimal",
         "subtotal": "decimal",
         "taxableTotal": "decimal",
         "total": "decimal",
         "unitPrice": {
            "extendedAmount": "decimal",
            "listAmount": "decimal",
            "overrideAmount": "decimal",
            "saleAmount": "decimal"
         }
      }
   ],
   "itemTaxTotal": "decimal",
   "lastValidationDate": "DateTime",
   "locationCode": "string",
   "notes": [
      {
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "id": "string",
         "text": "string"
      }
   ],
   "orderDiscounts": [
      {
         "couponCode": "string",
         "discount": {
            "expirationDate": "DateTime",
            "id": "int",
            "itemIds": "string",
            "name": "string"
         },
         "excluded": "bool",
         "impact": "decimal"
      }
   ],
   "orderNumber": "int",
   "originalCartId": "string",
   "packages": [
      {
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "availableActions": "string",
         "changeMessages": [
            {
               "amount": "decimal",
               "appId": "string",
               "appKey": "string",
               "appName": "string",
               "correlationId": "string",
               "createDate": "DateTime",
               "id": "string",
               "identifier": "string",
               "message": "string",
               "metadata": "object",
               "newValue": "string",
               "oldValue": "string",
               "subject": "string",
               "subjectType": "string",
               "success": "bool",
               "userFirstName": "string",
               "userId": "string",
               "userLastName": "string",
               "userScopeType": "string",
               "verb": "string"
            }
         ],
         "code": "string",
         "fulfillmentDate": "DateTime",
         "fulfillmentLocationCode": "string",
         "hasLabel": "bool",
         "id": "string",
         "items": [
            {
               "fulfillmentItemType": "string",
               "lineId": "int",
               "productCode": "string",
               "quantity": "int"
            }
         ],
         "measurements": {
            "height": {
               "unit": "string",
               "value": "decimal"
            },
            "length": {
               "unit": "string",
               "value": "decimal"
            },
            "weight": {
               "unit": "string",
               "value": "decimal"
            },
            "width": {
               "unit": "string",
               "value": "decimal"
            }
         },
         "packagingType": "string",
         "shipmentId": "string",
         "shippingMethodCode": "string",
         "shippingMethodName": "string",
         "status": "string",
         "trackingNumber": "string"
      }
   ],
   "parentOrderId": "string",
   "parentReturnId": "string",
   "payments": [
      {
         "amountCollected": "decimal",
         "amountCredited": "decimal",
         "amountRequested": "decimal",
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "availableActions": "string",
         "billingInfo": {
            "auditInfo": {
               "createBy": "string",
               "createDate": "DateTime",
               "updateBy": "string",
               "updateDate": "DateTime"
            },
            "billingContact": {
               "address": {
                  "address1": "string",
                  "address2": "string",
                  "address3": "string",
                  "address4": "string",
                  "addressType": "string",
                  "cityOrTown": "string",
                  "countryCode": "string",
                  "isValidated": "bool",
                  "postalOrZipCode": "string",
                  "stateOrProvince": "string"
               },
               "companyOrOrganization": "string",
               "email": "string",
               "firstName": "string",
               "id": "int",
               "lastNameOrSurname": "string",
               "middleNameOrInitial": "string",
               "phoneNumbers": {
                  "home": "string",
                  "mobile": "string",
                  "work": "string"
               }
            },
            "card": {
               "cardNumberPartOrMask": "string",
               "expireMonth": "short",
               "expireYear": "short",
               "isCardInfoSaved": "bool",
               "isUsedRecurring": "bool",
               "nameOnCard": "string",
               "paymentOrCardType": "string",
               "paymentServiceCardId": "string"
            },
            "isSameBillingShippingAddress": "bool",
            "paymentType": "string",
            "storeCreditCode": "string"
         },
         "changeMessages": [
            {
               "amount": "decimal",
               "appId": "string",
               "appKey": "string",
               "appName": "string",
               "correlationId": "string",
               "createDate": "DateTime",
               "id": "string",
               "identifier": "string",
               "message": "string",
               "metadata": "object",
               "newValue": "string",
               "oldValue": "string",
               "subject": "string",
               "subjectType": "string",
               "success": "bool",
               "userFirstName": "string",
               "userId": "string",
               "userLastName": "string",
               "userScopeType": "string",
               "verb": "string"
            }
         ],
         "id": "string",
         "interactions": [
            {
               "amount": "decimal",
               "auditInfo": {
                  "createBy": "string",
                  "createDate": "DateTime",
                  "updateBy": "string",
                  "updateDate": "DateTime"
               },
               "checkNumber": "string",
               "currencyCode": "string",
               "gatewayAuthCode": "string",
               "gatewayAVSCodes": "string",
               "gatewayCVV2Codes": "string",
               "gatewayInteractionId": "int",
               "gatewayResponseCode": "string",
               "gatewayResponseText": "string",
               "gatewayTransactionId": "string",
               "id": "string",
               "interactionDate": "DateTime",
               "interactionType": "string",
               "isManual": "bool",
               "isRecurring": "bool",
               "note": "string",
               "orderId": "string",
               "paymentEntryStatus": "string",
               "paymentId": "string",
               "paymentTransactionInteractionIdReference": "int",
               "status": "string"
            }
         ],
         "isRecurring": "bool",
         "orderId": "string",
         "paymentServiceTransactionId": "string",
         "paymentType": "string",
         "status": "string"
      }
   ],
   "paymentStatus": "string",
   "pickups": [
      {
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "availableActions": "string",
         "changeMessages": [
            {
               "amount": "decimal",
               "appId": "string",
               "appKey": "string",
               "appName": "string",
               "correlationId": "string",
               "createDate": "DateTime",
               "id": "string",
               "identifier": "string",
               "message": "string",
               "metadata": "object",
               "newValue": "string",
               "oldValue": "string",
               "subject": "string",
               "subjectType": "string",
               "success": "bool",
               "userFirstName": "string",
               "userId": "string",
               "userLastName": "string",
               "userScopeType": "string",
               "verb": "string"
            }
         ],
         "code": "string",
         "fulfillmentDate": "DateTime",
         "fulfillmentLocationCode": "string",
         "id": "string",
         "items": [
            {
               "fulfillmentItemType": "string",
               "lineId": "int",
               "productCode": "string",
               "quantity": "int"
            }
         ],
         "status": "string"
      }
   ],
   "refunds": [
      {
         "amount": "decimal",
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "id": "string",
         "orderId": "string",
         "payment": {
            "amountCollected": "decimal",
            "amountCredited": "decimal",
            "amountRequested": "decimal",
            "auditInfo": {
               "createBy": "string",
               "createDate": "DateTime",
               "updateBy": "string",
               "updateDate": "DateTime"
            },
            "availableActions": "string",
            "billingInfo": {
               "auditInfo": {
                  "createBy": "string",
                  "createDate": "DateTime",
                  "updateBy": "string",
                  "updateDate": "DateTime"
               },
               "billingContact": {
                  "address": {
                     "address1": "string",
                     "address2": "string",
                     "address3": "string",
                     "address4": "string",
                     "addressType": "string",
                     "cityOrTown": "string",
                     "countryCode": "string",
                     "isValidated": "bool",
                     "postalOrZipCode": "string",
                     "stateOrProvince": "string"
                  },
                  "companyOrOrganization": "string",
                  "email": "string",
                  "firstName": "string",
                  "id": "int",
                  "lastNameOrSurname": "string",
                  "middleNameOrInitial": "string",
                  "phoneNumbers": {
                     "home": "string",
                     "mobile": "string",
                     "work": "string"
                  }
               },
               "card": {
                  "cardNumberPartOrMask": "string",
                  "expireMonth": "short",
                  "expireYear": "short",
                  "isCardInfoSaved": "bool",
                  "isUsedRecurring": "bool",
                  "nameOnCard": "string",
                  "paymentOrCardType": "string",
                  "paymentServiceCardId": "string"
               },
               "isSameBillingShippingAddress": "bool",
               "paymentType": "string",
               "storeCreditCode": "string"
            },
            "changeMessages": [
               {
                  "amount": "decimal",
                  "appId": "string",
                  "appKey": "string",
                  "appName": "string",
                  "correlationId": "string",
                  "createDate": "DateTime",
                  "id": "string",
                  "identifier": "string",
                  "message": "string",
                  "metadata": "object",
                  "newValue": "string",
                  "oldValue": "string",
                  "subject": "string",
                  "subjectType": "string",
                  "success": "bool",
                  "userFirstName": "string",
                  "userId": "string",
                  "userLastName": "string",
                  "userScopeType": "string",
                  "verb": "string"
               }
            ],
            "id": "string",
            "interactions": [
               {
                  "amount": "decimal",
                  "auditInfo": {
                     "createBy": "string",
                     "createDate": "DateTime",
                     "updateBy": "string",
                     "updateDate": "DateTime"
                  },
                  "checkNumber": "string",
                  "currencyCode": "string",
                  "gatewayAuthCode": "string",
                  "gatewayAVSCodes": "string",
                  "gatewayCVV2Codes": "string",
                  "gatewayInteractionId": "int",
                  "gatewayResponseCode": "string",
                  "gatewayResponseText": "string",
                  "gatewayTransactionId": "string",
                  "id": "string",
                  "interactionDate": "DateTime",
                  "interactionType": "string",
                  "isManual": "bool",
                  "isRecurring": "bool",
                  "note": "string",
                  "orderId": "string",
                  "paymentEntryStatus": "string",
                  "paymentId": "string",
                  "paymentTransactionInteractionIdReference": "int",
                  "status": "string"
               }
            ],
            "isRecurring": "bool",
            "orderId": "string",
            "paymentServiceTransactionId": "string",
            "paymentType": "string",
            "status": "string"
         },
         "reason": "string"
      }
   ],
   "returnStatus": "string",
   "shipments": [
      {
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "cost": "decimal",
         "currencyCode": "string",
         "destinationAddress": {
            "address": {
               "address1": "string",
               "address2": "string",
               "address3": "string",
               "address4": "string",
               "addressType": "string",
               "cityOrTown": "string",
               "countryCode": "string",
               "isValidated": "bool",
               "postalOrZipCode": "string",
               "stateOrProvince": "string"
            },
            "companyOrOrganization": "string",
            "email": "string",
            "firstName": "string",
            "id": "int",
            "lastNameOrSurname": "string",
            "middleNameOrInitial": "string",
            "phoneNumbers": {
               "home": "string",
               "mobile": "string",
               "work": "string"
            }
         },
         "id": "string",
         "originAddress": {
            "address": {
               "address1": "string",
               "address2": "string",
               "address3": "string",
               "address4": "string",
               "addressType": "string",
               "cityOrTown": "string",
               "countryCode": "string",
               "isValidated": "bool",
               "postalOrZipCode": "string",
               "stateOrProvince": "string"
            },
            "companyOrOrganization": "string",
            "email": "string",
            "firstName": "string",
            "id": "int",
            "lastNameOrSurname": "string",
            "middleNameOrInitial": "string",
            "phoneNumbers": {
               "home": "string",
               "mobile": "string",
               "work": "string"
            }
         },
         "packageIds": "string",
         "shippingMethodCode": "string",
         "signatureRequired": "bool",
         "trackingNumber": "string"
      }
   ],
   "shippingAdjustment": {
      "amount": "decimal",
      "description": "string",
      "internalComment": "string"
   },
   "shippingDiscounts": [
      {
         "discount": {
            "couponCode": "string",
            "discount": {
               "expirationDate": "DateTime",
               "id": "int",
               "itemIds": "string",
               "name": "string"
            },
            "excluded": "bool",
            "impact": "decimal"
         },
         "methodCode": "string"
      }
   ],
   "shippingSubTotal": "decimal",
   "shippingTaxTotal": "decimal",
   "shippingTotal": "decimal",
   "shopperNotes": {
      "comments": "string",
      "giftMessage": "string"
   },
   "siteId": "int",
   "sourceDevice": "string",
   "status": "string",
   "submittedDate": "DateTime",
   "subtotal": "decimal",
   "taxTotal": "decimal",
   "tenantId": "int",
   "total": "decimal",
   "totalCollected": "decimal",
   "type": "string",
   "validationResults": [
      {
         "createdDate": "DateTime",
         "messages": [
            {
               "message": "string",
               "messageType": "string",
               "orderItemId": "string"
            }
         ],
         "status": "string",
         "validationId": "string",
         "validatorName": "string",
         "validatorType": "string"
      }
   ],
   "version": "string",
   "visitId": "string",
   "webSessionId": "string"
}
```

For information about the properties in the response, refer to the [REST API Help](/api-overviews/openapi_commerce_overview).

### exec.removeData

Removes custom key/value data from the current order.

| Parameter | Type   | Description                           |
| --------- | ------ | ------------------------------------- |
| key       | string | Key of the data to remove from order. |

Example:

```
context.exec.removeData("customField");
```

Response:

```
{
   "acceptedDate": "DateTime",
   "acceptsMarketing": "bool",
   "adjustment": {
      "amount": "decimal",
      "description": "string",
      "internalComment": "string"
   },
   "amountAvailableForRefund": "decimal",
   "amountRefunded": "decimal",
   "amountRemainingForPayment": "decimal",
   "attributes": [
      {
         "attributeDefinitionId": "int",
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "fullyQualifiedName": "string",
         "values": "object"
      }
   ],
   "auditInfo": {
      "createBy": "string",
      "createDate": "DateTime",
      "updateBy": "string",
      "updateDate": "DateTime"
   },
   "availableActions": "string",
   "billingInfo": {
      "auditInfo": {
         "createBy": "string",
         "createDate": "DateTime",
         "updateBy": "string",
         "updateDate": "DateTime"
      },
      "billingContact": {
         "address": {
            "address1": "string",
            "address2": "string",
            "address3": "string",
            "address4": "string",
            "addressType": "string",
            "cityOrTown": "string",
            "countryCode": "string",
            "isValidated": "bool",
            "postalOrZipCode": "string",
            "stateOrProvince": "string"
         },
         "companyOrOrganization": "string",
         "email": "string",
         "firstName": "string",
         "id": "int",
         "lastNameOrSurname": "string",
         "middleNameOrInitial": "string",
         "phoneNumbers": {
            "home": "string",
            "mobile": "string",
            "work": "string"
         }
      },
      "card": {
         "cardNumberPartOrMask": "string",
         "expireMonth": "short",
         "expireYear": "short",
         "isCardInfoSaved": "bool",
         "isUsedRecurring": "bool",
         "nameOnCard": "string",
         "paymentOrCardType": "string",
         "paymentServiceCardId": "string"
      },
      "isSameBillingShippingAddress": "bool",
      "paymentType": "string",
      "storeCreditCode": "string"
   },
   "cancelledDate": "DateTime",
   "changeMessages": [
      {
         "amount": "decimal",
         "appId": "string",
         "appKey": "string",
         "appName": "string",
         "correlationId": "string",
         "createDate": "DateTime",
         "id": "string",
         "identifier": "string",
         "message": "string",
         "metadata": "object",
         "newValue": "string",
         "oldValue": "string",
         "subject": "string",
         "subjectType": "string",
         "success": "bool",
         "userFirstName": "string",
         "userId": "string",
         "userLastName": "string",
         "userScopeType": "string",
         "verb": "string"
      }
   ],
   "channelCode": "string",
   "closedDate": "DateTime",
   "couponCodes": "string",
   "currencyCode": "string",
   "customerAccountId": "int",
   "customerInteractionType": "string",
   "customerTaxId": "string",
   "data": "string",
   "digitalPackages": [
      {
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "availableActions": "string",
         "changeMessages": [
            {
               "amount": "decimal",
               "appId": "string",
               "appKey": "string",
               "appName": "string",
               "correlationId": "string",
               "createDate": "DateTime",
               "id": "string",
               "identifier": "string",
               "message": "string",
               "metadata": "object",
               "newValue": "string",
               "oldValue": "string",
               "subject": "string",
               "subjectType": "string",
               "success": "bool",
               "userFirstName": "string",
               "userId": "string",
               "userLastName": "string",
               "userScopeType": "string",
               "verb": "string"
            }
         ],
         "code": "string",
         "fulfillmentDate": "DateTime",
         "fulfillmentLocationCode": "string",
         "id": "string",
         "items": [
            {
               "fulfillmentItemType": "string",
               "giftCardCode": "string",
               "lineId": "int",
               "productCode": "string",
               "quantity": "int"
            }
         ],
         "status": "string"
      }
   ],
   "discountedSubtotal": "decimal",
   "discountedTotal": "decimal",
   "discountTotal": "decimal",
   "dutyAmount": "decimal",
   "dutyTotal": "decimal",
   "email": "string",
   "expirationDate": "DateTime",
   "extendedProperties": [
      {
         "key": "string",
         "value": "string"
      }
   ],
   "externalId": "string",
   "feeTotal": "decimal",
   "fulfillmentInfo": {
      "auditInfo": {
         "createBy": "string",
         "createDate": "DateTime",
         "updateBy": "string",
         "updateDate": "DateTime"
      },
      "data": "string",
      "fulfillmentContact": {
         "address": {
            "address1": "string",
            "address2": "string",
            "address3": "string",
            "address4": "string",
            "addressType": "string",
            "cityOrTown": "string",
            "countryCode": "string",
            "isValidated": "bool",
            "postalOrZipCode": "string",
            "stateOrProvince": "string"
         },
         "companyOrOrganization": "string",
         "email": "string",
         "firstName": "string",
         "id": "int",
         "lastNameOrSurname": "string",
         "middleNameOrInitial": "string",
         "phoneNumbers": {
            "home": "string",
            "mobile": "string",
            "work": "string"
         }
      },
      "isDestinationCommercial": "bool",
      "shippingMethodCode": "string",
      "shippingMethodName": "string"
   },
   "fulfillmentStatus": "string",
   "handlingAmount": "decimal",
   "handlingDiscounts": [
      {
         "couponCode": "string",
         "discount": {
            "expirationDate": "DateTime",
            "id": "int",
            "itemIds": "string",
            "name": "string"
         },
         "excluded": "bool",
         "impact": "decimal"
      }
   ],
   "handlingSubTotal": "decimal",
   "handlingTaxTotal": "decimal",
   "handlingTotal": "decimal",
   "hasDraft": "bool",
   "id": "string",
   "importDate": "DateTime",
   "invalidCoupons": [
      {
         "couponCode": "string",
         "createDate": "DateTime",
         "discountId": "int",
         "reason": "string",
         "reasonCode": "int"
      }
   ],
   "ipAddress": "string",
   "isDraft": "bool",
   "isEligibleForReturns": "bool",
   "isImport": "bool",
   "isTaxExempt": "bool",
   "items": [
      {
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "data": "string",
         "discountedTotal": "decimal",
         "discountTotal": "decimal",
         "dutyAmount": "decimal",
         "extendedTotal": "decimal",
         "feeTotal": "decimal",
         "fulfillmentLocationCode": "string",
         "fulfillmentMethod": "string",
         "handlingAmount": "decimal",
         "id": "string",
         "isRecurring": "bool",
         "isTaxable": "bool",
         "itemTaxTotal": "decimal",
         "lineId": "int",
         "localeCode": "string",
         "originalCartItemId": "string",
         "product": {
            "allocationExpiration": "DateTime",
            "allocationId": "int",
            "bundledProducts": [
               {
                  "allocationExpiration": "DateTime",
                  "allocationId": "int",
                  "creditValue": "decimal",
                  "description": "string",
                  "fulfillmentStatus": "string",
                  "goodsType": "string",
                  "isPackagedStandAlone": "bool",
                  "measurements": {
                     "height": {
                        "unit": "string",
                        "value": "decimal"
                     },
                     "length": {
                        "unit": "string",
                        "value": "decimal"
                     },
                     "weight": {
                        "unit": "string",
                        "value": "decimal"
                     },
                     "width": {
                        "unit": "string",
                        "value": "decimal"
                     }
                  },
                  "name": "string",
                  "optionAttributeFQN": "string",
                  "optionValue": "object",
                  "productCode": "string",
                  "productReservationId": "int",
                  "quantity": "int"
               }
            ],
            "categories": [
               {
                  "id": "int",
                  "parent": "self"
               }
            ],
            "description": "string",
            "discountsRestricted": "bool",
            "discountsRestrictedEndDate": "DateTime",
            "discountsRestrictedStartDate": "DateTime",
            "fulfillmentStatus": "string",
            "fulfillmentTypesSupported": "string",
            "goodsType": "string",
            "imageAlternateText": "string",
            "imageUrl": "string",
            "isPackagedStandAlone": "bool",
            "isRecurring": "bool",
            "isTaxable": "bool",
            "measurements": {
               "height": {
                  "unit": "string",
                  "value": "decimal"
               },
               "length": {
                  "unit": "string",
                  "value": "decimal"
               },
               "weight": {
                  "unit": "string",
                  "value": "decimal"
               },
               "width": {
                  "unit": "string",
                  "value": "decimal"
               }
            },
            "mfgPartNumber": "string",
            "name": "string",
            "options": [
               {
                  "attributeFQN": "string",
                  "dataType": "string",
                  "name": "string",
                  "shopperEnteredValue": "object",
                  "stringValue": "string",
                  "value": "object"
               }
            ],
            "price": {
               "creditValue": "decimal",
               "msrp": "decimal",
               "price": "decimal",
               "salePrice": "decimal",
               "tenantOverridePrice": "decimal"
            },
            "productCode": "string",
            "productReservationId": "int",
            "productType": "string",
            "productUsage": "string",
            "properties": [
               {
                  "attributeFQN": "string",
                  "dataType": "string",
                  "isMultiValue": "bool",
                  "name": "string",
                  "values": [
                     {
                        "stringValue": "string",
                        "value": "object"
                     }
                  ]
               }
            ],
            "upc": "string",
            "variationProductCode": "string"
         },
         "productDiscount": {
            "appliesToSalePrice": "bool",
            "couponCode": "string",
            "discount": {
               "expirationDate": "DateTime",
               "id": "int",
               "itemIds": "string",
               "name": "string"
            },
            "discountQuantity": "int",
            "excluded": "bool",
            "impact": "decimal",
            "impactPerUnit": "decimal",
            "productQuantity": "int"
         },
         "productDiscounts": [
            {
               "appliesToSalePrice": "bool",
               "couponCode": "string",
               "discount": {
                  "expirationDate": "DateTime",
                  "id": "int",
                  "itemIds": "string",
                  "name": "string"
               },
               "discountQuantity": "int",
               "excluded": "bool",
               "impact": "decimal",
               "impactPerUnit": "decimal",
               "productQuantity": "int"
            }
         ],
         "quantity": "int",
         "shippingDiscounts": [
            {
               "discount": {
                  "couponCode": "string",
                  "discount": {
                     "expirationDate": "DateTime",
                     "id": "int",
                     "itemIds": "string",
                     "name": "string"
                  },
                  "excluded": "bool",
                  "impact": "decimal"
               },
               "discountQuantity": "int",
               "impactPerUnit": "decimal",
               "methodCode": "string"
            }
         ],
         "shippingTaxTotal": "decimal",
         "shippingTotal": "decimal",
         "subtotal": "decimal",
         "taxableTotal": "decimal",
         "total": "decimal",
         "unitPrice": {
            "extendedAmount": "decimal",
            "listAmount": "decimal",
            "overrideAmount": "decimal",
            "saleAmount": "decimal"
         }
      }
   ],
   "itemTaxTotal": "decimal",
   "lastValidationDate": "DateTime",
   "locationCode": "string",
   "notes": [
      {
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "id": "string",
         "text": "string"
      }
   ],
   "orderDiscounts": [
      {
         "couponCode": "string",
         "discount": {
            "expirationDate": "DateTime",
            "id": "int",
            "itemIds": "string",
            "name": "string"
         },
         "excluded": "bool",
         "impact": "decimal"
      }
   ],
   "orderNumber": "int",
   "originalCartId": "string",
   "packages": [
      {
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "availableActions": "string",
         "changeMessages": [
            {
               "amount": "decimal",
               "appId": "string",
               "appKey": "string",
               "appName": "string",
               "correlationId": "string",
               "createDate": "DateTime",
               "id": "string",
               "identifier": "string",
               "message": "string",
               "metadata": "object",
               "newValue": "string",
               "oldValue": "string",
               "subject": "string",
               "subjectType": "string",
               "success": "bool",
               "userFirstName": "string",
               "userId": "string",
               "userLastName": "string",
               "userScopeType": "string",
               "verb": "string"
            }
         ],
         "code": "string",
         "fulfillmentDate": "DateTime",
         "fulfillmentLocationCode": "string",
         "hasLabel": "bool",
         "id": "string",
         "items": [
            {
               "fulfillmentItemType": "string",
               "lineId": "int",
               "productCode": "string",
               "quantity": "int"
            }
         ],
         "measurements": {
            "height": {
               "unit": "string",
               "value": "decimal"
            },
            "length": {
               "unit": "string",
               "value": "decimal"
            },
            "weight": {
               "unit": "string",
               "value": "decimal"
            },
            "width": {
               "unit": "string",
               "value": "decimal"
            }
         },
         "packagingType": "string",
         "shipmentId": "string",
         "shippingMethodCode": "string",
         "shippingMethodName": "string",
         "status": "string",
         "trackingNumber": "string"
      }
   ],
   "parentOrderId": "string",
   "parentReturnId": "string",
   "payments": [
      {
         "amountCollected": "decimal",
         "amountCredited": "decimal",
         "amountRequested": "decimal",
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "availableActions": "string",
         "billingInfo": {
            "auditInfo": {
               "createBy": "string",
               "createDate": "DateTime",
               "updateBy": "string",
               "updateDate": "DateTime"
            },
            "billingContact": {
               "address": {
                  "address1": "string",
                  "address2": "string",
                  "address3": "string",
                  "address4": "string",
                  "addressType": "string",
                  "cityOrTown": "string",
                  "countryCode": "string",
                  "isValidated": "bool",
                  "postalOrZipCode": "string",
                  "stateOrProvince": "string"
               },
               "companyOrOrganization": "string",
               "email": "string",
               "firstName": "string",
               "id": "int",
               "lastNameOrSurname": "string",
               "middleNameOrInitial": "string",
               "phoneNumbers": {
                  "home": "string",
                  "mobile": "string",
                  "work": "string"
               }
            },
            "card": {
               "cardNumberPartOrMask": "string",
               "expireMonth": "short",
               "expireYear": "short",
               "isCardInfoSaved": "bool",
               "isUsedRecurring": "bool",
               "nameOnCard": "string",
               "paymentOrCardType": "string",
               "paymentServiceCardId": "string"
            },
            "isSameBillingShippingAddress": "bool",
            "paymentType": "string",
            "storeCreditCode": "string"
         },
         "changeMessages": [
            {
               "amount": "decimal",
               "appId": "string",
               "appKey": "string",
               "appName": "string",
               "correlationId": "string",
               "createDate": "DateTime",
               "id": "string",
               "identifier": "string",
               "message": "string",
               "metadata": "object",
               "newValue": "string",
               "oldValue": "string",
               "subject": "string",
               "subjectType": "string",
               "success": "bool",
               "userFirstName": "string",
               "userId": "string",
               "userLastName": "string",
               "userScopeType": "string",
               "verb": "string"
            }
         ],
         "id": "string",
         "interactions": [
            {
               "amount": "decimal",
               "auditInfo": {
                  "createBy": "string",
                  "createDate": "DateTime",
                  "updateBy": "string",
                  "updateDate": "DateTime"
               },
               "checkNumber": "string",
               "currencyCode": "string",
               "gatewayAuthCode": "string",
               "gatewayAVSCodes": "string",
               "gatewayCVV2Codes": "string",
               "gatewayInteractionId": "int",
               "gatewayResponseCode": "string",
               "gatewayResponseText": "string",
               "gatewayTransactionId": "string",
               "id": "string",
               "interactionDate": "DateTime",
               "interactionType": "string",
               "isManual": "bool",
               "isRecurring": "bool",
               "note": "string",
               "orderId": "string",
               "paymentEntryStatus": "string",
               "paymentId": "string",
               "paymentTransactionInteractionIdReference": "int",
               "status": "string"
            }
         ],
         "isRecurring": "bool",
         "orderId": "string",
         "paymentServiceTransactionId": "string",
         "paymentType": "string",
         "status": "string"
      }
   ],
   "paymentStatus": "string",
   "pickups": [
      {
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "availableActions": "string",
         "changeMessages": [
            {
               "amount": "decimal",
               "appId": "string",
               "appKey": "string",
               "appName": "string",
               "correlationId": "string",
               "createDate": "DateTime",
               "id": "string",
               "identifier": "string",
               "message": "string",
               "metadata": "object",
               "newValue": "string",
               "oldValue": "string",
               "subject": "string",
               "subjectType": "string",
               "success": "bool",
               "userFirstName": "string",
               "userId": "string",
               "userLastName": "string",
               "userScopeType": "string",
               "verb": "string"
            }
         ],
         "code": "string",
         "fulfillmentDate": "DateTime",
         "fulfillmentLocationCode": "string",
         "id": "string",
         "items": [
            {
               "fulfillmentItemType": "string",
               "lineId": "int",
               "productCode": "string",
               "quantity": "int"
            }
         ],
         "status": "string"
      }
   ],
   "refunds": [
      {
         "amount": "decimal",
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "id": "string",
         "orderId": "string",
         "payment": {
            "amountCollected": "decimal",
            "amountCredited": "decimal",
            "amountRequested": "decimal",
            "auditInfo": {
               "createBy": "string",
               "createDate": "DateTime",
               "updateBy": "string",
               "updateDate": "DateTime"
            },
            "availableActions": "string",
            "billingInfo": {
               "auditInfo": {
                  "createBy": "string",
                  "createDate": "DateTime",
                  "updateBy": "string",
                  "updateDate": "DateTime"
               },
               "billingContact": {
                  "address": {
                     "address1": "string",
                     "address2": "string",
                     "address3": "string",
                     "address4": "string",
                     "addressType": "string",
                     "cityOrTown": "string",
                     "countryCode": "string",
                     "isValidated": "bool",
                     "postalOrZipCode": "string",
                     "stateOrProvince": "string"
                  },
                  "companyOrOrganization": "string",
                  "email": "string",
                  "firstName": "string",
                  "id": "int",
                  "lastNameOrSurname": "string",
                  "middleNameOrInitial": "string",
                  "phoneNumbers": {
                     "home": "string",
                     "mobile": "string",
                     "work": "string"
                  }
               },
               "card": {
                  "cardNumberPartOrMask": "string",
                  "expireMonth": "short",
                  "expireYear": "short",
                  "isCardInfoSaved": "bool",
                  "isUsedRecurring": "bool",
                  "nameOnCard": "string",
                  "paymentOrCardType": "string",
                  "paymentServiceCardId": "string"
               },
               "isSameBillingShippingAddress": "bool",
               "paymentType": "string",
               "storeCreditCode": "string"
            },
            "changeMessages": [
               {
                  "amount": "decimal",
                  "appId": "string",
                  "appKey": "string",
                  "appName": "string",
                  "correlationId": "string",
                  "createDate": "DateTime",
                  "id": "string",
                  "identifier": "string",
                  "message": "string",
                  "metadata": "object",
                  "newValue": "string",
                  "oldValue": "string",
                  "subject": "string",
                  "subjectType": "string",
                  "success": "bool",
                  "userFirstName": "string",
                  "userId": "string",
                  "userLastName": "string",
                  "userScopeType": "string",
                  "verb": "string"
               }
            ],
            "id": "string",
            "interactions": [
               {
                  "amount": "decimal",
                  "auditInfo": {
                     "createBy": "string",
                     "createDate": "DateTime",
                     "updateBy": "string",
                     "updateDate": "DateTime"
                  },
                  "checkNumber": "string",
                  "currencyCode": "string",
                  "gatewayAuthCode": "string",
                  "gatewayAVSCodes": "string",
                  "gatewayCVV2Codes": "string",
                  "gatewayInteractionId": "int",
                  "gatewayResponseCode": "string",
                  "gatewayResponseText": "string",
                  "gatewayTransactionId": "string",
                  "id": "string",
                  "interactionDate": "DateTime",
                  "interactionType": "string",
                  "isManual": "bool",
                  "isRecurring": "bool",
                  "note": "string",
                  "orderId": "string",
                  "paymentEntryStatus": "string",
                  "paymentId": "string",
                  "paymentTransactionInteractionIdReference": "int",
                  "status": "string"
               }
            ],
            "isRecurring": "bool",
            "orderId": "string",
            "paymentServiceTransactionId": "string",
            "paymentType": "string",
            "status": "string"
         },
         "reason": "string"
      }
   ],
   "returnStatus": "string",
   "shipments": [
      {
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "cost": "decimal",
         "currencyCode": "string",
         "destinationAddress": {
            "address": {
               "address1": "string",
               "address2": "string",
               "address3": "string",
               "address4": "string",
               "addressType": "string",
               "cityOrTown": "string",
               "countryCode": "string",
               "isValidated": "bool",
               "postalOrZipCode": "string",
               "stateOrProvince": "string"
            },
            "companyOrOrganization": "string",
            "email": "string",
            "firstName": "string",
            "id": "int",
            "lastNameOrSurname": "string",
            "middleNameOrInitial": "string",
            "phoneNumbers": {
               "home": "string",
               "mobile": "string",
               "work": "string"
            }
         },
         "id": "string",
         "originAddress": {
            "address": {
               "address1": "string",
               "address2": "string",
               "address3": "string",
               "address4": "string",
               "addressType": "string",
               "cityOrTown": "string",
               "countryCode": "string",
               "isValidated": "bool",
               "postalOrZipCode": "string",
               "stateOrProvince": "string"
            },
            "companyOrOrganization": "string",
            "email": "string",
            "firstName": "string",
            "id": "int",
            "lastNameOrSurname": "string",
            "middleNameOrInitial": "string",
            "phoneNumbers": {
               "home": "string",
               "mobile": "string",
               "work": "string"
            }
         },
         "packageIds": "string",
         "shippingMethodCode": "string",
         "signatureRequired": "bool",
         "trackingNumber": "string"
      }
   ],
   "shippingAdjustment": {
      "amount": "decimal",
      "description": "string",
      "internalComment": "string"
   },
   "shippingDiscounts": [
      {
         "discount": {
            "couponCode": "string",
            "discount": {
               "expirationDate": "DateTime",
               "id": "int",
               "itemIds": "string",
               "name": "string"
            },
            "excluded": "bool",
            "impact": "decimal"
         },
         "methodCode": "string"
      }
   ],
   "shippingSubTotal": "decimal",
   "shippingTaxTotal": "decimal",
   "shippingTotal": "decimal",
   "shopperNotes": {
      "comments": "string",
      "giftMessage": "string"
   },
   "siteId": "int",
   "sourceDevice": "string",
   "status": "string",
   "submittedDate": "DateTime",
   "subtotal": "decimal",
   "taxTotal": "decimal",
   "tenantId": "int",
   "total": "decimal",
   "totalCollected": "decimal",
   "type": "string",
   "validationResults": [
      {
         "createdDate": "DateTime",
         "messages": [
            {
               "message": "string",
               "messageType": "string",
               "orderItemId": "string"
            }
         ],
         "status": "string",
         "validationId": "string",
         "validatorName": "string",
         "validatorType": "string"
      }
   ],
   "version": "string",
   "visitId": "string",
   "webSessionId": "string"
}
```

For information about the properties in the response, refer to the [REST API Help](/api-overviews/openapi_commerce_overview).

### exec.setItemData

Sets custom key/value data on an order item.

| Parameter | Type   | Description                                        |
| --------- | ------ | -------------------------------------------------- |
| key       | string | Key of the data to set on the order item.          |
| value     | object | Value of the data to set.                          |
| itemId    | string | Id of the order item to which the data is applied. |

Example:

```
context.exec.setItemData("customField", value, "123");
```

Response:

```
{
   "auditInfo": {
      "createBy": "string",
      "createDate": "DateTime",
      "updateBy": "string",
      "updateDate": "DateTime"
   },
   "data": "string",
   "discountedTotal": "decimal",
   "discountTotal": "decimal",
   "dutyAmount": "decimal",
   "extendedTotal": "decimal",
   "feeTotal": "decimal",
   "fulfillmentLocationCode": "string",
   "fulfillmentMethod": "string",
   "handlingAmount": "decimal",
   "id": "string",
   "isRecurring": "bool",
   "isTaxable": "bool",
   "itemTaxTotal": "decimal",
   "lineId": "int",
   "localeCode": "string",
   "originalCartItemId": "string",
   "product": {
      "allocationExpiration": "DateTime",
      "allocationId": "int",
      "bundledProducts": [
         {
            "allocationExpiration": "DateTime",
            "allocationId": "int",
            "creditValue": "decimal",
            "description": "string",
            "fulfillmentStatus": "string",
            "goodsType": "string",
            "isPackagedStandAlone": "bool",
            "measurements": {
               "height": {
                  "unit": "string",
                  "value": "decimal"
               },
               "length": {
                  "unit": "string",
                  "value": "decimal"
               },
               "weight": {
                  "unit": "string",
                  "value": "decimal"
               },
               "width": {
                  "unit": "string",
                  "value": "decimal"
               }
            },
            "name": "string",
            "optionAttributeFQN": "string",
            "optionValue": "object",
            "productCode": "string",
            "productReservationId": "int",
            "quantity": "int"
         }
      ],
      "categories": [
         {
            "id": "int",
            "parent": "self"
         }
      ],
      "description": "string",
      "discountsRestricted": "bool",
      "discountsRestrictedEndDate": "DateTime",
      "discountsRestrictedStartDate": "DateTime",
      "fulfillmentStatus": "string",
      "fulfillmentTypesSupported": "string",
      "goodsType": "string",
      "imageAlternateText": "string",
      "imageUrl": "string",
      "isPackagedStandAlone": "bool",
      "isRecurring": "bool",
      "isTaxable": "bool",
      "measurements": {
         "height": {
            "unit": "string",
            "value": "decimal"
         },
         "length": {
            "unit": "string",
            "value": "decimal"
         },
         "weight": {
            "unit": "string",
            "value": "decimal"
         },
         "width": {
            "unit": "string",
            "value": "decimal"
         }
      },
      "mfgPartNumber": "string",
      "name": "string",
      "options": [
         {
            "attributeFQN": "string",
            "dataType": "string",
            "name": "string",
            "shopperEnteredValue": "object",
            "stringValue": "string",
            "value": "object"
         }
      ],
      "price": {
         "creditValue": "decimal",
         "msrp": "decimal",
         "price": "decimal",
         "salePrice": "decimal",
         "tenantOverridePrice": "decimal"
      },
      "productCode": "string",
      "productReservationId": "int",
      "productType": "string",
      "productUsage": "string",
      "properties": [
         {
            "attributeFQN": "string",
            "dataType": "string",
            "isMultiValue": "bool",
            "name": "string",
            "values": [
               {
                  "stringValue": "string",
                  "value": "object"
               }
            ]
         }
      ],
      "upc": "string",
      "variationProductCode": "string"
   },
   "productDiscount": {
      "appliesToSalePrice": "bool",
      "couponCode": "string",
      "discount": {
         "expirationDate": "DateTime",
         "id": "int",
         "itemIds": "string",
         "name": "string"
      },
      "discountQuantity": "int",
      "excluded": "bool",
      "impact": "decimal",
      "impactPerUnit": "decimal",
      "productQuantity": "int"
   },
   "productDiscounts": [
      {
         "appliesToSalePrice": "bool",
         "couponCode": "string",
         "discount": {
            "expirationDate": "DateTime",
            "id": "int",
            "itemIds": "string",
            "name": "string"
         },
         "discountQuantity": "int",
         "excluded": "bool",
         "impact": "decimal",
         "impactPerUnit": "decimal",
         "productQuantity": "int"
      }
   ],
   "quantity": "int",
   "shippingDiscounts": [
      {
         "discount": {
            "couponCode": "string",
            "discount": {
               "expirationDate": "DateTime",
               "id": "int",
               "itemIds": "string",
               "name": "string"
            },
            "excluded": "bool",
            "impact": "decimal"
         },
         "discountQuantity": "int",
         "impactPerUnit": "decimal",
         "methodCode": "string"
      }
   ],
   "shippingTaxTotal": "decimal",
   "shippingTotal": "decimal",
   "subtotal": "decimal",
   "taxableTotal": "decimal",
   "total": "decimal",
   "unitPrice": {
      "extendedAmount": "decimal",
      "listAmount": "decimal",
      "overrideAmount": "decimal",
      "saleAmount": "decimal"
   }
}
```

For information about the properties in the response, refer to the [REST API Help](/api-overviews/openapi_commerce_overview).

### exec.removeItemData

Removes custom key/value data from an order item.

| Parameter | Type   | Description                                                                                                                                                                 |
| --------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| key       | string | Key of the data to remove from the order item.                                                                                                                              |
| itemId    | string | Id of the item from which to remove data if applied to a line item that is not the current line item. Current line item only applies when called from an order item action. |

Example:

```
context.exec.removeItemData("customField", "123");
```

Response:

```
{
   "auditInfo": {
      "createBy": "string",
      "createDate": "DateTime",
      "updateBy": "string",
      "updateDate": "DateTime"
   },
   "data": "string",
   "discountedTotal": "decimal",
   "discountTotal": "decimal",
   "dutyAmount": "decimal",
   "extendedTotal": "decimal",
   "feeTotal": "decimal",
   "fulfillmentLocationCode": "string",
   "fulfillmentMethod": "string",
   "handlingAmount": "decimal",
   "id": "string",
   "isRecurring": "bool",
   "isTaxable": "bool",
   "itemTaxTotal": "decimal",
   "lineId": "int",
   "localeCode": "string",
   "originalCartItemId": "string",
   "product": {
      "allocationExpiration": "DateTime",
      "allocationId": "int",
      "bundledProducts": [
         {
            "allocationExpiration": "DateTime",
            "allocationId": "int",
            "creditValue": "decimal",
            "description": "string",
            "fulfillmentStatus": "string",
            "goodsType": "string",
            "isPackagedStandAlone": "bool",
            "measurements": {
               "height": {
                  "unit": "string",
                  "value": "decimal"
               },
               "length": {
                  "unit": "string",
                  "value": "decimal"
               },
               "weight": {
                  "unit": "string",
                  "value": "decimal"
               },
               "width": {
                  "unit": "string",
                  "value": "decimal"
               }
            },
            "name": "string",
            "optionAttributeFQN": "string",
            "optionValue": "object",
            "productCode": "string",
            "productReservationId": "int",
            "quantity": "int"
         }
      ],
      "categories": [
         {
            "id": "int",
            "parent": "self"
         }
      ],
      "description": "string",
      "discountsRestricted": "bool",
      "discountsRestrictedEndDate": "DateTime",
      "discountsRestrictedStartDate": "DateTime",
      "fulfillmentStatus": "string",
      "fulfillmentTypesSupported": "string",
      "goodsType": "string",
      "imageAlternateText": "string",
      "imageUrl": "string",
      "isPackagedStandAlone": "bool",
      "isRecurring": "bool",
      "isTaxable": "bool",
      "measurements": {
         "height": {
            "unit": "string",
            "value": "decimal"
         },
         "length": {
            "unit": "string",
            "value": "decimal"
         },
         "weight": {
            "unit": "string",
            "value": "decimal"
         },
         "width": {
            "unit": "string",
            "value": "decimal"
         }
      },
      "mfgPartNumber": "string",
      "name": "string",
      "options": [
         {
            "attributeFQN": "string",
            "dataType": "string",
            "name": "string",
            "shopperEnteredValue": "object",
            "stringValue": "string",
            "value": "object"
         }
      ],
      "price": {
         "creditValue": "decimal",
         "msrp": "decimal",
         "price": "decimal",
         "salePrice": "decimal",
         "tenantOverridePrice": "decimal"
      },
      "productCode": "string",
      "productReservationId": "int",
      "productType": "string",
      "productUsage": "string",
      "properties": [
         {
            "attributeFQN": "string",
            "dataType": "string",
            "isMultiValue": "bool",
            "name": "string",
            "values": [
               {
                  "stringValue": "string",
                  "value": "object"
               }
            ]
         }
      ],
      "upc": "string",
      "variationProductCode": "string"
   },
   "productDiscount": {
      "appliesToSalePrice": "bool",
      "couponCode": "string",
      "discount": {
         "expirationDate": "DateTime",
         "id": "int",
         "itemIds": "string",
         "name": "string"
      },
      "discountQuantity": "int",
      "excluded": "bool",
      "impact": "decimal",
      "impactPerUnit": "decimal",
      "productQuantity": "int"
   },
   "productDiscounts": [
      {
         "appliesToSalePrice": "bool",
         "couponCode": "string",
         "discount": {
            "expirationDate": "DateTime",
            "id": "int",
            "itemIds": "string",
            "name": "string"
         },
         "discountQuantity": "int",
         "excluded": "bool",
         "impact": "decimal",
         "impactPerUnit": "decimal",
         "productQuantity": "int"
      }
   ],
   "quantity": "int",
   "shippingDiscounts": [
      {
         "discount": {
            "couponCode": "string",
            "discount": {
               "expirationDate": "DateTime",
               "id": "int",
               "itemIds": "string",
               "name": "string"
            },
            "excluded": "bool",
            "impact": "decimal"
         },
         "discountQuantity": "int",
         "impactPerUnit": "decimal",
         "methodCode": "string"
      }
   ],
   "shippingTaxTotal": "decimal",
   "shippingTotal": "decimal",
   "subtotal": "decimal",
   "taxableTotal": "decimal",
   "total": "decimal",
   "unitPrice": {
      "extendedAmount": "decimal",
      "listAmount": "decimal",
      "overrideAmount": "decimal",
      "saleAmount": "decimal"
   }
}
```

For information about the properties in the response, refer to the [REST API Help](/api-overviews/openapi_commerce_overview).

### exec.setDutyAmount

Sets the duty amount applied to an order.

| Parameter  | Type   | Description                          |
| ---------- | ------ | ------------------------------------ |
| dutyAmount | number | The duty amount to set on the order. |

Example:

```
context.exec.setDutyAmount(8);
```

Response:

```
{
   "acceptedDate": "DateTime",
   "acceptsMarketing": "bool",
   "adjustment": {
      "amount": "decimal",
      "description": "string",
      "internalComment": "string"
   },
   "amountAvailableForRefund": "decimal",
   "amountRefunded": "decimal",
   "amountRemainingForPayment": "decimal",
   "attributes": [
      {
         "attributeDefinitionId": "int",
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "fullyQualifiedName": "string",
         "values": "object"
      }
   ],
   "auditInfo": {
      "createBy": "string",
      "createDate": "DateTime",
      "updateBy": "string",
      "updateDate": "DateTime"
   },
   "availableActions": "string",
   "billingInfo": {
      "auditInfo": {
         "createBy": "string",
         "createDate": "DateTime",
         "updateBy": "string",
         "updateDate": "DateTime"
      },
      "billingContact": {
         "address": {
            "address1": "string",
            "address2": "string",
            "address3": "string",
            "address4": "string",
            "addressType": "string",
            "cityOrTown": "string",
            "countryCode": "string",
            "isValidated": "bool",
            "postalOrZipCode": "string",
            "stateOrProvince": "string"
         },
         "companyOrOrganization": "string",
         "email": "string",
         "firstName": "string",
         "id": "int",
         "lastNameOrSurname": "string",
         "middleNameOrInitial": "string",
         "phoneNumbers": {
            "home": "string",
            "mobile": "string",
            "work": "string"
         }
      },
      "card": {
         "cardNumberPartOrMask": "string",
         "expireMonth": "short",
         "expireYear": "short",
         "isCardInfoSaved": "bool",
         "isUsedRecurring": "bool",
         "nameOnCard": "string",
         "paymentOrCardType": "string",
         "paymentServiceCardId": "string"
      },
      "isSameBillingShippingAddress": "bool",
      "paymentType": "string",
      "storeCreditCode": "string"
   },
   "cancelledDate": "DateTime",
   "changeMessages": [
      {
         "amount": "decimal",
         "appId": "string",
         "appKey": "string",
         "appName": "string",
         "correlationId": "string",
         "createDate": "DateTime",
         "id": "string",
         "identifier": "string",
         "message": "string",
         "metadata": "object",
         "newValue": "string",
         "oldValue": "string",
         "subject": "string",
         "subjectType": "string",
         "success": "bool",
         "userFirstName": "string",
         "userId": "string",
         "userLastName": "string",
         "userScopeType": "string",
         "verb": "string"
      }
   ],
   "channelCode": "string",
   "closedDate": "DateTime",
   "couponCodes": "string",
   "currencyCode": "string",
   "customerAccountId": "int",
   "customerInteractionType": "string",
   "customerTaxId": "string",
   "data": "string",
   "digitalPackages": [
      {
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "availableActions": "string",
         "changeMessages": [
            {
               "amount": "decimal",
               "appId": "string",
               "appKey": "string",
               "appName": "string",
               "correlationId": "string",
               "createDate": "DateTime",
               "id": "string",
               "identifier": "string",
               "message": "string",
               "metadata": "object",
               "newValue": "string",
               "oldValue": "string",
               "subject": "string",
               "subjectType": "string",
               "success": "bool",
               "userFirstName": "string",
               "userId": "string",
               "userLastName": "string",
               "userScopeType": "string",
               "verb": "string"
            }
         ],
         "code": "string",
         "fulfillmentDate": "DateTime",
         "fulfillmentLocationCode": "string",
         "id": "string",
         "items": [
            {
               "fulfillmentItemType": "string",
               "giftCardCode": "string",
               "lineId": "int",
               "productCode": "string",
               "quantity": "int"
            }
         ],
         "status": "string"
      }
   ],
   "discountedSubtotal": "decimal",
   "discountedTotal": "decimal",
   "discountTotal": "decimal",
   "dutyAmount": "decimal",
   "dutyTotal": "decimal",
   "email": "string",
   "expirationDate": "DateTime",
   "extendedProperties": [
      {
         "key": "string",
         "value": "string"
      }
   ],
   "externalId": "string",
   "feeTotal": "decimal",
   "fulfillmentInfo": {
      "auditInfo": {
         "createBy": "string",
         "createDate": "DateTime",
         "updateBy": "string",
         "updateDate": "DateTime"
      },
      "data": "string",
      "fulfillmentContact": {
         "address": {
            "address1": "string",
            "address2": "string",
            "address3": "string",
            "address4": "string",
            "addressType": "string",
            "cityOrTown": "string",
            "countryCode": "string",
            "isValidated": "bool",
            "postalOrZipCode": "string",
            "stateOrProvince": "string"
         },
         "companyOrOrganization": "string",
         "email": "string",
         "firstName": "string",
         "id": "int",
         "lastNameOrSurname": "string",
         "middleNameOrInitial": "string",
         "phoneNumbers": {
            "home": "string",
            "mobile": "string",
            "work": "string"
         }
      },
      "isDestinationCommercial": "bool",
      "shippingMethodCode": "string",
      "shippingMethodName": "string"
   },
   "fulfillmentStatus": "string",
   "handlingAmount": "decimal",
   "handlingDiscounts": [
      {
         "couponCode": "string",
         "discount": {
            "expirationDate": "DateTime",
            "id": "int",
            "itemIds": "string",
            "name": "string"
         },
         "excluded": "bool",
         "impact": "decimal"
      }
   ],
   "handlingSubTotal": "decimal",
   "handlingTaxTotal": "decimal",
   "handlingTotal": "decimal",
   "hasDraft": "bool",
   "id": "string",
   "importDate": "DateTime",
   "invalidCoupons": [
      {
         "couponCode": "string",
         "createDate": "DateTime",
         "discountId": "int",
         "reason": "string",
         "reasonCode": "int"
      }
   ],
   "ipAddress": "string",
   "isDraft": "bool",
   "isEligibleForReturns": "bool",
   "isImport": "bool",
   "isTaxExempt": "bool",
   "items": [
      {
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "data": "string",
         "discountedTotal": "decimal",
         "discountTotal": "decimal",
         "dutyAmount": "decimal",
         "extendedTotal": "decimal",
         "feeTotal": "decimal",
         "fulfillmentLocationCode": "string",
         "fulfillmentMethod": "string",
         "handlingAmount": "decimal",
         "id": "string",
         "isRecurring": "bool",
         "isTaxable": "bool",
         "itemTaxTotal": "decimal",
         "lineId": "int",
         "localeCode": "string",
         "originalCartItemId": "string",
         "product": {
            "allocationExpiration": "DateTime",
            "allocationId": "int",
            "bundledProducts": [
               {
                  "allocationExpiration": "DateTime",
                  "allocationId": "int",
                  "creditValue": "decimal",
                  "description": "string",
                  "fulfillmentStatus": "string",
                  "goodsType": "string",
                  "isPackagedStandAlone": "bool",
                  "measurements": {
                     "height": {
                        "unit": "string",
                        "value": "decimal"
                     },
                     "length": {
                        "unit": "string",
                        "value": "decimal"
                     },
                     "weight": {
                        "unit": "string",
                        "value": "decimal"
                     },
                     "width": {
                        "unit": "string",
                        "value": "decimal"
                     }
                  },
                  "name": "string",
                  "optionAttributeFQN": "string",
                  "optionValue": "object",
                  "productCode": "string",
                  "productReservationId": "int",
                  "quantity": "int"
               }
            ],
            "categories": [
               {
                  "id": "int",
                  "parent": "self"
               }
            ],
            "description": "string",
            "discountsRestricted": "bool",
            "discountsRestrictedEndDate": "DateTime",
            "discountsRestrictedStartDate": "DateTime",
            "fulfillmentStatus": "string",
            "fulfillmentTypesSupported": "string",
            "goodsType": "string",
            "imageAlternateText": "string",
            "imageUrl": "string",
            "isPackagedStandAlone": "bool",
            "isRecurring": "bool",
            "isTaxable": "bool",
            "measurements": {
               "height": {
                  "unit": "string",
                  "value": "decimal"
               },
               "length": {
                  "unit": "string",
                  "value": "decimal"
               },
               "weight": {
                  "unit": "string",
                  "value": "decimal"
               },
               "width": {
                  "unit": "string",
                  "value": "decimal"
               }
            },
            "mfgPartNumber": "string",
            "name": "string",
            "options": [
               {
                  "attributeFQN": "string",
                  "dataType": "string",
                  "name": "string",
                  "shopperEnteredValue": "object",
                  "stringValue": "string",
                  "value": "object"
               }
            ],
            "price": {
               "creditValue": "decimal",
               "msrp": "decimal",
               "price": "decimal",
               "salePrice": "decimal",
               "tenantOverridePrice": "decimal"
            },
            "productCode": "string",
            "productReservationId": "int",
            "productType": "string",
            "productUsage": "string",
            "properties": [
               {
                  "attributeFQN": "string",
                  "dataType": "string",
                  "isMultiValue": "bool",
                  "name": "string",
                  "values": [
                     {
                        "stringValue": "string",
                        "value": "object"
                     }
                  ]
               }
            ],
            "upc": "string",
            "variationProductCode": "string"
         },
         "productDiscount": {
            "appliesToSalePrice": "bool",
            "couponCode": "string",
            "discount": {
               "expirationDate": "DateTime",
               "id": "int",
               "itemIds": "string",
               "name": "string"
            },
            "discountQuantity": "int",
            "excluded": "bool",
            "impact": "decimal",
            "impactPerUnit": "decimal",
            "productQuantity": "int"
         },
         "productDiscounts": [
            {
               "appliesToSalePrice": "bool",
               "couponCode": "string",
               "discount": {
                  "expirationDate": "DateTime",
                  "id": "int",
                  "itemIds": "string",
                  "name": "string"
               },
               "discountQuantity": "int",
               "excluded": "bool",
               "impact": "decimal",
               "impactPerUnit": "decimal",
               "productQuantity": "int"
            }
         ],
         "quantity": "int",
         "shippingDiscounts": [
            {
               "discount": {
                  "couponCode": "string",
                  "discount": {
                     "expirationDate": "DateTime",
                     "id": "int",
                     "itemIds": "string",
                     "name": "string"
                  },
                  "excluded": "bool",
                  "impact": "decimal"
               },
               "discountQuantity": "int",
               "impactPerUnit": "decimal",
               "methodCode": "string"
            }
         ],
         "shippingTaxTotal": "decimal",
         "shippingTotal": "decimal",
         "subtotal": "decimal",
         "taxableTotal": "decimal",
         "total": "decimal",
         "unitPrice": {
            "extendedAmount": "decimal",
            "listAmount": "decimal",
            "overrideAmount": "decimal",
            "saleAmount": "decimal"
         }
      }
   ],
   "itemTaxTotal": "decimal",
   "lastValidationDate": "DateTime",
   "locationCode": "string",
   "notes": [
      {
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "id": "string",
         "text": "string"
      }
   ],
   "orderDiscounts": [
      {
         "couponCode": "string",
         "discount": {
            "expirationDate": "DateTime",
            "id": "int",
            "itemIds": "string",
            "name": "string"
         },
         "excluded": "bool",
         "impact": "decimal"
      }
   ],
   "orderNumber": "int",
   "originalCartId": "string",
   "packages": [
      {
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "availableActions": "string",
         "changeMessages": [
            {
               "amount": "decimal",
               "appId": "string",
               "appKey": "string",
               "appName": "string",
               "correlationId": "string",
               "createDate": "DateTime",
               "id": "string",
               "identifier": "string",
               "message": "string",
               "metadata": "object",
               "newValue": "string",
               "oldValue": "string",
               "subject": "string",
               "subjectType": "string",
               "success": "bool",
               "userFirstName": "string",
               "userId": "string",
               "userLastName": "string",
               "userScopeType": "string",
               "verb": "string"
            }
         ],
         "code": "string",
         "fulfillmentDate": "DateTime",
         "fulfillmentLocationCode": "string",
         "hasLabel": "bool",
         "id": "string",
         "items": [
            {
               "fulfillmentItemType": "string",
               "lineId": "int",
               "productCode": "string",
               "quantity": "int"
            }
         ],
         "measurements": {
            "height": {
               "unit": "string",
               "value": "decimal"
            },
            "length": {
               "unit": "string",
               "value": "decimal"
            },
            "weight": {
               "unit": "string",
               "value": "decimal"
            },
            "width": {
               "unit": "string",
               "value": "decimal"
            }
         },
         "packagingType": "string",
         "shipmentId": "string",
         "shippingMethodCode": "string",
         "shippingMethodName": "string",
         "status": "string",
         "trackingNumber": "string"
      }
   ],
   "parentOrderId": "string",
   "parentReturnId": "string",
   "payments": [
      {
         "amountCollected": "decimal",
         "amountCredited": "decimal",
         "amountRequested": "decimal",
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "availableActions": "string",
         "billingInfo": {
            "auditInfo": {
               "createBy": "string",
               "createDate": "DateTime",
               "updateBy": "string",
               "updateDate": "DateTime"
            },
            "billingContact": {
               "address": {
                  "address1": "string",
                  "address2": "string",
                  "address3": "string",
                  "address4": "string",
                  "addressType": "string",
                  "cityOrTown": "string",
                  "countryCode": "string",
                  "isValidated": "bool",
                  "postalOrZipCode": "string",
                  "stateOrProvince": "string"
               },
               "companyOrOrganization": "string",
               "email": "string",
               "firstName": "string",
               "id": "int",
               "lastNameOrSurname": "string",
               "middleNameOrInitial": "string",
               "phoneNumbers": {
                  "home": "string",
                  "mobile": "string",
                  "work": "string"
               }
            },
            "card": {
               "cardNumberPartOrMask": "string",
               "expireMonth": "short",
               "expireYear": "short",
               "isCardInfoSaved": "bool",
               "isUsedRecurring": "bool",
               "nameOnCard": "string",
               "paymentOrCardType": "string",
               "paymentServiceCardId": "string"
            },
            "isSameBillingShippingAddress": "bool",
            "paymentType": "string",
            "storeCreditCode": "string"
         },
         "changeMessages": [
            {
               "amount": "decimal",
               "appId": "string",
               "appKey": "string",
               "appName": "string",
               "correlationId": "string",
               "createDate": "DateTime",
               "id": "string",
               "identifier": "string",
               "message": "string",
               "metadata": "object",
               "newValue": "string",
               "oldValue": "string",
               "subject": "string",
               "subjectType": "string",
               "success": "bool",
               "userFirstName": "string",
               "userId": "string",
               "userLastName": "string",
               "userScopeType": "string",
               "verb": "string"
            }
         ],
         "id": "string",
         "interactions": [
            {
               "amount": "decimal",
               "auditInfo": {
                  "createBy": "string",
                  "createDate": "DateTime",
                  "updateBy": "string",
                  "updateDate": "DateTime"
               },
               "checkNumber": "string",
               "currencyCode": "string",
               "gatewayAuthCode": "string",
               "gatewayAVSCodes": "string",
               "gatewayCVV2Codes": "string",
               "gatewayInteractionId": "int",
               "gatewayResponseCode": "string",
               "gatewayResponseText": "string",
               "gatewayTransactionId": "string",
               "id": "string",
               "interactionDate": "DateTime",
               "interactionType": "string",
               "isManual": "bool",
               "isRecurring": "bool",
               "note": "string",
               "orderId": "string",
               "paymentEntryStatus": "string",
               "paymentId": "string",
               "paymentTransactionInteractionIdReference": "int",
               "status": "string"
            }
         ],
         "isRecurring": "bool",
         "orderId": "string",
         "paymentServiceTransactionId": "string",
         "paymentType": "string",
         "status": "string"
      }
   ],
   "paymentStatus": "string",
   "pickups": [
      {
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "availableActions": "string",
         "changeMessages": [
            {
               "amount": "decimal",
               "appId": "string",
               "appKey": "string",
               "appName": "string",
               "correlationId": "string",
               "createDate": "DateTime",
               "id": "string",
               "identifier": "string",
               "message": "string",
               "metadata": "object",
               "newValue": "string",
               "oldValue": "string",
               "subject": "string",
               "subjectType": "string",
               "success": "bool",
               "userFirstName": "string",
               "userId": "string",
               "userLastName": "string",
               "userScopeType": "string",
               "verb": "string"
            }
         ],
         "code": "string",
         "fulfillmentDate": "DateTime",
         "fulfillmentLocationCode": "string",
         "id": "string",
         "items": [
            {
               "fulfillmentItemType": "string",
               "lineId": "int",
               "productCode": "string",
               "quantity": "int"
            }
         ],
         "status": "string"
      }
   ],
   "refunds": [
      {
         "amount": "decimal",
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "id": "string",
         "orderId": "string",
         "payment": {
            "amountCollected": "decimal",
            "amountCredited": "decimal",
            "amountRequested": "decimal",
            "auditInfo": {
               "createBy": "string",
               "createDate": "DateTime",
               "updateBy": "string",
               "updateDate": "DateTime"
            },
            "availableActions": "string",
            "billingInfo": {
               "auditInfo": {
                  "createBy": "string",
                  "createDate": "DateTime",
                  "updateBy": "string",
                  "updateDate": "DateTime"
               },
               "billingContact": {
                  "address": {
                     "address1": "string",
                     "address2": "string",
                     "address3": "string",
                     "address4": "string",
                     "addressType": "string",
                     "cityOrTown": "string",
                     "countryCode": "string",
                     "isValidated": "bool",
                     "postalOrZipCode": "string",
                     "stateOrProvince": "string"
                  },
                  "companyOrOrganization": "string",
                  "email": "string",
                  "firstName": "string",
                  "id": "int",
                  "lastNameOrSurname": "string",
                  "middleNameOrInitial": "string",
                  "phoneNumbers": {
                     "home": "string",
                     "mobile": "string",
                     "work": "string"
                  }
               },
               "card": {
                  "cardNumberPartOrMask": "string",
                  "expireMonth": "short",
                  "expireYear": "short",
                  "isCardInfoSaved": "bool",
                  "isUsedRecurring": "bool",
                  "nameOnCard": "string",
                  "paymentOrCardType": "string",
                  "paymentServiceCardId": "string"
               },
               "isSameBillingShippingAddress": "bool",
               "paymentType": "string",
               "storeCreditCode": "string"
            },
            "changeMessages": [
               {
                  "amount": "decimal",
                  "appId": "string",
                  "appKey": "string",
                  "appName": "string",
                  "correlationId": "string",
                  "createDate": "DateTime",
                  "id": "string",
                  "identifier": "string",
                  "message": "string",
                  "metadata": "object",
                  "newValue": "string",
                  "oldValue": "string",
                  "subject": "string",
                  "subjectType": "string",
                  "success": "bool",
                  "userFirstName": "string",
                  "userId": "string",
                  "userLastName": "string",
                  "userScopeType": "string",
                  "verb": "string"
               }
            ],
            "id": "string",
            "interactions": [
               {
                  "amount": "decimal",
                  "auditInfo": {
                     "createBy": "string",
                     "createDate": "DateTime",
                     "updateBy": "string",
                     "updateDate": "DateTime"
                  },
                  "checkNumber": "string",
                  "currencyCode": "string",
                  "gatewayAuthCode": "string",
                  "gatewayAVSCodes": "string",
                  "gatewayCVV2Codes": "string",
                  "gatewayInteractionId": "int",
                  "gatewayResponseCode": "string",
                  "gatewayResponseText": "string",
                  "gatewayTransactionId": "string",
                  "id": "string",
                  "interactionDate": "DateTime",
                  "interactionType": "string",
                  "isManual": "bool",
                  "isRecurring": "bool",
                  "note": "string",
                  "orderId": "string",
                  "paymentEntryStatus": "string",
                  "paymentId": "string",
                  "paymentTransactionInteractionIdReference": "int",
                  "status": "string"
               }
            ],
            "isRecurring": "bool",
            "orderId": "string",
            "paymentServiceTransactionId": "string",
            "paymentType": "string",
            "status": "string"
         },
         "reason": "string"
      }
   ],
   "returnStatus": "string",
   "shipments": [
      {
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "cost": "decimal",
         "currencyCode": "string",
         "destinationAddress": {
            "address": {
               "address1": "string",
               "address2": "string",
               "address3": "string",
               "address4": "string",
               "addressType": "string",
               "cityOrTown": "string",
               "countryCode": "string",
               "isValidated": "bool",
               "postalOrZipCode": "string",
               "stateOrProvince": "string"
            },
            "companyOrOrganization": "string",
            "email": "string",
            "firstName": "string",
            "id": "int",
            "lastNameOrSurname": "string",
            "middleNameOrInitial": "string",
            "phoneNumbers": {
               "home": "string",
               "mobile": "string",
               "work": "string"
            }
         },
         "id": "string",
         "originAddress": {
            "address": {
               "address1": "string",
               "address2": "string",
               "address3": "string",
               "address4": "string",
               "addressType": "string",
               "cityOrTown": "string",
               "countryCode": "string",
               "isValidated": "bool",
               "postalOrZipCode": "string",
               "stateOrProvince": "string"
            },
            "companyOrOrganization": "string",
            "email": "string",
            "firstName": "string",
            "id": "int",
            "lastNameOrSurname": "string",
            "middleNameOrInitial": "string",
            "phoneNumbers": {
               "home": "string",
               "mobile": "string",
               "work": "string"
            }
         },
         "packageIds": "string",
         "shippingMethodCode": "string",
         "signatureRequired": "bool",
         "trackingNumber": "string"
      }
   ],
   "shippingAdjustment": {
      "amount": "decimal",
      "description": "string",
      "internalComment": "string"
   },
   "shippingDiscounts": [
      {
         "discount": {
            "couponCode": "string",
            "discount": {
               "expirationDate": "DateTime",
               "id": "int",
               "itemIds": "string",
               "name": "string"
            },
            "excluded": "bool",
            "impact": "decimal"
         },
         "methodCode": "string"
      }
   ],
   "shippingSubTotal": "decimal",
   "shippingTaxTotal": "decimal",
   "shippingTotal": "decimal",
   "shopperNotes": {
      "comments": "string",
      "giftMessage": "string"
   },
   "siteId": "int",
   "sourceDevice": "string",
   "status": "string",
   "submittedDate": "DateTime",
   "subtotal": "decimal",
   "taxTotal": "decimal",
   "tenantId": "int",
   "total": "decimal",
   "totalCollected": "decimal",
   "type": "string",
   "validationResults": [
      {
         "createdDate": "DateTime",
         "messages": [
            {
               "message": "string",
               "messageType": "string",
               "orderItemId": "string"
            }
         ],
         "status": "string",
         "validationId": "string",
         "validatorName": "string",
         "validatorType": "string"
      }
   ],
   "version": "string",
   "visitId": "string",
   "webSessionId": "string"
}
```

For information about the properties in the response, refer to the [REST API Help](/api-overviews/openapi_commerce_overview).

### exec.setHandlingAmount

Sets the handling amount applied to an order. This method is only available for the `embedded.commerce.orders.price.before` action. In addition, do not use both the `setHandlingAmount` and the `setItemHandlingAmount` methods within the same function, as this forces ambiguous adjustments on the handling amount.

| Parameter      | Type   | Description                              |
| -------------- | ------ | ---------------------------------------- |
| handlingAmount | number | The handling amount to set on the order. |

Example:

```
context.exec.setHandlingAmount(3.99);
```

Response:

```
{
   "acceptedDate": "DateTime",
   "acceptsMarketing": "bool",
   "adjustment": {
      "amount": "decimal",
      "description": "string",
      "internalComment": "string"
   },
   "amountAvailableForRefund": "decimal",
   "amountRefunded": "decimal",
   "amountRemainingForPayment": "decimal",
   "attributes": [
      {
         "attributeDefinitionId": "int",
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "fullyQualifiedName": "string",
         "values": "object"
      }
   ],
   "auditInfo": {
      "createBy": "string",
      "createDate": "DateTime",
      "updateBy": "string",
      "updateDate": "DateTime"
   },
   "availableActions": "string",
   "billingInfo": {
      "auditInfo": {
         "createBy": "string",
         "createDate": "DateTime",
         "updateBy": "string",
         "updateDate": "DateTime"
      },
      "billingContact": {
         "address": {
            "address1": "string",
            "address2": "string",
            "address3": "string",
            "address4": "string",
            "addressType": "string",
            "cityOrTown": "string",
            "countryCode": "string",
            "isValidated": "bool",
            "postalOrZipCode": "string",
            "stateOrProvince": "string"
         },
         "companyOrOrganization": "string",
         "email": "string",
         "firstName": "string",
         "id": "int",
         "lastNameOrSurname": "string",
         "middleNameOrInitial": "string",
         "phoneNumbers": {
            "home": "string",
            "mobile": "string",
            "work": "string"
         }
      },
      "card": {
         "cardNumberPartOrMask": "string",
         "expireMonth": "short",
         "expireYear": "short",
         "isCardInfoSaved": "bool",
         "isUsedRecurring": "bool",
         "nameOnCard": "string",
         "paymentOrCardType": "string",
         "paymentServiceCardId": "string"
      },
      "isSameBillingShippingAddress": "bool",
      "paymentType": "string",
      "storeCreditCode": "string"
   },
   "cancelledDate": "DateTime",
   "changeMessages": [
      {
         "amount": "decimal",
         "appId": "string",
         "appKey": "string",
         "appName": "string",
         "correlationId": "string",
         "createDate": "DateTime",
         "id": "string",
         "identifier": "string",
         "message": "string",
         "metadata": "object",
         "newValue": "string",
         "oldValue": "string",
         "subject": "string",
         "subjectType": "string",
         "success": "bool",
         "userFirstName": "string",
         "userId": "string",
         "userLastName": "string",
         "userScopeType": "string",
         "verb": "string"
      }
   ],
   "channelCode": "string",
   "closedDate": "DateTime",
   "couponCodes": "string",
   "currencyCode": "string",
   "customerAccountId": "int",
   "customerInteractionType": "string",
   "customerTaxId": "string",
   "data": "string",
   "digitalPackages": [
      {
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "availableActions": "string",
         "changeMessages": [
            {
               "amount": "decimal",
               "appId": "string",
               "appKey": "string",
               "appName": "string",
               "correlationId": "string",
               "createDate": "DateTime",
               "id": "string",
               "identifier": "string",
               "message": "string",
               "metadata": "object",
               "newValue": "string",
               "oldValue": "string",
               "subject": "string",
               "subjectType": "string",
               "success": "bool",
               "userFirstName": "string",
               "userId": "string",
               "userLastName": "string",
               "userScopeType": "string",
               "verb": "string"
            }
         ],
         "code": "string",
         "fulfillmentDate": "DateTime",
         "fulfillmentLocationCode": "string",
         "id": "string",
         "items": [
            {
               "fulfillmentItemType": "string",
               "giftCardCode": "string",
               "lineId": "int",
               "productCode": "string",
               "quantity": "int"
            }
         ],
         "status": "string"
      }
   ],
   "discountedSubtotal": "decimal",
   "discountedTotal": "decimal",
   "discountTotal": "decimal",
   "dutyAmount": "decimal",
   "dutyTotal": "decimal",
   "email": "string",
   "expirationDate": "DateTime",
   "extendedProperties": [
      {
         "key": "string",
         "value": "string"
      }
   ],
   "externalId": "string",
   "feeTotal": "decimal",
   "fulfillmentInfo": {
      "auditInfo": {
         "createBy": "string",
         "createDate": "DateTime",
         "updateBy": "string",
         "updateDate": "DateTime"
      },
      "data": "string",
      "fulfillmentContact": {
         "address": {
            "address1": "string",
            "address2": "string",
            "address3": "string",
            "address4": "string",
            "addressType": "string",
            "cityOrTown": "string",
            "countryCode": "string",
            "isValidated": "bool",
            "postalOrZipCode": "string",
            "stateOrProvince": "string"
         },
         "companyOrOrganization": "string",
         "email": "string",
         "firstName": "string",
         "id": "int",
         "lastNameOrSurname": "string",
         "middleNameOrInitial": "string",
         "phoneNumbers": {
            "home": "string",
            "mobile": "string",
            "work": "string"
         }
      },
      "isDestinationCommercial": "bool",
      "shippingMethodCode": "string",
      "shippingMethodName": "string"
   },
   "fulfillmentStatus": "string",
   "handlingAmount": "decimal",
   "handlingDiscounts": [
      {
         "couponCode": "string",
         "discount": {
            "expirationDate": "DateTime",
            "id": "int",
            "itemIds": "string",
            "name": "string"
         },
         "excluded": "bool",
         "impact": "decimal"
      }
   ],
   "handlingSubTotal": "decimal",
   "handlingTaxTotal": "decimal",
   "handlingTotal": "decimal",
   "hasDraft": "bool",
   "id": "string",
   "importDate": "DateTime",
   "invalidCoupons": [
      {
         "couponCode": "string",
         "createDate": "DateTime",
         "discountId": "int",
         "reason": "string",
         "reasonCode": "int"
      }
   ],
   "ipAddress": "string",
   "isDraft": "bool",
   "isEligibleForReturns": "bool",
   "isImport": "bool",
   "isTaxExempt": "bool",
   "items": [
      {
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "data": "string",
         "discountedTotal": "decimal",
         "discountTotal": "decimal",
         "dutyAmount": "decimal",
         "extendedTotal": "decimal",
         "feeTotal": "decimal",
         "fulfillmentLocationCode": "string",
         "fulfillmentMethod": "string",
         "handlingAmount": "decimal",
         "id": "string",
         "isRecurring": "bool",
         "isTaxable": "bool",
         "itemTaxTotal": "decimal",
         "lineId": "int",
         "localeCode": "string",
         "originalCartItemId": "string",
         "product": {
            "allocationExpiration": "DateTime",
            "allocationId": "int",
            "bundledProducts": [
               {
                  "allocationExpiration": "DateTime",
                  "allocationId": "int",
                  "creditValue": "decimal",
                  "description": "string",
                  "fulfillmentStatus": "string",
                  "goodsType": "string",
                  "isPackagedStandAlone": "bool",
                  "measurements": {
                     "height": {
                        "unit": "string",
                        "value": "decimal"
                     },
                     "length": {
                        "unit": "string",
                        "value": "decimal"
                     },
                     "weight": {
                        "unit": "string",
                        "value": "decimal"
                     },
                     "width": {
                        "unit": "string",
                        "value": "decimal"
                     }
                  },
                  "name": "string",
                  "optionAttributeFQN": "string",
                  "optionValue": "object",
                  "productCode": "string",
                  "productReservationId": "int",
                  "quantity": "int"
               }
            ],
            "categories": [
               {
                  "id": "int",
                  "parent": "self"
               }
            ],
            "description": "string",
            "discountsRestricted": "bool",
            "discountsRestrictedEndDate": "DateTime",
            "discountsRestrictedStartDate": "DateTime",
            "fulfillmentStatus": "string",
            "fulfillmentTypesSupported": "string",
            "goodsType": "string",
            "imageAlternateText": "string",
            "imageUrl": "string",
            "isPackagedStandAlone": "bool",
            "isRecurring": "bool",
            "isTaxable": "bool",
            "measurements": {
               "height": {
                  "unit": "string",
                  "value": "decimal"
               },
               "length": {
                  "unit": "string",
                  "value": "decimal"
               },
               "weight": {
                  "unit": "string",
                  "value": "decimal"
               },
               "width": {
                  "unit": "string",
                  "value": "decimal"
               }
            },
            "mfgPartNumber": "string",
            "name": "string",
            "options": [
               {
                  "attributeFQN": "string",
                  "dataType": "string",
                  "name": "string",
                  "shopperEnteredValue": "object",
                  "stringValue": "string",
                  "value": "object"
               }
            ],
            "price": {
               "creditValue": "decimal",
               "msrp": "decimal",
               "price": "decimal",
               "salePrice": "decimal",
               "tenantOverridePrice": "decimal"
            },
            "productCode": "string",
            "productReservationId": "int",
            "productType": "string",
            "productUsage": "string",
            "properties": [
               {
                  "attributeFQN": "string",
                  "dataType": "string",
                  "isMultiValue": "bool",
                  "name": "string",
                  "values": [
                     {
                        "stringValue": "string",
                        "value": "object"
                     }
                  ]
               }
            ],
            "upc": "string",
            "variationProductCode": "string"
         },
         "productDiscount": {
            "appliesToSalePrice": "bool",
            "couponCode": "string",
            "discount": {
               "expirationDate": "DateTime",
               "id": "int",
               "itemIds": "string",
               "name": "string"
            },
            "discountQuantity": "int",
            "excluded": "bool",
            "impact": "decimal",
            "impactPerUnit": "decimal",
            "productQuantity": "int"
         },
         "productDiscounts": [
            {
               "appliesToSalePrice": "bool",
               "couponCode": "string",
               "discount": {
                  "expirationDate": "DateTime",
                  "id": "int",
                  "itemIds": "string",
                  "name": "string"
               },
               "discountQuantity": "int",
               "excluded": "bool",
               "impact": "decimal",
               "impactPerUnit": "decimal",
               "productQuantity": "int"
            }
         ],
         "quantity": "int",
         "shippingDiscounts": [
            {
               "discount": {
                  "couponCode": "string",
                  "discount": {
                     "expirationDate": "DateTime",
                     "id": "int",
                     "itemIds": "string",
                     "name": "string"
                  },
                  "excluded": "bool",
                  "impact": "decimal"
               },
               "discountQuantity": "int",
               "impactPerUnit": "decimal",
               "methodCode": "string"
            }
         ],
         "shippingTaxTotal": "decimal",
         "shippingTotal": "decimal",
         "subtotal": "decimal",
         "taxableTotal": "decimal",
         "total": "decimal",
         "unitPrice": {
            "extendedAmount": "decimal",
            "listAmount": "decimal",
            "overrideAmount": "decimal",
            "saleAmount": "decimal"
         }
      }
   ],
   "itemTaxTotal": "decimal",
   "lastValidationDate": "DateTime",
   "locationCode": "string",
   "notes": [
      {
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "id": "string",
         "text": "string"
      }
   ],
   "orderDiscounts": [
      {
         "couponCode": "string",
         "discount": {
            "expirationDate": "DateTime",
            "id": "int",
            "itemIds": "string",
            "name": "string"
         },
         "excluded": "bool",
         "impact": "decimal"
      }
   ],
   "orderNumber": "int",
   "originalCartId": "string",
   "packages": [
      {
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "availableActions": "string",
         "changeMessages": [
            {
               "amount": "decimal",
               "appId": "string",
               "appKey": "string",
               "appName": "string",
               "correlationId": "string",
               "createDate": "DateTime",
               "id": "string",
               "identifier": "string",
               "message": "string",
               "metadata": "object",
               "newValue": "string",
               "oldValue": "string",
               "subject": "string",
               "subjectType": "string",
               "success": "bool",
               "userFirstName": "string",
               "userId": "string",
               "userLastName": "string",
               "userScopeType": "string",
               "verb": "string"
            }
         ],
         "code": "string",
         "fulfillmentDate": "DateTime",
         "fulfillmentLocationCode": "string",
         "hasLabel": "bool",
         "id": "string",
         "items": [
            {
               "fulfillmentItemType": "string",
               "lineId": "int",
               "productCode": "string",
               "quantity": "int"
            }
         ],
         "measurements": {
            "height": {
               "unit": "string",
               "value": "decimal"
            },
            "length": {
               "unit": "string",
               "value": "decimal"
            },
            "weight": {
               "unit": "string",
               "value": "decimal"
            },
            "width": {
               "unit": "string",
               "value": "decimal"
            }
         },
         "packagingType": "string",
         "shipmentId": "string",
         "shippingMethodCode": "string",
         "shippingMethodName": "string",
         "status": "string",
         "trackingNumber": "string"
      }
   ],
   "parentOrderId": "string",
   "parentReturnId": "string",
   "payments": [
      {
         "amountCollected": "decimal",
         "amountCredited": "decimal",
         "amountRequested": "decimal",
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "availableActions": "string",
         "billingInfo": {
            "auditInfo": {
               "createBy": "string",
               "createDate": "DateTime",
               "updateBy": "string",
               "updateDate": "DateTime"
            },
            "billingContact": {
               "address": {
                  "address1": "string",
                  "address2": "string",
                  "address3": "string",
                  "address4": "string",
                  "addressType": "string",
                  "cityOrTown": "string",
                  "countryCode": "string",
                  "isValidated": "bool",
                  "postalOrZipCode": "string",
                  "stateOrProvince": "string"
               },
               "companyOrOrganization": "string",
               "email": "string",
               "firstName": "string",
               "id": "int",
               "lastNameOrSurname": "string",
               "middleNameOrInitial": "string",
               "phoneNumbers": {
                  "home": "string",
                  "mobile": "string",
                  "work": "string"
               }
            },
            "card": {
               "cardNumberPartOrMask": "string",
               "expireMonth": "short",
               "expireYear": "short",
               "isCardInfoSaved": "bool",
               "isUsedRecurring": "bool",
               "nameOnCard": "string",
               "paymentOrCardType": "string",
               "paymentServiceCardId": "string"
            },
            "isSameBillingShippingAddress": "bool",
            "paymentType": "string",
            "storeCreditCode": "string"
         },
         "changeMessages": [
            {
               "amount": "decimal",
               "appId": "string",
               "appKey": "string",
               "appName": "string",
               "correlationId": "string",
               "createDate": "DateTime",
               "id": "string",
               "identifier": "string",
               "message": "string",
               "metadata": "object",
               "newValue": "string",
               "oldValue": "string",
               "subject": "string",
               "subjectType": "string",
               "success": "bool",
               "userFirstName": "string",
               "userId": "string",
               "userLastName": "string",
               "userScopeType": "string",
               "verb": "string"
            }
         ],
         "id": "string",
         "interactions": [
            {
               "amount": "decimal",
               "auditInfo": {
                  "createBy": "string",
                  "createDate": "DateTime",
                  "updateBy": "string",
                  "updateDate": "DateTime"
               },
               "checkNumber": "string",
               "currencyCode": "string",
               "gatewayAuthCode": "string",
               "gatewayAVSCodes": "string",
               "gatewayCVV2Codes": "string",
               "gatewayInteractionId": "int",
               "gatewayResponseCode": "string",
               "gatewayResponseText": "string",
               "gatewayTransactionId": "string",
               "id": "string",
               "interactionDate": "DateTime",
               "interactionType": "string",
               "isManual": "bool",
               "isRecurring": "bool",
               "note": "string",
               "orderId": "string",
               "paymentEntryStatus": "string",
               "paymentId": "string",
               "paymentTransactionInteractionIdReference": "int",
               "status": "string"
            }
         ],
         "isRecurring": "bool",
         "orderId": "string",
         "paymentServiceTransactionId": "string",
         "paymentType": "string",
         "status": "string"
      }
   ],
   "paymentStatus": "string",
   "pickups": [
      {
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "availableActions": "string",
         "changeMessages": [
            {
               "amount": "decimal",
               "appId": "string",
               "appKey": "string",
               "appName": "string",
               "correlationId": "string",
               "createDate": "DateTime",
               "id": "string",
               "identifier": "string",
               "message": "string",
               "metadata": "object",
               "newValue": "string",
               "oldValue": "string",
               "subject": "string",
               "subjectType": "string",
               "success": "bool",
               "userFirstName": "string",
               "userId": "string",
               "userLastName": "string",
               "userScopeType": "string",
               "verb": "string"
            }
         ],
         "code": "string",
         "fulfillmentDate": "DateTime",
         "fulfillmentLocationCode": "string",
         "id": "string",
         "items": [
            {
               "fulfillmentItemType": "string",
               "lineId": "int",
               "productCode": "string",
               "quantity": "int"
            }
         ],
         "status": "string"
      }
   ],
   "refunds": [
      {
         "amount": "decimal",
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "id": "string",
         "orderId": "string",
         "payment": {
            "amountCollected": "decimal",
            "amountCredited": "decimal",
            "amountRequested": "decimal",
            "auditInfo": {
               "createBy": "string",
               "createDate": "DateTime",
               "updateBy": "string",
               "updateDate": "DateTime"
            },
            "availableActions": "string",
            "billingInfo": {
               "auditInfo": {
                  "createBy": "string",
                  "createDate": "DateTime",
                  "updateBy": "string",
                  "updateDate": "DateTime"
               },
               "billingContact": {
                  "address": {
                     "address1": "string",
                     "address2": "string",
                     "address3": "string",
                     "address4": "string",
                     "addressType": "string",
                     "cityOrTown": "string",
                     "countryCode": "string",
                     "isValidated": "bool",
                     "postalOrZipCode": "string",
                     "stateOrProvince": "string"
                  },
                  "companyOrOrganization": "string",
                  "email": "string",
                  "firstName": "string",
                  "id": "int",
                  "lastNameOrSurname": "string",
                  "middleNameOrInitial": "string",
                  "phoneNumbers": {
                     "home": "string",
                     "mobile": "string",
                     "work": "string"
                  }
               },
               "card": {
                  "cardNumberPartOrMask": "string",
                  "expireMonth": "short",
                  "expireYear": "short",
                  "isCardInfoSaved": "bool",
                  "isUsedRecurring": "bool",
                  "nameOnCard": "string",
                  "paymentOrCardType": "string",
                  "paymentServiceCardId": "string"
               },
               "isSameBillingShippingAddress": "bool",
               "paymentType": "string",
               "storeCreditCode": "string"
            },
            "changeMessages": [
               {
                  "amount": "decimal",
                  "appId": "string",
                  "appKey": "string",
                  "appName": "string",
                  "correlationId": "string",
                  "createDate": "DateTime",
                  "id": "string",
                  "identifier": "string",
                  "message": "string",
                  "metadata": "object",
                  "newValue": "string",
                  "oldValue": "string",
                  "subject": "string",
                  "subjectType": "string",
                  "success": "bool",
                  "userFirstName": "string",
                  "userId": "string",
                  "userLastName": "string",
                  "userScopeType": "string",
                  "verb": "string"
               }
            ],
            "id": "string",
            "interactions": [
               {
                  "amount": "decimal",
                  "auditInfo": {
                     "createBy": "string",
                     "createDate": "DateTime",
                     "updateBy": "string",
                     "updateDate": "DateTime"
                  },
                  "checkNumber": "string",
                  "currencyCode": "string",
                  "gatewayAuthCode": "string",
                  "gatewayAVSCodes": "string",
                  "gatewayCVV2Codes": "string",
                  "gatewayInteractionId": "int",
                  "gatewayResponseCode": "string",
                  "gatewayResponseText": "string",
                  "gatewayTransactionId": "string",
                  "id": "string",
                  "interactionDate": "DateTime",
                  "interactionType": "string",
                  "isManual": "bool",
                  "isRecurring": "bool",
                  "note": "string",
                  "orderId": "string",
                  "paymentEntryStatus": "string",
                  "paymentId": "string",
                  "paymentTransactionInteractionIdReference": "int",
                  "status": "string"
               }
            ],
            "isRecurring": "bool",
            "orderId": "string",
            "paymentServiceTransactionId": "string",
            "paymentType": "string",
            "status": "string"
         },
         "reason": "string"
      }
   ],
   "returnStatus": "string",
   "shipments": [
      {
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "cost": "decimal",
         "currencyCode": "string",
         "destinationAddress": {
            "address": {
               "address1": "string",
               "address2": "string",
               "address3": "string",
               "address4": "string",
               "addressType": "string",
               "cityOrTown": "string",
               "countryCode": "string",
               "isValidated": "bool",
               "postalOrZipCode": "string",
               "stateOrProvince": "string"
            },
            "companyOrOrganization": "string",
            "email": "string",
            "firstName": "string",
            "id": "int",
            "lastNameOrSurname": "string",
            "middleNameOrInitial": "string",
            "phoneNumbers": {
               "home": "string",
               "mobile": "string",
               "work": "string"
            }
         },
         "id": "string",
         "originAddress": {
            "address": {
               "address1": "string",
               "address2": "string",
               "address3": "string",
               "address4": "string",
               "addressType": "string",
               "cityOrTown": "string",
               "countryCode": "string",
               "isValidated": "bool",
               "postalOrZipCode": "string",
               "stateOrProvince": "string"
            },
            "companyOrOrganization": "string",
            "email": "string",
            "firstName": "string",
            "id": "int",
            "lastNameOrSurname": "string",
            "middleNameOrInitial": "string",
            "phoneNumbers": {
               "home": "string",
               "mobile": "string",
               "work": "string"
            }
         },
         "packageIds": "string",
         "shippingMethodCode": "string",
         "signatureRequired": "bool",
         "trackingNumber": "string"
      }
   ],
   "shippingAdjustment": {
      "amount": "decimal",
      "description": "string",
      "internalComment": "string"
   },
   "shippingDiscounts": [
      {
         "discount": {
            "couponCode": "string",
            "discount": {
               "expirationDate": "DateTime",
               "id": "int",
               "itemIds": "string",
               "name": "string"
            },
            "excluded": "bool",
            "impact": "decimal"
         },
         "methodCode": "string"
      }
   ],
   "shippingSubTotal": "decimal",
   "shippingTaxTotal": "decimal",
   "shippingTotal": "decimal",
   "shopperNotes": {
      "comments": "string",
      "giftMessage": "string"
   },
   "siteId": "int",
   "sourceDevice": "string",
   "status": "string",
   "submittedDate": "DateTime",
   "subtotal": "decimal",
   "taxTotal": "decimal",
   "tenantId": "int",
   "total": "decimal",
   "totalCollected": "decimal",
   "type": "string",
   "validationResults": [
      {
         "createdDate": "DateTime",
         "messages": [
            {
               "message": "string",
               "messageType": "string",
               "orderItemId": "string"
            }
         ],
         "status": "string",
         "validationId": "string",
         "validatorName": "string",
         "validatorType": "string"
      }
   ],
   "version": "string",
   "visitId": "string",
   "webSessionId": "string"
}
```

For information about the properties in the response, refer to the [REST API Help](/api-overviews/openapi_commerce_overview).

### exec.setItemHandlingAmount

Sets the handling amount applied to an order item. This method is only available for the `embedded.commerce.orders.price.before` action. In addition, do not use both the `setHandlingAmount` and the `setItemHandlingAmount` methods within the same function, as this forces ambiguous adjustments on the handling amount.

| Parameter      | Type   | Description                                          |
| -------------- | ------ | ---------------------------------------------------- |
| handlingAmount | number | The handling amount to set on the order.             |
| itemId         | string | Id of the item for which to set the handling amount. |

Example:

```
context.exec.setItemHandlingAmount(2, "123");
```

Response:

```
{
   "acceptedDate": "DateTime",
   "acceptsMarketing": "bool",
   "adjustment": {
      "amount": "decimal",
      "description": "string",
      "internalComment": "string"
   },
   "amountAvailableForRefund": "decimal",
   "amountRefunded": "decimal",
   "amountRemainingForPayment": "decimal",
   "attributes": [
      {
         "attributeDefinitionId": "int",
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "fullyQualifiedName": "string",
         "values": "object"
      }
   ],
   "auditInfo": {
      "createBy": "string",
      "createDate": "DateTime",
      "updateBy": "string",
      "updateDate": "DateTime"
   },
   "availableActions": "string",
   "billingInfo": {
      "auditInfo": {
         "createBy": "string",
         "createDate": "DateTime",
         "updateBy": "string",
         "updateDate": "DateTime"
      },
      "billingContact": {
         "address": {
            "address1": "string",
            "address2": "string",
            "address3": "string",
            "address4": "string",
            "addressType": "string",
            "cityOrTown": "string",
            "countryCode": "string",
            "isValidated": "bool",
            "postalOrZipCode": "string",
            "stateOrProvince": "string"
         },
         "companyOrOrganization": "string",
         "email": "string",
         "firstName": "string",
         "id": "int",
         "lastNameOrSurname": "string",
         "middleNameOrInitial": "string",
         "phoneNumbers": {
            "home": "string",
            "mobile": "string",
            "work": "string"
         }
      },
      "card": {
         "cardNumberPartOrMask": "string",
         "expireMonth": "short",
         "expireYear": "short",
         "isCardInfoSaved": "bool",
         "isUsedRecurring": "bool",
         "nameOnCard": "string",
         "paymentOrCardType": "string",
         "paymentServiceCardId": "string"
      },
      "isSameBillingShippingAddress": "bool",
      "paymentType": "string",
      "storeCreditCode": "string"
   },
   "cancelledDate": "DateTime",
   "changeMessages": [
      {
         "amount": "decimal",
         "appId": "string",
         "appKey": "string",
         "appName": "string",
         "correlationId": "string",
         "createDate": "DateTime",
         "id": "string",
         "identifier": "string",
         "message": "string",
         "metadata": "object",
         "newValue": "string",
         "oldValue": "string",
         "subject": "string",
         "subjectType": "string",
         "success": "bool",
         "userFirstName": "string",
         "userId": "string",
         "userLastName": "string",
         "userScopeType": "string",
         "verb": "string"
      }
   ],
   "channelCode": "string",
   "closedDate": "DateTime",
   "couponCodes": "string",
   "currencyCode": "string",
   "customerAccountId": "int",
   "customerInteractionType": "string",
   "customerTaxId": "string",
   "data": "string",
   "digitalPackages": [
      {
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "availableActions": "string",
         "changeMessages": [
            {
               "amount": "decimal",
               "appId": "string",
               "appKey": "string",
               "appName": "string",
               "correlationId": "string",
               "createDate": "DateTime",
               "id": "string",
               "identifier": "string",
               "message": "string",
               "metadata": "object",
               "newValue": "string",
               "oldValue": "string",
               "subject": "string",
               "subjectType": "string",
               "success": "bool",
               "userFirstName": "string",
               "userId": "string",
               "userLastName": "string",
               "userScopeType": "string",
               "verb": "string"
            }
         ],
         "code": "string",
         "fulfillmentDate": "DateTime",
         "fulfillmentLocationCode": "string",
         "id": "string",
         "items": [
            {
               "fulfillmentItemType": "string",
               "giftCardCode": "string",
               "lineId": "int",
               "productCode": "string",
               "quantity": "int"
            }
         ],
         "status": "string"
      }
   ],
   "discountedSubtotal": "decimal",
   "discountedTotal": "decimal",
   "discountTotal": "decimal",
   "dutyAmount": "decimal",
   "dutyTotal": "decimal",
   "email": "string",
   "expirationDate": "DateTime",
   "extendedProperties": [
      {
         "key": "string",
         "value": "string"
      }
   ],
   "externalId": "string",
   "feeTotal": "decimal",
   "fulfillmentInfo": {
      "auditInfo": {
         "createBy": "string",
         "createDate": "DateTime",
         "updateBy": "string",
         "updateDate": "DateTime"
      },
      "data": "string",
      "fulfillmentContact": {
         "address": {
            "address1": "string",
            "address2": "string",
            "address3": "string",
            "address4": "string",
            "addressType": "string",
            "cityOrTown": "string",
            "countryCode": "string",
            "isValidated": "bool",
            "postalOrZipCode": "string",
            "stateOrProvince": "string"
         },
         "companyOrOrganization": "string",
         "email": "string",
         "firstName": "string",
         "id": "int",
         "lastNameOrSurname": "string",
         "middleNameOrInitial": "string",
         "phoneNumbers": {
            "home": "string",
            "mobile": "string",
            "work": "string"
         }
      },
      "isDestinationCommercial": "bool",
      "shippingMethodCode": "string",
      "shippingMethodName": "string"
   },
   "fulfillmentStatus": "string",
   "handlingAmount": "decimal",
   "handlingDiscounts": [
      {
         "couponCode": "string",
         "discount": {
            "expirationDate": "DateTime",
            "id": "int",
            "itemIds": "string",
            "name": "string"
         },
         "excluded": "bool",
         "impact": "decimal"
      }
   ],
   "handlingSubTotal": "decimal",
   "handlingTaxTotal": "decimal",
   "handlingTotal": "decimal",
   "hasDraft": "bool",
   "id": "string",
   "importDate": "DateTime",
   "invalidCoupons": [
      {
         "couponCode": "string",
         "createDate": "DateTime",
         "discountId": "int",
         "reason": "string",
         "reasonCode": "int"
      }
   ],
   "ipAddress": "string",
   "isDraft": "bool",
   "isEligibleForReturns": "bool",
   "isImport": "bool",
   "isTaxExempt": "bool",
   "items": [
      {
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "data": "string",
         "discountedTotal": "decimal",
         "discountTotal": "decimal",
         "dutyAmount": "decimal",
         "extendedTotal": "decimal",
         "feeTotal": "decimal",
         "fulfillmentLocationCode": "string",
         "fulfillmentMethod": "string",
         "handlingAmount": "decimal",
         "id": "string",
         "isRecurring": "bool",
         "isTaxable": "bool",
         "itemTaxTotal": "decimal",
         "lineId": "int",
         "localeCode": "string",
         "originalCartItemId": "string",
         "product": {
            "allocationExpiration": "DateTime",
            "allocationId": "int",
            "bundledProducts": [
               {
                  "allocationExpiration": "DateTime",
                  "allocationId": "int",
                  "creditValue": "decimal",
                  "description": "string",
                  "fulfillmentStatus": "string",
                  "goodsType": "string",
                  "isPackagedStandAlone": "bool",
                  "measurements": {
                     "height": {
                        "unit": "string",
                        "value": "decimal"
                     },
                     "length": {
                        "unit": "string",
                        "value": "decimal"
                     },
                     "weight": {
                        "unit": "string",
                        "value": "decimal"
                     },
                     "width": {
                        "unit": "string",
                        "value": "decimal"
                     }
                  },
                  "name": "string",
                  "optionAttributeFQN": "string",
                  "optionValue": "object",
                  "productCode": "string",
                  "productReservationId": "int",
                  "quantity": "int"
               }
            ],
            "categories": [
               {
                  "id": "int",
                  "parent": "self"
               }
            ],
            "description": "string",
            "discountsRestricted": "bool",
            "discountsRestrictedEndDate": "DateTime",
            "discountsRestrictedStartDate": "DateTime",
            "fulfillmentStatus": "string",
            "fulfillmentTypesSupported": "string",
            "goodsType": "string",
            "imageAlternateText": "string",
            "imageUrl": "string",
            "isPackagedStandAlone": "bool",
            "isRecurring": "bool",
            "isTaxable": "bool",
            "measurements": {
               "height": {
                  "unit": "string",
                  "value": "decimal"
               },
               "length": {
                  "unit": "string",
                  "value": "decimal"
               },
               "weight": {
                  "unit": "string",
                  "value": "decimal"
               },
               "width": {
                  "unit": "string",
                  "value": "decimal"
               }
            },
            "mfgPartNumber": "string",
            "name": "string",
            "options": [
               {
                  "attributeFQN": "string",
                  "dataType": "string",
                  "name": "string",
                  "shopperEnteredValue": "object",
                  "stringValue": "string",
                  "value": "object"
               }
            ],
            "price": {
               "creditValue": "decimal",
               "msrp": "decimal",
               "price": "decimal",
               "salePrice": "decimal",
               "tenantOverridePrice": "decimal"
            },
            "productCode": "string",
            "productReservationId": "int",
            "productType": "string",
            "productUsage": "string",
            "properties": [
               {
                  "attributeFQN": "string",
                  "dataType": "string",
                  "isMultiValue": "bool",
                  "name": "string",
                  "values": [
                     {
                        "stringValue": "string",
                        "value": "object"
                     }
                  ]
               }
            ],
            "upc": "string",
            "variationProductCode": "string"
         },
         "productDiscount": {
            "appliesToSalePrice": "bool",
            "couponCode": "string",
            "discount": {
               "expirationDate": "DateTime",
               "id": "int",
               "itemIds": "string",
               "name": "string"
            },
            "discountQuantity": "int",
            "excluded": "bool",
            "impact": "decimal",
            "impactPerUnit": "decimal",
            "productQuantity": "int"
         },
         "productDiscounts": [
            {
               "appliesToSalePrice": "bool",
               "couponCode": "string",
               "discount": {
                  "expirationDate": "DateTime",
                  "id": "int",
                  "itemIds": "string",
                  "name": "string"
               },
               "discountQuantity": "int",
               "excluded": "bool",
               "impact": "decimal",
               "impactPerUnit": "decimal",
               "productQuantity": "int"
            }
         ],
         "quantity": "int",
         "shippingDiscounts": [
            {
               "discount": {
                  "couponCode": "string",
                  "discount": {
                     "expirationDate": "DateTime",
                     "id": "int",
                     "itemIds": "string",
                     "name": "string"
                  },
                  "excluded": "bool",
                  "impact": "decimal"
               },
               "discountQuantity": "int",
               "impactPerUnit": "decimal",
               "methodCode": "string"
            }
         ],
         "shippingTaxTotal": "decimal",
         "shippingTotal": "decimal",
         "subtotal": "decimal",
         "taxableTotal": "decimal",
         "total": "decimal",
         "unitPrice": {
            "extendedAmount": "decimal",
            "listAmount": "decimal",
            "overrideAmount": "decimal",
            "saleAmount": "decimal"
         }
      }
   ],
   "itemTaxTotal": "decimal",
   "lastValidationDate": "DateTime",
   "locationCode": "string",
   "notes": [
      {
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "id": "string",
         "text": "string"
      }
   ],
   "orderDiscounts": [
      {
         "couponCode": "string",
         "discount": {
            "expirationDate": "DateTime",
            "id": "int",
            "itemIds": "string",
            "name": "string"
         },
         "excluded": "bool",
         "impact": "decimal"
      }
   ],
   "orderNumber": "int",
   "originalCartId": "string",
   "packages": [
      {
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "availableActions": "string",
         "changeMessages": [
            {
               "amount": "decimal",
               "appId": "string",
               "appKey": "string",
               "appName": "string",
               "correlationId": "string",
               "createDate": "DateTime",
               "id": "string",
               "identifier": "string",
               "message": "string",
               "metadata": "object",
               "newValue": "string",
               "oldValue": "string",
               "subject": "string",
               "subjectType": "string",
               "success": "bool",
               "userFirstName": "string",
               "userId": "string",
               "userLastName": "string",
               "userScopeType": "string",
               "verb": "string"
            }
         ],
         "code": "string",
         "fulfillmentDate": "DateTime",
         "fulfillmentLocationCode": "string",
         "hasLabel": "bool",
         "id": "string",
         "items": [
            {
               "fulfillmentItemType": "string",
               "lineId": "int",
               "productCode": "string",
               "quantity": "int"
            }
         ],
         "measurements": {
            "height": {
               "unit": "string",
               "value": "decimal"
            },
            "length": {
               "unit": "string",
               "value": "decimal"
            },
            "weight": {
               "unit": "string",
               "value": "decimal"
            },
            "width": {
               "unit": "string",
               "value": "decimal"
            }
         },
         "packagingType": "string",
         "shipmentId": "string",
         "shippingMethodCode": "string",
         "shippingMethodName": "string",
         "status": "string",
         "trackingNumber": "string"
      }
   ],
   "parentOrderId": "string",
   "parentReturnId": "string",
   "payments": [
      {
         "amountCollected": "decimal",
         "amountCredited": "decimal",
         "amountRequested": "decimal",
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "availableActions": "string",
         "billingInfo": {
            "auditInfo": {
               "createBy": "string",
               "createDate": "DateTime",
               "updateBy": "string",
               "updateDate": "DateTime"
            },
            "billingContact": {
               "address": {
                  "address1": "string",
                  "address2": "string",
                  "address3": "string",
                  "address4": "string",
                  "addressType": "string",
                  "cityOrTown": "string",
                  "countryCode": "string",
                  "isValidated": "bool",
                  "postalOrZipCode": "string",
                  "stateOrProvince": "string"
               },
               "companyOrOrganization": "string",
               "email": "string",
               "firstName": "string",
               "id": "int",
               "lastNameOrSurname": "string",
               "middleNameOrInitial": "string",
               "phoneNumbers": {
                  "home": "string",
                  "mobile": "string",
                  "work": "string"
               }
            },
            "card": {
               "cardNumberPartOrMask": "string",
               "expireMonth": "short",
               "expireYear": "short",
               "isCardInfoSaved": "bool",
               "isUsedRecurring": "bool",
               "nameOnCard": "string",
               "paymentOrCardType": "string",
               "paymentServiceCardId": "string"
            },
            "isSameBillingShippingAddress": "bool",
            "paymentType": "string",
            "storeCreditCode": "string"
         },
         "changeMessages": [
            {
               "amount": "decimal",
               "appId": "string",
               "appKey": "string",
               "appName": "string",
               "correlationId": "string",
               "createDate": "DateTime",
               "id": "string",
               "identifier": "string",
               "message": "string",
               "metadata": "object",
               "newValue": "string",
               "oldValue": "string",
               "subject": "string",
               "subjectType": "string",
               "success": "bool",
               "userFirstName": "string",
               "userId": "string",
               "userLastName": "string",
               "userScopeType": "string",
               "verb": "string"
            }
         ],
         "id": "string",
         "interactions": [
            {
               "amount": "decimal",
               "auditInfo": {
                  "createBy": "string",
                  "createDate": "DateTime",
                  "updateBy": "string",
                  "updateDate": "DateTime"
               },
               "checkNumber": "string",
               "currencyCode": "string",
               "gatewayAuthCode": "string",
               "gatewayAVSCodes": "string",
               "gatewayCVV2Codes": "string",
               "gatewayInteractionId": "int",
               "gatewayResponseCode": "string",
               "gatewayResponseText": "string",
               "gatewayTransactionId": "string",
               "id": "string",
               "interactionDate": "DateTime",
               "interactionType": "string",
               "isManual": "bool",
               "isRecurring": "bool",
               "note": "string",
               "orderId": "string",
               "paymentEntryStatus": "string",
               "paymentId": "string",
               "paymentTransactionInteractionIdReference": "int",
               "status": "string"
            }
         ],
         "isRecurring": "bool",
         "orderId": "string",
         "paymentServiceTransactionId": "string",
         "paymentType": "string",
         "status": "string"
      }
   ],
   "paymentStatus": "string",
   "pickups": [
      {
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "availableActions": "string",
         "changeMessages": [
            {
               "amount": "decimal",
               "appId": "string",
               "appKey": "string",
               "appName": "string",
               "correlationId": "string",
               "createDate": "DateTime",
               "id": "string",
               "identifier": "string",
               "message": "string",
               "metadata": "object",
               "newValue": "string",
               "oldValue": "string",
               "subject": "string",
               "subjectType": "string",
               "success": "bool",
               "userFirstName": "string",
               "userId": "string",
               "userLastName": "string",
               "userScopeType": "string",
               "verb": "string"
            }
         ],
         "code": "string",
         "fulfillmentDate": "DateTime",
         "fulfillmentLocationCode": "string",
         "id": "string",
         "items": [
            {
               "fulfillmentItemType": "string",
               "lineId": "int",
               "productCode": "string",
               "quantity": "int"
            }
         ],
         "status": "string"
      }
   ],
   "refunds": [
      {
         "amount": "decimal",
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "id": "string",
         "orderId": "string",
         "payment": {
            "amountCollected": "decimal",
            "amountCredited": "decimal",
            "amountRequested": "decimal",
            "auditInfo": {
               "createBy": "string",
               "createDate": "DateTime",
               "updateBy": "string",
               "updateDate": "DateTime"
            },
            "availableActions": "string",
            "billingInfo": {
               "auditInfo": {
                  "createBy": "string",
                  "createDate": "DateTime",
                  "updateBy": "string",
                  "updateDate": "DateTime"
               },
               "billingContact": {
                  "address": {
                     "address1": "string",
                     "address2": "string",
                     "address3": "string",
                     "address4": "string",
                     "addressType": "string",
                     "cityOrTown": "string",
                     "countryCode": "string",
                     "isValidated": "bool",
                     "postalOrZipCode": "string",
                     "stateOrProvince": "string"
                  },
                  "companyOrOrganization": "string",
                  "email": "string",
                  "firstName": "string",
                  "id": "int",
                  "lastNameOrSurname": "string",
                  "middleNameOrInitial": "string",
                  "phoneNumbers": {
                     "home": "string",
                     "mobile": "string",
                     "work": "string"
                  }
               },
               "card": {
                  "cardNumberPartOrMask": "string",
                  "expireMonth": "short",
                  "expireYear": "short",
                  "isCardInfoSaved": "bool",
                  "isUsedRecurring": "bool",
                  "nameOnCard": "string",
                  "paymentOrCardType": "string",
                  "paymentServiceCardId": "string"
               },
               "isSameBillingShippingAddress": "bool",
               "paymentType": "string",
               "storeCreditCode": "string"
            },
            "changeMessages": [
               {
                  "amount": "decimal",
                  "appId": "string",
                  "appKey": "string",
                  "appName": "string",
                  "correlationId": "string",
                  "createDate": "DateTime",
                  "id": "string",
                  "identifier": "string",
                  "message": "string",
                  "metadata": "object",
                  "newValue": "string",
                  "oldValue": "string",
                  "subject": "string",
                  "subjectType": "string",
                  "success": "bool",
                  "userFirstName": "string",
                  "userId": "string",
                  "userLastName": "string",
                  "userScopeType": "string",
                  "verb": "string"
               }
            ],
            "id": "string",
            "interactions": [
               {
                  "amount": "decimal",
                  "auditInfo": {
                     "createBy": "string",
                     "createDate": "DateTime",
                     "updateBy": "string",
                     "updateDate": "DateTime"
                  },
                  "checkNumber": "string",
                  "currencyCode": "string",
                  "gatewayAuthCode": "string",
                  "gatewayAVSCodes": "string",
                  "gatewayCVV2Codes": "string",
                  "gatewayInteractionId": "int",
                  "gatewayResponseCode": "string",
                  "gatewayResponseText": "string",
                  "gatewayTransactionId": "string",
                  "id": "string",
                  "interactionDate": "DateTime",
                  "interactionType": "string",
                  "isManual": "bool",
                  "isRecurring": "bool",
                  "note": "string",
                  "orderId": "string",
                  "paymentEntryStatus": "string",
                  "paymentId": "string",
                  "paymentTransactionInteractionIdReference": "int",
                  "status": "string"
               }
            ],
            "isRecurring": "bool",
            "orderId": "string",
            "paymentServiceTransactionId": "string",
            "paymentType": "string",
            "status": "string"
         },
         "reason": "string"
      }
   ],
   "returnStatus": "string",
   "shipments": [
      {
         "auditInfo": {
            "createBy": "string",
            "createDate": "DateTime",
            "updateBy": "string",
            "updateDate": "DateTime"
         },
         "cost": "decimal",
         "currencyCode": "string",
         "destinationAddress": {
            "address": {
               "address1": "string",
               "address2": "string",
               "address3": "string",
               "address4": "string",
               "addressType": "string",
               "cityOrTown": "string",
               "countryCode": "string",
               "isValidated": "bool",
               "postalOrZipCode": "string",
               "stateOrProvince": "string"
            },
            "companyOrOrganization": "string",
            "email": "string",
            "firstName": "string",
            "id": "int",
            "lastNameOrSurname": "string",
            "middleNameOrInitial": "string",
            "phoneNumbers": {
               "home": "string",
               "mobile": "string",
               "work": "string"
            }
         },
         "id": "string",
         "originAddress": {
            "address": {
               "address1": "string",
               "address2": "string",
               "address3": "string",
               "address4": "string",
               "addressType": "string",
               "cityOrTown": "string",
               "countryCode": "string",
               "isValidated": "bool",
               "postalOrZipCode": "string",
               "stateOrProvince": "string"
            },
            "companyOrOrganization": "string",
            "email": "string",
            "firstName": "string",
            "id": "int",
            "lastNameOrSurname": "string",
            "middleNameOrInitial": "string",
            "phoneNumbers": {
               "home": "string",
               "mobile": "string",
               "work": "string"
            }
         },
         "packageIds": "string",
         "shippingMethodCode": "string",
         "signatureRequired": "bool",
         "trackingNumber": "string"
      }
   ],
   "shippingAdjustment": {
      "amount": "decimal",
      "description": "string",
      "internalComment": "string"
   },
   "shippingDiscounts": [
      {
         "discount": {
            "couponCode": "string",
            "discount": {
               "expirationDate": "DateTime",
               "id": "int",
               "itemIds": "string",
               "name": "string"
            },
            "excluded": "bool",
            "impact": "decimal"
         },
         "methodCode": "string"
      }
   ],
   "shippingSubTotal": "decimal",
   "shippingTaxTotal": "decimal",
   "shippingTotal": "decimal",
   "shopperNotes": {
      "comments": "string",
      "giftMessage": "string"
   },
   "siteId": "int",
   "sourceDevice": "string",
   "status": "string",
   "submittedDate": "DateTime",
   "subtotal": "decimal",
   "taxTotal": "decimal",
   "tenantId": "int",
   "total": "decimal",
   "totalCollected": "decimal",
   "type": "string",
   "validationResults": [
      {
         "createdDate": "DateTime",
         "messages": [
            {
               "message": "string",
               "messageType": "string",
               "orderItemId": "string"
            }
         ],
         "status": "string",
         "validationId": "string",
         "validatorName": "string",
         "validatorType": "string"
      }
   ],
   "version": "string",
   "visitId": "string",
   "webSessionId": "string"
}
```

For information about the properties in the response, refer to the [REST API Help](/api-overviews/openapi_commerce_overview).

## Context Objects Available to All Actions

### apiContext

Accesses tenant information.

| Property            | Type      | Description                                                                                                                                              |
| ------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| baseUrl             | string    | The base URL for the site.                                                                                                                               |
| basePciUrl          | string    | The base PCI URL for the site.                                                                                                                           |
| tenantPod           | string    | The name of the tenant pod in which the tenant resides.                                                                                                  |
| appClaims           | string    | The application claims token.                                                                                                                            |
| appKey              | string    | The application key.                                                                                                                                     |
| tenantId            | integer   | Unique identifier for the tenant.                                                                                                                        |
| siteId              | integer   | Unique identifier for the site. This ID is used at all levels of a store, catalog, and tenant to associate objects to a site.                            |
| masterCatalogId     | integer   | Unique identifier for the master catalog.                                                                                                                |
| catalogId           | integer   | The unique identifier for the product catalog. Catalogs are part of a master catalog.                                                                    |
| currencyCode        | string    | The default three-letter ISO currency code for monetary amounts.                                                                                         |
| previewDate         | date/time | The date and time that the content is being viewed. This might be a future date if the content is previewed with an active date range set in the future. |
| localeCode          | string    | The locale code per the country code provided. This code determines the localized content to use and display.                                            |
| correlationId       | string    | The unique identifier of the API request associated with the event action, which might contain multiple actions.                                         |
| isAuthorizedAsAdmin | Boolean   | Indicates whether the Dev Account user is authorized as an admin.                                                                                        |
| userClaims          | string    | The user claims token.                                                                                                                                   |

Example:

```
context.apiContext.baseUrl;
```

### configuration

Receives a JSON response that contains information about the configuration data set in the Action Management JSON editor.

| Property | Type   | Description                                                                     |
| -------- | ------ | ------------------------------------------------------------------------------- |
| Varies   | object | Custom fields and values that you can set in the Action Management JSON Editor. |

Example:

```
context.configuration.customData;
```
