This action occurs before prices are determined during checkout.
Action Type | Embedded |
---|---|
Full Action ID | embedded.commerce.checkouts.price.before |
Runs multiple custom functions? | No |
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: Checkout
The following methods and objects are available to this action through the use of the context
argument.
Microservice Operation
This action corresponds to the microservice that prices checkouts.
Get Methods
Exec Methods
- exec.setItemAllocation
- exec.setAttribute
- exec.removeAttribute
- exec.setData
- exec.removeData
- exec.setItemData
- exec.removeItemData
- exec.setDutyAmount
- exec.setHandlingAmount
- exec.setItemHandlingAmount
Context Objects Available to All Actions
Get
get.checkout
Obtains a response that includes information about the current checkout.
Parameters | Type | Description |
---|---|---|
N/A | N/A | N/A |
Example:
context.get.checkout();
Response:
{
"id": "string",
"siteId": 0,
"tenantId": 0,
"number": 0,
"originalCartId": "string",
"submittedDate": "2025-02-18T02:41:59.345Z",
"type": "string",
"items": [
{
"id": "string",
"destinationId": "string",
"originalCartItemId": "string",
"fulfillmentLocationCode": "string",
"fulfillmentMethod": "string",
"dutyAmount": 0,
"expectedDeliveryDate": "2025-02-18T02:41:59.345Z",
"subscription": {
"required": true,
"frequency": {
"unit": "string",
"value": 0
},
"trial": {
"enabled": true,
"duration": 0,
"substituteProductCode": "string",
"substituteProductQuantity": 0,
"substituteVariationProductCode": "string",
"substituteProductOptions": [
{
"name": "string",
"attributeFQN": "string",
"dataType": "string",
"stringValue": "string"
}
]
}
},
"isReservationEnabled": true,
"giftInfo": {
"isGiftItem": true,
"giftMessage": "string"
},
"priceMode": "string",
"returnRuleInfo": {
"isReturnable": true,
"maxQty": 0,
"maxDays": 0,
"ruleCode": "string"
},
"localeCode": "string",
"purchaseLocation": "string",
"lineId": 0,
"product": {
"mfgPartNumber": "string",
"upc": "string",
"sku": "string",
"fulfillmentTypesSupported": [
"string"
],
"imageAlternateText": "string",
"imageUrl": "string",
"variationProductCode": "string",
"options": [
{
"name": "string",
"attributeFQN": "string",
"dataType": "string",
"stringValue": "string"
}
],
"properties": [
{
"attributeFQN": "string",
"name": "string",
"dataType": "string",
"isMultiValue": true,
"values": [
{
"stringValue": "string"
}
]
}
],
"categories": [
{
"id": 0,
"parent": {}
}
],
"price": {
"price": 0,
"salePrice": 0,
"tenantOverridePrice": 0,
"msrp": 0,
"creditValue": 0,
"priceListCode": "string",
"priceListEntryMode": "string",
"isOverRidePriceSalePrice": true
},
"discountsRestricted": true,
"discountsRestrictedStartDate": "2025-02-18T02:41:59.345Z",
"discountsRestrictedEndDate": "2025-02-18T02:41:59.345Z",
"isRecurring": true,
"isTaxable": true,
"productType": "string",
"productUsage": "string",
"serialNumber": "string",
"condition": "string",
"bundledProducts": [
{
"quantity": 0,
"optionAttributeFQN": "string",
"creditValue": 0,
"deltaPrice": 0,
"imageUrl": "string",
"productCode": "string",
"name": "string",
"description": "string",
"goodsType": "string",
"isPackagedStandAlone": true,
"stock": {
"manageStock": true,
"isOnBackOrder": true,
"availableDate": "2025-02-18T02:41:59.345Z",
"stockAvailable": 0,
"aggregateInventory": 0,
"futureInventories": [
{
"futureInventoryID": 0,
"onhand": 0,
"available": 0,
"allocated": 0,
"pending": 0,
"deliveryDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z"
}
],
"availableFutureInventories": 0,
"totalAvailableStock": 0,
"isSubstitutable": true
},
"productReservationId": 0,
"allocationId": 0,
"allocationExpiration": "2025-02-18T02:41:59.345Z",
"measurements": {
"height": {
"unit": "string",
"value": 0
},
"width": {
"unit": "string",
"value": 0
},
"length": {
"unit": "string",
"value": 0
},
"weight": {
"unit": "string",
"value": 0
}
},
"fulfillmentStatus": "string"
}
],
"fulfillmentFields": [
{
"name": "string",
"required": true
}
],
"productCode": "string",
"name": "string",
"description": "string",
"goodsType": "string",
"isPackagedStandAlone": true,
"stock": {
"manageStock": true,
"isOnBackOrder": true,
"availableDate": "2025-02-18T02:41:59.345Z",
"stockAvailable": 0,
"aggregateInventory": 0,
"futureInventories": [
{
"futureInventoryID": 0,
"onhand": 0,
"available": 0,
"allocated": 0,
"pending": 0,
"deliveryDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z"
}
],
"availableFutureInventories": 0,
"totalAvailableStock": 0,
"isSubstitutable": true
},
"productReservationId": 0,
"allocationId": 0,
"allocationExpiration": "2025-02-18T02:41:59.345Z",
"measurements": {
"height": {
"unit": "string",
"value": 0
},
"width": {
"unit": "string",
"value": 0
},
"length": {
"unit": "string",
"value": 0
},
"weight": {
"unit": "string",
"value": 0
}
},
"fulfillmentStatus": "string"
},
"quantity": 0,
"isRecurring": true,
"isTaxable": true,
"subtotal": 0,
"extendedTotal": 0,
"taxableTotal": 0,
"discountTotal": 0,
"discountedTotal": 0,
"itemTaxTotal": 0,
"shippingTaxTotal": 0,
"shippingTotal": 0,
"handlingAmount": 0,
"feeTotal": 0,
"total": 0,
"unitPrice": {
"extendedAmount": 0,
"listAmount": 0,
"saleAmount": 0,
"overrideAmount": 0
},
"productDiscount": {
"appliesToSalePrice": true,
"discountQuantity": 0,
"impact": 0,
"discount": {
"id": 0,
"name": "string",
"itemIds": [
"string"
],
"expirationDate": "2025-02-18T02:41:59.345Z",
"hasMultipleTargetProducts": true
},
"couponCode": "string",
"excluded": true,
"data": {}
},
"productDiscounts": [
{
"appliesToSalePrice": true,
"discountQuantity": 0,
"impact": 0,
"discount": {
"id": 0,
"name": "string",
"itemIds": [
"string"
],
"expirationDate": "2025-02-18T02:41:59.345Z",
"hasMultipleTargetProducts": true
},
"couponCode": "string",
"excluded": true,
"data": {}
}
],
"shippingDiscounts": [
{
"methodCode": "string",
"discount": {
"impact": 0,
"discount": {
"id": 0,
"name": "string",
"itemIds": [
"string"
],
"expirationDate": "2025-02-18T02:41:59.345Z",
"hasMultipleTargetProducts": true
},
"couponCode": "string",
"excluded": true,
"data": {}
},
"discountQuantity": 0,
"impactPerUnit": 0
}
],
"data": {},
"taxData": {},
"auditInfo": {
"updateDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z",
"updateBy": "string",
"createBy": "string"
},
"shippingAmountBeforeDiscountsAndAdjustments": 0,
"weightedOrderAdjustment": 0,
"weightedOrderDiscount": 0,
"adjustedLineItemSubtotal": 0,
"totalWithoutWeightedShippingAndHandling": 0,
"weightedOrderTax": 0,
"weightedOrderShipping": 0,
"weightedOrderShippingDiscount": 0,
"weightedOrderShippingManualAdjustment": 0,
"weightedOrderShippingTax": 0,
"weightedOrderHandlingFee": 0,
"weightedOrderHandlingFeeTax": 0,
"weightedOrderHandlingFeeDiscount": 0,
"weightedOrderDuty": 0,
"totalWithWeightedShippingAndHandling": 0,
"weightedOrderHandlingAdjustment": 0,
"autoAddDiscountId": 0,
"isAssemblyRequired": true,
"childItemIds": [
"string"
],
"parentItemId": "string",
"inventoryTags": [
{
"name": "string",
"value": "string"
}
],
"lineItemAdjustment": 0,
"substituteInfo": {
"optIn": "string",
"substituteProductCode": "string",
"substituteVariantCode": "string"
}
}
],
"groupings": [
{
"id": "string",
"destinationId": "string",
"fulfillmentMethod": "string",
"orderItemIds": [
"string"
],
"shippingMethodCode": "string",
"shippingMethodName": "string",
"standaloneGroup": true,
"shippingDiscounts": [
{
"methodCode": "string",
"discount": {
"impact": 0,
"discount": {
"id": 0,
"name": "string",
"itemIds": [
"string"
],
"expirationDate": "2025-02-18T02:41:59.345Z",
"hasMultipleTargetProducts": true
},
"couponCode": "string",
"excluded": true,
"data": {}
}
}
],
"handlingDiscounts": [
{
"impact": 0,
"discount": {
"id": 0,
"name": "string",
"itemIds": [
"string"
],
"expirationDate": "2025-02-18T02:41:59.345Z",
"hasMultipleTargetProducts": true
},
"couponCode": "string",
"excluded": true,
"data": {}
}
],
"dutyAmount": 0,
"dutyTotal": 0,
"shippingAmount": 0,
"shippingSubTotal": 0,
"itemLevelShippingDiscountTotal": 0,
"orderLevelShippingDiscountTotal": 0,
"shippingTax": 0,
"shippingTaxTotal": 0,
"shippingTotal": 0,
"handlingAmount": 0,
"handlingSubTotal": 0,
"itemLevelHandlingDiscountTotal": 0,
"orderLevelHandlingDiscountTotal": 0,
"handlingTax": 0,
"handlingTaxTotal": 0,
"handlingTotal": 0,
"taxData": {}
}
],
"auditInfo": {
"updateDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z",
"updateBy": "string",
"createBy": "string"
},
"destinations": [
{
"id": "string",
"destinationContact": {
"id": 0,
"email": "string",
"firstName": "string",
"middleNameOrInitial": "string",
"lastNameOrSurname": "string",
"companyOrOrganization": "string",
"phoneNumbers": {
"home": "string",
"mobile": "string",
"work": "string"
},
"address": {
"address1": "string",
"address2": "string",
"address3": "string",
"address4": "string",
"cityOrTown": "string",
"stateOrProvince": "string",
"postalOrZipCode": "string",
"countryCode": "string",
"addressType": "string",
"isValidated": true
}
},
"isDestinationCommercial": true,
"data": {}
}
],
"payments": [
{
"id": "string",
"groupId": {
"targetType": "string",
"targetId": "string",
"targetNumber": 0
},
"paymentServiceTransactionId": "string",
"availableActions": [
"string"
],
"orderId": "string",
"paymentType": "string",
"paymentWorkflow": "string",
"externalTransactionId": "string",
"billingInfo": {
"paymentType": "string",
"paymentWorkflow": "string",
"billingContact": {
"id": 0,
"email": "string",
"firstName": "string",
"middleNameOrInitial": "string",
"lastNameOrSurname": "string",
"companyOrOrganization": "string",
"phoneNumbers": {
"home": "string",
"mobile": "string",
"work": "string"
},
"address": {
"address1": "string",
"address2": "string",
"address3": "string",
"address4": "string",
"cityOrTown": "string",
"stateOrProvince": "string",
"postalOrZipCode": "string",
"countryCode": "string",
"addressType": "string",
"isValidated": true
}
},
"isSameBillingShippingAddress": true,
"card": {
"paymentServiceCardId": "string",
"isUsedRecurring": true,
"nameOnCard": "string",
"isCardInfoSaved": true,
"isTokenized": true,
"ccLastFour": "string",
"paymentOrCardType": "string",
"cardNumberPartOrMask": "string",
"expireMonth": 0,
"expireYear": 0,
"bin": "string"
},
"token": {
"paymentServiceTokenId": "string",
"type": "string"
},
"purchaseOrder": {
"purchaseOrderNumber": "string",
"paymentTerm": {
"code": "string",
"description": "string"
},
"customFields": [
{
"code": "string",
"label": "string",
"value": "string"
}
]
},
"check": {
"checkNumber": "string"
},
"auditInfo": {
"updateDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z",
"updateBy": "string",
"createBy": "string"
},
"storeCreditCode": "string",
"storeCreditType": "string",
"customCreditType": "string",
"externalTransactionId": "string",
"isRecurring": true,
"recurringTransactionId": "string",
"data": {}
},
"data": {},
"status": "string",
"subPayments": [
{
"status": "string",
"amountCollected": 0,
"amountCredited": 0,
"amountRequested": 0,
"amountRefunded": 0,
"target": {
"targetType": "string",
"targetId": "string",
"targetNumber": 0
}
}
],
"interactions": [
{
"id": "string",
"gatewayInteractionId": 0,
"paymentId": "string",
"orderId": "string",
"target": {
"targetType": "string",
"targetId": "string",
"targetNumber": 0
},
"currencyCode": "string",
"interactionType": "string",
"checkNumber": "string",
"status": "string",
"paymentEntryStatus": "string",
"isRecurring": true,
"isManual": true,
"isPending": true,
"gatewayTransactionId": "string",
"gatewayAuthCode": "string",
"gatewayAVSCodes": "string",
"gatewayCVV2Codes": "string",
"gatewayResponseCode": "string",
"gatewayResponseText": "string",
"gatewayResponseData": [
{
"key": "string",
"value": "string"
}
],
"paymentTransactionInteractionIdReference": 0,
"amount": 0,
"note": "string",
"interactionDate": "2025-02-18T02:41:59.345Z",
"auditInfo": {
"updateDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z",
"updateBy": "string",
"createBy": "string"
},
"returnId": "string",
"refundId": "string",
"capturableShipmentsSummary": [
{
"shipmentNumber": 0,
"shipmentTotal": 0,
"amountApplied": 0
}
]
}
],
"isRecurring": true,
"amountCollected": 0,
"amountCredited": 0,
"amountRequested": 0,
"changeMessages": [
{
"id": "string",
"correlationId": "string",
"userId": "string",
"userFirstName": "string",
"userLastName": "string",
"userScopeType": "string",
"appId": "string",
"appKey": "string",
"appName": "string",
"subjectType": "string",
"success": true,
"identifier": "string",
"subject": "string",
"verb": "string",
"message": "string",
"createDate": "2025-02-18T02:41:59.345Z",
"attributes": {}
}
],
"auditInfo": {
"updateDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z",
"updateBy": "string",
"createBy": "string"
},
"gatewayGiftCard": {
"id": "string",
"cardNumber": "string",
"cardPin": "string",
"amount": 0,
"currencyCode": "string"
},
"installmentPlanCode": "string"
}
],
"amountRemainingForPayment": 0,
"acceptsMarketing": true,
"customerAccountId": 0,
"email": "string",
"alternateContact": {
"firstName": "string",
"lastNameOrSurname": "string",
"emailAddress": "string",
"phoneNumber": "string"
},
"customerTaxId": "string",
"isTaxExempt": true,
"currencyCode": "string",
"priceListCode": "string",
"attributes": [
{
"auditInfo": {
"updateDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z",
"updateBy": "string",
"createBy": "string"
},
"fullyQualifiedName": "string",
"attributeDefinitionId": 0,
"values": [
null
]
}
],
"shopperNotes": {
"giftMessage": "string",
"comments": "string",
"deliveryInstructions": "string"
},
"availableActions": [
"string"
],
"data": {},
"taxData": {},
"channelCode": "string",
"locationCode": "string",
"ipAddress": "string",
"sourceDevice": "string",
"visitId": "string",
"webSessionId": "string",
"customerInteractionType": "string",
"orderDiscounts": [
{
"impact": 0,
"discount": {
"id": 0,
"name": "string",
"itemIds": [
"string"
],
"expirationDate": "2025-02-18T02:41:59.345Z",
"hasMultipleTargetProducts": true
},
"couponCode": "string",
"excluded": true,
"data": {}
}
],
"couponCodes": [
"string"
],
"invalidCoupons": [
{
"couponCode": "string",
"reasonCode": 0,
"reason": "string",
"createDate": "2025-02-18T02:41:59.345Z",
"discountId": 0
}
],
"suggestedDiscounts": [
{
"productCode": "string",
"autoAdd": true,
"discountId": 0,
"hasMultipleProducts": true,
"hasOptions": true
}
],
"discountThresholdMessages": [
{
"discountId": 0,
"message": "string",
"thresholdValue": 0,
"showOnCheckout": true,
"showInCart": true,
"requiresCouponCode": true
}
],
"dutyTotal": 0,
"feeTotal": 0,
"subTotal": 0,
"itemLevelProductDiscountTotal": 0,
"orderLevelProductDiscountTotal": 0,
"itemTaxTotal": 0,
"itemTotal": 0,
"shippingSubTotal": 0,
"itemLevelShippingDiscountTotal": 0,
"orderLevelShippingDiscountTotal": 0,
"shippingTaxTotal": 0,
"shippingTotal": 0,
"handlingSubTotal": 0,
"itemLevelHandlingDiscountTotal": 0,
"orderLevelHandlingDiscountTotal": 0,
"handlingTaxTotal": 0,
"handlingTotal": 0,
"total": 0
}
For information about the properties in the response, refer to the REST API Help.
Exec
exec.setItemAllocation
Sets soft allocation information on an order item.
Parameters | 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.
exec.setAttribute
Sets an attribute from the checkout.
Parameters | Type | Description |
---|---|---|
fqn | string | Fully-qualified name of the attribute. Must apply to an existing attribute. |
value | object | Value or values to set on for the specified attribute. |
Example:
context.exec.setAttribute("attributeName", value);
Response:
{
"id": "string",
"siteId": 0,
"tenantId": 0,
"number": 0,
"originalCartId": "string",
"submittedDate": "2025-02-18T02:41:59.345Z",
"type": "string",
"items": [
{
"id": "string",
"destinationId": "string",
"originalCartItemId": "string",
"fulfillmentLocationCode": "string",
"fulfillmentMethod": "string",
"dutyAmount": 0,
"expectedDeliveryDate": "2025-02-18T02:41:59.345Z",
"subscription": {
"required": true,
"frequency": {
"unit": "string",
"value": 0
},
"trial": {
"enabled": true,
"duration": 0,
"substituteProductCode": "string",
"substituteProductQuantity": 0,
"substituteVariationProductCode": "string",
"substituteProductOptions": [
{
"name": "string",
"attributeFQN": "string",
"dataType": "string",
"stringValue": "string"
}
]
}
},
"isReservationEnabled": true,
"giftInfo": {
"isGiftItem": true,
"giftMessage": "string"
},
"priceMode": "string",
"returnRuleInfo": {
"isReturnable": true,
"maxQty": 0,
"maxDays": 0,
"ruleCode": "string"
},
"localeCode": "string",
"purchaseLocation": "string",
"lineId": 0,
"product": {
"mfgPartNumber": "string",
"upc": "string",
"sku": "string",
"fulfillmentTypesSupported": [
"string"
],
"imageAlternateText": "string",
"imageUrl": "string",
"variationProductCode": "string",
"options": [
{
"name": "string",
"attributeFQN": "string",
"dataType": "string",
"stringValue": "string"
}
],
"properties": [
{
"attributeFQN": "string",
"name": "string",
"dataType": "string",
"isMultiValue": true,
"values": [
{
"stringValue": "string"
}
]
}
],
"categories": [
{
"id": 0,
"parent": {}
}
],
"price": {
"price": 0,
"salePrice": 0,
"tenantOverridePrice": 0,
"msrp": 0,
"creditValue": 0,
"priceListCode": "string",
"priceListEntryMode": "string",
"isOverRidePriceSalePrice": true
},
"discountsRestricted": true,
"discountsRestrictedStartDate": "2025-02-18T02:41:59.345Z",
"discountsRestrictedEndDate": "2025-02-18T02:41:59.345Z",
"isRecurring": true,
"isTaxable": true,
"productType": "string",
"productUsage": "string",
"serialNumber": "string",
"condition": "string",
"bundledProducts": [
{
"quantity": 0,
"optionAttributeFQN": "string",
"creditValue": 0,
"deltaPrice": 0,
"imageUrl": "string",
"productCode": "string",
"name": "string",
"description": "string",
"goodsType": "string",
"isPackagedStandAlone": true,
"stock": {
"manageStock": true,
"isOnBackOrder": true,
"availableDate": "2025-02-18T02:41:59.345Z",
"stockAvailable": 0,
"aggregateInventory": 0,
"futureInventories": [
{
"futureInventoryID": 0,
"onhand": 0,
"available": 0,
"allocated": 0,
"pending": 0,
"deliveryDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z"
}
],
"availableFutureInventories": 0,
"totalAvailableStock": 0,
"isSubstitutable": true
},
"productReservationId": 0,
"allocationId": 0,
"allocationExpiration": "2025-02-18T02:41:59.345Z",
"measurements": {
"height": {
"unit": "string",
"value": 0
},
"width": {
"unit": "string",
"value": 0
},
"length": {
"unit": "string",
"value": 0
},
"weight": {
"unit": "string",
"value": 0
}
},
"fulfillmentStatus": "string"
}
],
"fulfillmentFields": [
{
"name": "string",
"required": true
}
],
"productCode": "string",
"name": "string",
"description": "string",
"goodsType": "string",
"isPackagedStandAlone": true,
"stock": {
"manageStock": true,
"isOnBackOrder": true,
"availableDate": "2025-02-18T02:41:59.345Z",
"stockAvailable": 0,
"aggregateInventory": 0,
"futureInventories": [
{
"futureInventoryID": 0,
"onhand": 0,
"available": 0,
"allocated": 0,
"pending": 0,
"deliveryDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z"
}
],
"availableFutureInventories": 0,
"totalAvailableStock": 0,
"isSubstitutable": true
},
"productReservationId": 0,
"allocationId": 0,
"allocationExpiration": "2025-02-18T02:41:59.345Z",
"measurements": {
"height": {
"unit": "string",
"value": 0
},
"width": {
"unit": "string",
"value": 0
},
"length": {
"unit": "string",
"value": 0
},
"weight": {
"unit": "string",
"value": 0
}
},
"fulfillmentStatus": "string"
},
"quantity": 0,
"isRecurring": true,
"isTaxable": true,
"subtotal": 0,
"extendedTotal": 0,
"taxableTotal": 0,
"discountTotal": 0,
"discountedTotal": 0,
"itemTaxTotal": 0,
"shippingTaxTotal": 0,
"shippingTotal": 0,
"handlingAmount": 0,
"feeTotal": 0,
"total": 0,
"unitPrice": {
"extendedAmount": 0,
"listAmount": 0,
"saleAmount": 0,
"overrideAmount": 0
},
"productDiscount": {
"appliesToSalePrice": true,
"discountQuantity": 0,
"impact": 0,
"discount": {
"id": 0,
"name": "string",
"itemIds": [
"string"
],
"expirationDate": "2025-02-18T02:41:59.345Z",
"hasMultipleTargetProducts": true
},
"couponCode": "string",
"excluded": true,
"data": {}
},
"productDiscounts": [
{
"appliesToSalePrice": true,
"discountQuantity": 0,
"impact": 0,
"discount": {
"id": 0,
"name": "string",
"itemIds": [
"string"
],
"expirationDate": "2025-02-18T02:41:59.345Z",
"hasMultipleTargetProducts": true
},
"couponCode": "string",
"excluded": true,
"data": {}
}
],
"shippingDiscounts": [
{
"methodCode": "string",
"discount": {
"impact": 0,
"discount": {
"id": 0,
"name": "string",
"itemIds": [
"string"
],
"expirationDate": "2025-02-18T02:41:59.345Z",
"hasMultipleTargetProducts": true
},
"couponCode": "string",
"excluded": true,
"data": {}
},
"discountQuantity": 0,
"impactPerUnit": 0
}
],
"data": {},
"taxData": {},
"auditInfo": {
"updateDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z",
"updateBy": "string",
"createBy": "string"
},
"shippingAmountBeforeDiscountsAndAdjustments": 0,
"weightedOrderAdjustment": 0,
"weightedOrderDiscount": 0,
"adjustedLineItemSubtotal": 0,
"totalWithoutWeightedShippingAndHandling": 0,
"weightedOrderTax": 0,
"weightedOrderShipping": 0,
"weightedOrderShippingDiscount": 0,
"weightedOrderShippingManualAdjustment": 0,
"weightedOrderShippingTax": 0,
"weightedOrderHandlingFee": 0,
"weightedOrderHandlingFeeTax": 0,
"weightedOrderHandlingFeeDiscount": 0,
"weightedOrderDuty": 0,
"totalWithWeightedShippingAndHandling": 0,
"weightedOrderHandlingAdjustment": 0,
"autoAddDiscountId": 0,
"isAssemblyRequired": true,
"childItemIds": [
"string"
],
"parentItemId": "string",
"inventoryTags": [
{
"name": "string",
"value": "string"
}
],
"lineItemAdjustment": 0,
"substituteInfo": {
"optIn": "string",
"substituteProductCode": "string",
"substituteVariantCode": "string"
}
}
],
"groupings": [
{
"id": "string",
"destinationId": "string",
"fulfillmentMethod": "string",
"orderItemIds": [
"string"
],
"shippingMethodCode": "string",
"shippingMethodName": "string",
"standaloneGroup": true,
"shippingDiscounts": [
{
"methodCode": "string",
"discount": {
"impact": 0,
"discount": {
"id": 0,
"name": "string",
"itemIds": [
"string"
],
"expirationDate": "2025-02-18T02:41:59.345Z",
"hasMultipleTargetProducts": true
},
"couponCode": "string",
"excluded": true,
"data": {}
}
}
],
"handlingDiscounts": [
{
"impact": 0,
"discount": {
"id": 0,
"name": "string",
"itemIds": [
"string"
],
"expirationDate": "2025-02-18T02:41:59.345Z",
"hasMultipleTargetProducts": true
},
"couponCode": "string",
"excluded": true,
"data": {}
}
],
"dutyAmount": 0,
"dutyTotal": 0,
"shippingAmount": 0,
"shippingSubTotal": 0,
"itemLevelShippingDiscountTotal": 0,
"orderLevelShippingDiscountTotal": 0,
"shippingTax": 0,
"shippingTaxTotal": 0,
"shippingTotal": 0,
"handlingAmount": 0,
"handlingSubTotal": 0,
"itemLevelHandlingDiscountTotal": 0,
"orderLevelHandlingDiscountTotal": 0,
"handlingTax": 0,
"handlingTaxTotal": 0,
"handlingTotal": 0,
"taxData": {}
}
],
"auditInfo": {
"updateDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z",
"updateBy": "string",
"createBy": "string"
},
"destinations": [
{
"id": "string",
"destinationContact": {
"id": 0,
"email": "string",
"firstName": "string",
"middleNameOrInitial": "string",
"lastNameOrSurname": "string",
"companyOrOrganization": "string",
"phoneNumbers": {
"home": "string",
"mobile": "string",
"work": "string"
},
"address": {
"address1": "string",
"address2": "string",
"address3": "string",
"address4": "string",
"cityOrTown": "string",
"stateOrProvince": "string",
"postalOrZipCode": "string",
"countryCode": "string",
"addressType": "string",
"isValidated": true
}
},
"isDestinationCommercial": true,
"data": {}
}
],
"payments": [
{
"id": "string",
"groupId": {
"targetType": "string",
"targetId": "string",
"targetNumber": 0
},
"paymentServiceTransactionId": "string",
"availableActions": [
"string"
],
"orderId": "string",
"paymentType": "string",
"paymentWorkflow": "string",
"externalTransactionId": "string",
"billingInfo": {
"paymentType": "string",
"paymentWorkflow": "string",
"billingContact": {
"id": 0,
"email": "string",
"firstName": "string",
"middleNameOrInitial": "string",
"lastNameOrSurname": "string",
"companyOrOrganization": "string",
"phoneNumbers": {
"home": "string",
"mobile": "string",
"work": "string"
},
"address": {
"address1": "string",
"address2": "string",
"address3": "string",
"address4": "string",
"cityOrTown": "string",
"stateOrProvince": "string",
"postalOrZipCode": "string",
"countryCode": "string",
"addressType": "string",
"isValidated": true
}
},
"isSameBillingShippingAddress": true,
"card": {
"paymentServiceCardId": "string",
"isUsedRecurring": true,
"nameOnCard": "string",
"isCardInfoSaved": true,
"isTokenized": true,
"ccLastFour": "string",
"paymentOrCardType": "string",
"cardNumberPartOrMask": "string",
"expireMonth": 0,
"expireYear": 0,
"bin": "string"
},
"token": {
"paymentServiceTokenId": "string",
"type": "string"
},
"purchaseOrder": {
"purchaseOrderNumber": "string",
"paymentTerm": {
"code": "string",
"description": "string"
},
"customFields": [
{
"code": "string",
"label": "string",
"value": "string"
}
]
},
"check": {
"checkNumber": "string"
},
"auditInfo": {
"updateDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z",
"updateBy": "string",
"createBy": "string"
},
"storeCreditCode": "string",
"storeCreditType": "string",
"customCreditType": "string",
"externalTransactionId": "string",
"isRecurring": true,
"recurringTransactionId": "string",
"data": {}
},
"data": {},
"status": "string",
"subPayments": [
{
"status": "string",
"amountCollected": 0,
"amountCredited": 0,
"amountRequested": 0,
"amountRefunded": 0,
"target": {
"targetType": "string",
"targetId": "string",
"targetNumber": 0
}
}
],
"interactions": [
{
"id": "string",
"gatewayInteractionId": 0,
"paymentId": "string",
"orderId": "string",
"target": {
"targetType": "string",
"targetId": "string",
"targetNumber": 0
},
"currencyCode": "string",
"interactionType": "string",
"checkNumber": "string",
"status": "string",
"paymentEntryStatus": "string",
"isRecurring": true,
"isManual": true,
"isPending": true,
"gatewayTransactionId": "string",
"gatewayAuthCode": "string",
"gatewayAVSCodes": "string",
"gatewayCVV2Codes": "string",
"gatewayResponseCode": "string",
"gatewayResponseText": "string",
"gatewayResponseData": [
{
"key": "string",
"value": "string"
}
],
"paymentTransactionInteractionIdReference": 0,
"amount": 0,
"note": "string",
"interactionDate": "2025-02-18T02:41:59.345Z",
"auditInfo": {
"updateDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z",
"updateBy": "string",
"createBy": "string"
},
"returnId": "string",
"refundId": "string",
"capturableShipmentsSummary": [
{
"shipmentNumber": 0,
"shipmentTotal": 0,
"amountApplied": 0
}
]
}
],
"isRecurring": true,
"amountCollected": 0,
"amountCredited": 0,
"amountRequested": 0,
"changeMessages": [
{
"id": "string",
"correlationId": "string",
"userId": "string",
"userFirstName": "string",
"userLastName": "string",
"userScopeType": "string",
"appId": "string",
"appKey": "string",
"appName": "string",
"subjectType": "string",
"success": true,
"identifier": "string",
"subject": "string",
"verb": "string",
"message": "string",
"createDate": "2025-02-18T02:41:59.345Z",
"attributes": {}
}
],
"auditInfo": {
"updateDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z",
"updateBy": "string",
"createBy": "string"
},
"gatewayGiftCard": {
"id": "string",
"cardNumber": "string",
"cardPin": "string",
"amount": 0,
"currencyCode": "string"
},
"installmentPlanCode": "string"
}
],
"amountRemainingForPayment": 0,
"acceptsMarketing": true,
"customerAccountId": 0,
"email": "string",
"alternateContact": {
"firstName": "string",
"lastNameOrSurname": "string",
"emailAddress": "string",
"phoneNumber": "string"
},
"customerTaxId": "string",
"isTaxExempt": true,
"currencyCode": "string",
"priceListCode": "string",
"attributes": [
{
"auditInfo": {
"updateDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z",
"updateBy": "string",
"createBy": "string"
},
"fullyQualifiedName": "string",
"attributeDefinitionId": 0,
"values": [
null
]
}
],
"shopperNotes": {
"giftMessage": "string",
"comments": "string",
"deliveryInstructions": "string"
},
"availableActions": [
"string"
],
"data": {},
"taxData": {},
"channelCode": "string",
"locationCode": "string",
"ipAddress": "string",
"sourceDevice": "string",
"visitId": "string",
"webSessionId": "string",
"customerInteractionType": "string",
"orderDiscounts": [
{
"impact": 0,
"discount": {
"id": 0,
"name": "string",
"itemIds": [
"string"
],
"expirationDate": "2025-02-18T02:41:59.345Z",
"hasMultipleTargetProducts": true
},
"couponCode": "string",
"excluded": true,
"data": {}
}
],
"couponCodes": [
"string"
],
"invalidCoupons": [
{
"couponCode": "string",
"reasonCode": 0,
"reason": "string",
"createDate": "2025-02-18T02:41:59.345Z",
"discountId": 0
}
],
"suggestedDiscounts": [
{
"productCode": "string",
"autoAdd": true,
"discountId": 0,
"hasMultipleProducts": true,
"hasOptions": true
}
],
"discountThresholdMessages": [
{
"discountId": 0,
"message": "string",
"thresholdValue": 0,
"showOnCheckout": true,
"showInCart": true,
"requiresCouponCode": true
}
],
"dutyTotal": 0,
"feeTotal": 0,
"subTotal": 0,
"itemLevelProductDiscountTotal": 0,
"orderLevelProductDiscountTotal": 0,
"itemTaxTotal": 0,
"itemTotal": 0,
"shippingSubTotal": 0,
"itemLevelShippingDiscountTotal": 0,
"orderLevelShippingDiscountTotal": 0,
"shippingTaxTotal": 0,
"shippingTotal": 0,
"handlingSubTotal": 0,
"itemLevelHandlingDiscountTotal": 0,
"orderLevelHandlingDiscountTotal": 0,
"handlingTaxTotal": 0,
"handlingTotal": 0,
"total": 0
}
For information about the properties in the response, refer to the REST API Help.
exec.removeAttribute
Removes an attribute from the checkout.
Parameters | Type | Description |
---|---|---|
fqn | string | Fully-qualified name of the attribute. Must apply to an existing attribute. |
Example:
context.exec.removeAttribute("attributeName");
Response:
{
"id": "string",
"siteId": 0,
"tenantId": 0,
"number": 0,
"originalCartId": "string",
"submittedDate": "2025-02-18T02:41:59.345Z",
"type": "string",
"items": [
{
"id": "string",
"destinationId": "string",
"originalCartItemId": "string",
"fulfillmentLocationCode": "string",
"fulfillmentMethod": "string",
"dutyAmount": 0,
"expectedDeliveryDate": "2025-02-18T02:41:59.345Z",
"subscription": {
"required": true,
"frequency": {
"unit": "string",
"value": 0
},
"trial": {
"enabled": true,
"duration": 0,
"substituteProductCode": "string",
"substituteProductQuantity": 0,
"substituteVariationProductCode": "string",
"substituteProductOptions": [
{
"name": "string",
"attributeFQN": "string",
"dataType": "string",
"stringValue": "string"
}
]
}
},
"isReservationEnabled": true,
"giftInfo": {
"isGiftItem": true,
"giftMessage": "string"
},
"priceMode": "string",
"returnRuleInfo": {
"isReturnable": true,
"maxQty": 0,
"maxDays": 0,
"ruleCode": "string"
},
"localeCode": "string",
"purchaseLocation": "string",
"lineId": 0,
"product": {
"mfgPartNumber": "string",
"upc": "string",
"sku": "string",
"fulfillmentTypesSupported": [
"string"
],
"imageAlternateText": "string",
"imageUrl": "string",
"variationProductCode": "string",
"options": [
{
"name": "string",
"attributeFQN": "string",
"dataType": "string",
"stringValue": "string"
}
],
"properties": [
{
"attributeFQN": "string",
"name": "string",
"dataType": "string",
"isMultiValue": true,
"values": [
{
"stringValue": "string"
}
]
}
],
"categories": [
{
"id": 0,
"parent": {}
}
],
"price": {
"price": 0,
"salePrice": 0,
"tenantOverridePrice": 0,
"msrp": 0,
"creditValue": 0,
"priceListCode": "string",
"priceListEntryMode": "string",
"isOverRidePriceSalePrice": true
},
"discountsRestricted": true,
"discountsRestrictedStartDate": "2025-02-18T02:41:59.345Z",
"discountsRestrictedEndDate": "2025-02-18T02:41:59.345Z",
"isRecurring": true,
"isTaxable": true,
"productType": "string",
"productUsage": "string",
"serialNumber": "string",
"condition": "string",
"bundledProducts": [
{
"quantity": 0,
"optionAttributeFQN": "string",
"creditValue": 0,
"deltaPrice": 0,
"imageUrl": "string",
"productCode": "string",
"name": "string",
"description": "string",
"goodsType": "string",
"isPackagedStandAlone": true,
"stock": {
"manageStock": true,
"isOnBackOrder": true,
"availableDate": "2025-02-18T02:41:59.345Z",
"stockAvailable": 0,
"aggregateInventory": 0,
"futureInventories": [
{
"futureInventoryID": 0,
"onhand": 0,
"available": 0,
"allocated": 0,
"pending": 0,
"deliveryDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z"
}
],
"availableFutureInventories": 0,
"totalAvailableStock": 0,
"isSubstitutable": true
},
"productReservationId": 0,
"allocationId": 0,
"allocationExpiration": "2025-02-18T02:41:59.345Z",
"measurements": {
"height": {
"unit": "string",
"value": 0
},
"width": {
"unit": "string",
"value": 0
},
"length": {
"unit": "string",
"value": 0
},
"weight": {
"unit": "string",
"value": 0
}
},
"fulfillmentStatus": "string"
}
],
"fulfillmentFields": [
{
"name": "string",
"required": true
}
],
"productCode": "string",
"name": "string",
"description": "string",
"goodsType": "string",
"isPackagedStandAlone": true,
"stock": {
"manageStock": true,
"isOnBackOrder": true,
"availableDate": "2025-02-18T02:41:59.345Z",
"stockAvailable": 0,
"aggregateInventory": 0,
"futureInventories": [
{
"futureInventoryID": 0,
"onhand": 0,
"available": 0,
"allocated": 0,
"pending": 0,
"deliveryDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z"
}
],
"availableFutureInventories": 0,
"totalAvailableStock": 0,
"isSubstitutable": true
},
"productReservationId": 0,
"allocationId": 0,
"allocationExpiration": "2025-02-18T02:41:59.345Z",
"measurements": {
"height": {
"unit": "string",
"value": 0
},
"width": {
"unit": "string",
"value": 0
},
"length": {
"unit": "string",
"value": 0
},
"weight": {
"unit": "string",
"value": 0
}
},
"fulfillmentStatus": "string"
},
"quantity": 0,
"isRecurring": true,
"isTaxable": true,
"subtotal": 0,
"extendedTotal": 0,
"taxableTotal": 0,
"discountTotal": 0,
"discountedTotal": 0,
"itemTaxTotal": 0,
"shippingTaxTotal": 0,
"shippingTotal": 0,
"handlingAmount": 0,
"feeTotal": 0,
"total": 0,
"unitPrice": {
"extendedAmount": 0,
"listAmount": 0,
"saleAmount": 0,
"overrideAmount": 0
},
"productDiscount": {
"appliesToSalePrice": true,
"discountQuantity": 0,
"impact": 0,
"discount": {
"id": 0,
"name": "string",
"itemIds": [
"string"
],
"expirationDate": "2025-02-18T02:41:59.345Z",
"hasMultipleTargetProducts": true
},
"couponCode": "string",
"excluded": true,
"data": {}
},
"productDiscounts": [
{
"appliesToSalePrice": true,
"discountQuantity": 0,
"impact": 0,
"discount": {
"id": 0,
"name": "string",
"itemIds": [
"string"
],
"expirationDate": "2025-02-18T02:41:59.345Z",
"hasMultipleTargetProducts": true
},
"couponCode": "string",
"excluded": true,
"data": {}
}
],
"shippingDiscounts": [
{
"methodCode": "string",
"discount": {
"impact": 0,
"discount": {
"id": 0,
"name": "string",
"itemIds": [
"string"
],
"expirationDate": "2025-02-18T02:41:59.345Z",
"hasMultipleTargetProducts": true
},
"couponCode": "string",
"excluded": true,
"data": {}
},
"discountQuantity": 0,
"impactPerUnit": 0
}
],
"data": {},
"taxData": {},
"auditInfo": {
"updateDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z",
"updateBy": "string",
"createBy": "string"
},
"shippingAmountBeforeDiscountsAndAdjustments": 0,
"weightedOrderAdjustment": 0,
"weightedOrderDiscount": 0,
"adjustedLineItemSubtotal": 0,
"totalWithoutWeightedShippingAndHandling": 0,
"weightedOrderTax": 0,
"weightedOrderShipping": 0,
"weightedOrderShippingDiscount": 0,
"weightedOrderShippingManualAdjustment": 0,
"weightedOrderShippingTax": 0,
"weightedOrderHandlingFee": 0,
"weightedOrderHandlingFeeTax": 0,
"weightedOrderHandlingFeeDiscount": 0,
"weightedOrderDuty": 0,
"totalWithWeightedShippingAndHandling": 0,
"weightedOrderHandlingAdjustment": 0,
"autoAddDiscountId": 0,
"isAssemblyRequired": true,
"childItemIds": [
"string"
],
"parentItemId": "string",
"inventoryTags": [
{
"name": "string",
"value": "string"
}
],
"lineItemAdjustment": 0,
"substituteInfo": {
"optIn": "string",
"substituteProductCode": "string",
"substituteVariantCode": "string"
}
}
],
"groupings": [
{
"id": "string",
"destinationId": "string",
"fulfillmentMethod": "string",
"orderItemIds": [
"string"
],
"shippingMethodCode": "string",
"shippingMethodName": "string",
"standaloneGroup": true,
"shippingDiscounts": [
{
"methodCode": "string",
"discount": {
"impact": 0,
"discount": {
"id": 0,
"name": "string",
"itemIds": [
"string"
],
"expirationDate": "2025-02-18T02:41:59.345Z",
"hasMultipleTargetProducts": true
},
"couponCode": "string",
"excluded": true,
"data": {}
}
}
],
"handlingDiscounts": [
{
"impact": 0,
"discount": {
"id": 0,
"name": "string",
"itemIds": [
"string"
],
"expirationDate": "2025-02-18T02:41:59.345Z",
"hasMultipleTargetProducts": true
},
"couponCode": "string",
"excluded": true,
"data": {}
}
],
"dutyAmount": 0,
"dutyTotal": 0,
"shippingAmount": 0,
"shippingSubTotal": 0,
"itemLevelShippingDiscountTotal": 0,
"orderLevelShippingDiscountTotal": 0,
"shippingTax": 0,
"shippingTaxTotal": 0,
"shippingTotal": 0,
"handlingAmount": 0,
"handlingSubTotal": 0,
"itemLevelHandlingDiscountTotal": 0,
"orderLevelHandlingDiscountTotal": 0,
"handlingTax": 0,
"handlingTaxTotal": 0,
"handlingTotal": 0,
"taxData": {}
}
],
"auditInfo": {
"updateDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z",
"updateBy": "string",
"createBy": "string"
},
"destinations": [
{
"id": "string",
"destinationContact": {
"id": 0,
"email": "string",
"firstName": "string",
"middleNameOrInitial": "string",
"lastNameOrSurname": "string",
"companyOrOrganization": "string",
"phoneNumbers": {
"home": "string",
"mobile": "string",
"work": "string"
},
"address": {
"address1": "string",
"address2": "string",
"address3": "string",
"address4": "string",
"cityOrTown": "string",
"stateOrProvince": "string",
"postalOrZipCode": "string",
"countryCode": "string",
"addressType": "string",
"isValidated": true
}
},
"isDestinationCommercial": true,
"data": {}
}
],
"payments": [
{
"id": "string",
"groupId": {
"targetType": "string",
"targetId": "string",
"targetNumber": 0
},
"paymentServiceTransactionId": "string",
"availableActions": [
"string"
],
"orderId": "string",
"paymentType": "string",
"paymentWorkflow": "string",
"externalTransactionId": "string",
"billingInfo": {
"paymentType": "string",
"paymentWorkflow": "string",
"billingContact": {
"id": 0,
"email": "string",
"firstName": "string",
"middleNameOrInitial": "string",
"lastNameOrSurname": "string",
"companyOrOrganization": "string",
"phoneNumbers": {
"home": "string",
"mobile": "string",
"work": "string"
},
"address": {
"address1": "string",
"address2": "string",
"address3": "string",
"address4": "string",
"cityOrTown": "string",
"stateOrProvince": "string",
"postalOrZipCode": "string",
"countryCode": "string",
"addressType": "string",
"isValidated": true
}
},
"isSameBillingShippingAddress": true,
"card": {
"paymentServiceCardId": "string",
"isUsedRecurring": true,
"nameOnCard": "string",
"isCardInfoSaved": true,
"isTokenized": true,
"ccLastFour": "string",
"paymentOrCardType": "string",
"cardNumberPartOrMask": "string",
"expireMonth": 0,
"expireYear": 0,
"bin": "string"
},
"token": {
"paymentServiceTokenId": "string",
"type": "string"
},
"purchaseOrder": {
"purchaseOrderNumber": "string",
"paymentTerm": {
"code": "string",
"description": "string"
},
"customFields": [
{
"code": "string",
"label": "string",
"value": "string"
}
]
},
"check": {
"checkNumber": "string"
},
"auditInfo": {
"updateDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z",
"updateBy": "string",
"createBy": "string"
},
"storeCreditCode": "string",
"storeCreditType": "string",
"customCreditType": "string",
"externalTransactionId": "string",
"isRecurring": true,
"recurringTransactionId": "string",
"data": {}
},
"data": {},
"status": "string",
"subPayments": [
{
"status": "string",
"amountCollected": 0,
"amountCredited": 0,
"amountRequested": 0,
"amountRefunded": 0,
"target": {
"targetType": "string",
"targetId": "string",
"targetNumber": 0
}
}
],
"interactions": [
{
"id": "string",
"gatewayInteractionId": 0,
"paymentId": "string",
"orderId": "string",
"target": {
"targetType": "string",
"targetId": "string",
"targetNumber": 0
},
"currencyCode": "string",
"interactionType": "string",
"checkNumber": "string",
"status": "string",
"paymentEntryStatus": "string",
"isRecurring": true,
"isManual": true,
"isPending": true,
"gatewayTransactionId": "string",
"gatewayAuthCode": "string",
"gatewayAVSCodes": "string",
"gatewayCVV2Codes": "string",
"gatewayResponseCode": "string",
"gatewayResponseText": "string",
"gatewayResponseData": [
{
"key": "string",
"value": "string"
}
],
"paymentTransactionInteractionIdReference": 0,
"amount": 0,
"note": "string",
"interactionDate": "2025-02-18T02:41:59.345Z",
"auditInfo": {
"updateDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z",
"updateBy": "string",
"createBy": "string"
},
"returnId": "string",
"refundId": "string",
"capturableShipmentsSummary": [
{
"shipmentNumber": 0,
"shipmentTotal": 0,
"amountApplied": 0
}
]
}
],
"isRecurring": true,
"amountCollected": 0,
"amountCredited": 0,
"amountRequested": 0,
"changeMessages": [
{
"id": "string",
"correlationId": "string",
"userId": "string",
"userFirstName": "string",
"userLastName": "string",
"userScopeType": "string",
"appId": "string",
"appKey": "string",
"appName": "string",
"subjectType": "string",
"success": true,
"identifier": "string",
"subject": "string",
"verb": "string",
"message": "string",
"createDate": "2025-02-18T02:41:59.345Z",
"attributes": {}
}
],
"auditInfo": {
"updateDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z",
"updateBy": "string",
"createBy": "string"
},
"gatewayGiftCard": {
"id": "string",
"cardNumber": "string",
"cardPin": "string",
"amount": 0,
"currencyCode": "string"
},
"installmentPlanCode": "string"
}
],
"amountRemainingForPayment": 0,
"acceptsMarketing": true,
"customerAccountId": 0,
"email": "string",
"alternateContact": {
"firstName": "string",
"lastNameOrSurname": "string",
"emailAddress": "string",
"phoneNumber": "string"
},
"customerTaxId": "string",
"isTaxExempt": true,
"currencyCode": "string",
"priceListCode": "string",
"attributes": [
{
"auditInfo": {
"updateDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z",
"updateBy": "string",
"createBy": "string"
},
"fullyQualifiedName": "string",
"attributeDefinitionId": 0,
"values": [
null
]
}
],
"shopperNotes": {
"giftMessage": "string",
"comments": "string",
"deliveryInstructions": "string"
},
"availableActions": [
"string"
],
"data": {},
"taxData": {},
"channelCode": "string",
"locationCode": "string",
"ipAddress": "string",
"sourceDevice": "string",
"visitId": "string",
"webSessionId": "string",
"customerInteractionType": "string",
"orderDiscounts": [
{
"impact": 0,
"discount": {
"id": 0,
"name": "string",
"itemIds": [
"string"
],
"expirationDate": "2025-02-18T02:41:59.345Z",
"hasMultipleTargetProducts": true
},
"couponCode": "string",
"excluded": true,
"data": {}
}
],
"couponCodes": [
"string"
],
"invalidCoupons": [
{
"couponCode": "string",
"reasonCode": 0,
"reason": "string",
"createDate": "2025-02-18T02:41:59.345Z",
"discountId": 0
}
],
"suggestedDiscounts": [
{
"productCode": "string",
"autoAdd": true,
"discountId": 0,
"hasMultipleProducts": true,
"hasOptions": true
}
],
"discountThresholdMessages": [
{
"discountId": 0,
"message": "string",
"thresholdValue": 0,
"showOnCheckout": true,
"showInCart": true,
"requiresCouponCode": true
}
],
"dutyTotal": 0,
"feeTotal": 0,
"subTotal": 0,
"itemLevelProductDiscountTotal": 0,
"orderLevelProductDiscountTotal": 0,
"itemTaxTotal": 0,
"itemTotal": 0,
"shippingSubTotal": 0,
"itemLevelShippingDiscountTotal": 0,
"orderLevelShippingDiscountTotal": 0,
"shippingTaxTotal": 0,
"shippingTotal": 0,
"handlingSubTotal": 0,
"itemLevelHandlingDiscountTotal": 0,
"orderLevelHandlingDiscountTotal": 0,
"handlingTaxTotal": 0,
"handlingTotal": 0,
"total": 0
}
For information about the properties in the response, refer to the REST API Help.
exec.setData
Sets custom key/value data on the current checkout.
Parameters | Type | Description |
---|---|---|
key | string | Key of the data to set on the checkout. |
value | object | Value of the data to set. |
Example:
context.exec.setData("customField", value);
Response:
{
"id": "string",
"siteId": 0,
"tenantId": 0,
"number": 0,
"originalCartId": "string",
"submittedDate": "2025-02-18T02:41:59.345Z",
"type": "string",
"items": [
{
"id": "string",
"destinationId": "string",
"originalCartItemId": "string",
"fulfillmentLocationCode": "string",
"fulfillmentMethod": "string",
"dutyAmount": 0,
"expectedDeliveryDate": "2025-02-18T02:41:59.345Z",
"subscription": {
"required": true,
"frequency": {
"unit": "string",
"value": 0
},
"trial": {
"enabled": true,
"duration": 0,
"substituteProductCode": "string",
"substituteProductQuantity": 0,
"substituteVariationProductCode": "string",
"substituteProductOptions": [
{
"name": "string",
"attributeFQN": "string",
"dataType": "string",
"stringValue": "string"
}
]
}
},
"isReservationEnabled": true,
"giftInfo": {
"isGiftItem": true,
"giftMessage": "string"
},
"priceMode": "string",
"returnRuleInfo": {
"isReturnable": true,
"maxQty": 0,
"maxDays": 0,
"ruleCode": "string"
},
"localeCode": "string",
"purchaseLocation": "string",
"lineId": 0,
"product": {
"mfgPartNumber": "string",
"upc": "string",
"sku": "string",
"fulfillmentTypesSupported": [
"string"
],
"imageAlternateText": "string",
"imageUrl": "string",
"variationProductCode": "string",
"options": [
{
"name": "string",
"attributeFQN": "string",
"dataType": "string",
"stringValue": "string"
}
],
"properties": [
{
"attributeFQN": "string",
"name": "string",
"dataType": "string",
"isMultiValue": true,
"values": [
{
"stringValue": "string"
}
]
}
],
"categories": [
{
"id": 0,
"parent": {}
}
],
"price": {
"price": 0,
"salePrice": 0,
"tenantOverridePrice": 0,
"msrp": 0,
"creditValue": 0,
"priceListCode": "string",
"priceListEntryMode": "string",
"isOverRidePriceSalePrice": true
},
"discountsRestricted": true,
"discountsRestrictedStartDate": "2025-02-18T02:41:59.345Z",
"discountsRestrictedEndDate": "2025-02-18T02:41:59.345Z",
"isRecurring": true,
"isTaxable": true,
"productType": "string",
"productUsage": "string",
"serialNumber": "string",
"condition": "string",
"bundledProducts": [
{
"quantity": 0,
"optionAttributeFQN": "string",
"creditValue": 0,
"deltaPrice": 0,
"imageUrl": "string",
"productCode": "string",
"name": "string",
"description": "string",
"goodsType": "string",
"isPackagedStandAlone": true,
"stock": {
"manageStock": true,
"isOnBackOrder": true,
"availableDate": "2025-02-18T02:41:59.345Z",
"stockAvailable": 0,
"aggregateInventory": 0,
"futureInventories": [
{
"futureInventoryID": 0,
"onhand": 0,
"available": 0,
"allocated": 0,
"pending": 0,
"deliveryDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z"
}
],
"availableFutureInventories": 0,
"totalAvailableStock": 0,
"isSubstitutable": true
},
"productReservationId": 0,
"allocationId": 0,
"allocationExpiration": "2025-02-18T02:41:59.345Z",
"measurements": {
"height": {
"unit": "string",
"value": 0
},
"width": {
"unit": "string",
"value": 0
},
"length": {
"unit": "string",
"value": 0
},
"weight": {
"unit": "string",
"value": 0
}
},
"fulfillmentStatus": "string"
}
],
"fulfillmentFields": [
{
"name": "string",
"required": true
}
],
"productCode": "string",
"name": "string",
"description": "string",
"goodsType": "string",
"isPackagedStandAlone": true,
"stock": {
"manageStock": true,
"isOnBackOrder": true,
"availableDate": "2025-02-18T02:41:59.345Z",
"stockAvailable": 0,
"aggregateInventory": 0,
"futureInventories": [
{
"futureInventoryID": 0,
"onhand": 0,
"available": 0,
"allocated": 0,
"pending": 0,
"deliveryDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z"
}
],
"availableFutureInventories": 0,
"totalAvailableStock": 0,
"isSubstitutable": true
},
"productReservationId": 0,
"allocationId": 0,
"allocationExpiration": "2025-02-18T02:41:59.345Z",
"measurements": {
"height": {
"unit": "string",
"value": 0
},
"width": {
"unit": "string",
"value": 0
},
"length": {
"unit": "string",
"value": 0
},
"weight": {
"unit": "string",
"value": 0
}
},
"fulfillmentStatus": "string"
},
"quantity": 0,
"isRecurring": true,
"isTaxable": true,
"subtotal": 0,
"extendedTotal": 0,
"taxableTotal": 0,
"discountTotal": 0,
"discountedTotal": 0,
"itemTaxTotal": 0,
"shippingTaxTotal": 0,
"shippingTotal": 0,
"handlingAmount": 0,
"feeTotal": 0,
"total": 0,
"unitPrice": {
"extendedAmount": 0,
"listAmount": 0,
"saleAmount": 0,
"overrideAmount": 0
},
"productDiscount": {
"appliesToSalePrice": true,
"discountQuantity": 0,
"impact": 0,
"discount": {
"id": 0,
"name": "string",
"itemIds": [
"string"
],
"expirationDate": "2025-02-18T02:41:59.345Z",
"hasMultipleTargetProducts": true
},
"couponCode": "string",
"excluded": true,
"data": {}
},
"productDiscounts": [
{
"appliesToSalePrice": true,
"discountQuantity": 0,
"impact": 0,
"discount": {
"id": 0,
"name": "string",
"itemIds": [
"string"
],
"expirationDate": "2025-02-18T02:41:59.345Z",
"hasMultipleTargetProducts": true
},
"couponCode": "string",
"excluded": true,
"data": {}
}
],
"shippingDiscounts": [
{
"methodCode": "string",
"discount": {
"impact": 0,
"discount": {
"id": 0,
"name": "string",
"itemIds": [
"string"
],
"expirationDate": "2025-02-18T02:41:59.345Z",
"hasMultipleTargetProducts": true
},
"couponCode": "string",
"excluded": true,
"data": {}
},
"discountQuantity": 0,
"impactPerUnit": 0
}
],
"data": {},
"taxData": {},
"auditInfo": {
"updateDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z",
"updateBy": "string",
"createBy": "string"
},
"shippingAmountBeforeDiscountsAndAdjustments": 0,
"weightedOrderAdjustment": 0,
"weightedOrderDiscount": 0,
"adjustedLineItemSubtotal": 0,
"totalWithoutWeightedShippingAndHandling": 0,
"weightedOrderTax": 0,
"weightedOrderShipping": 0,
"weightedOrderShippingDiscount": 0,
"weightedOrderShippingManualAdjustment": 0,
"weightedOrderShippingTax": 0,
"weightedOrderHandlingFee": 0,
"weightedOrderHandlingFeeTax": 0,
"weightedOrderHandlingFeeDiscount": 0,
"weightedOrderDuty": 0,
"totalWithWeightedShippingAndHandling": 0,
"weightedOrderHandlingAdjustment": 0,
"autoAddDiscountId": 0,
"isAssemblyRequired": true,
"childItemIds": [
"string"
],
"parentItemId": "string",
"inventoryTags": [
{
"name": "string",
"value": "string"
}
],
"lineItemAdjustment": 0,
"substituteInfo": {
"optIn": "string",
"substituteProductCode": "string",
"substituteVariantCode": "string"
}
}
],
"groupings": [
{
"id": "string",
"destinationId": "string",
"fulfillmentMethod": "string",
"orderItemIds": [
"string"
],
"shippingMethodCode": "string",
"shippingMethodName": "string",
"standaloneGroup": true,
"shippingDiscounts": [
{
"methodCode": "string",
"discount": {
"impact": 0,
"discount": {
"id": 0,
"name": "string",
"itemIds": [
"string"
],
"expirationDate": "2025-02-18T02:41:59.345Z",
"hasMultipleTargetProducts": true
},
"couponCode": "string",
"excluded": true,
"data": {}
}
}
],
"handlingDiscounts": [
{
"impact": 0,
"discount": {
"id": 0,
"name": "string",
"itemIds": [
"string"
],
"expirationDate": "2025-02-18T02:41:59.345Z",
"hasMultipleTargetProducts": true
},
"couponCode": "string",
"excluded": true,
"data": {}
}
],
"dutyAmount": 0,
"dutyTotal": 0,
"shippingAmount": 0,
"shippingSubTotal": 0,
"itemLevelShippingDiscountTotal": 0,
"orderLevelShippingDiscountTotal": 0,
"shippingTax": 0,
"shippingTaxTotal": 0,
"shippingTotal": 0,
"handlingAmount": 0,
"handlingSubTotal": 0,
"itemLevelHandlingDiscountTotal": 0,
"orderLevelHandlingDiscountTotal": 0,
"handlingTax": 0,
"handlingTaxTotal": 0,
"handlingTotal": 0,
"taxData": {}
}
],
"auditInfo": {
"updateDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z",
"updateBy": "string",
"createBy": "string"
},
"destinations": [
{
"id": "string",
"destinationContact": {
"id": 0,
"email": "string",
"firstName": "string",
"middleNameOrInitial": "string",
"lastNameOrSurname": "string",
"companyOrOrganization": "string",
"phoneNumbers": {
"home": "string",
"mobile": "string",
"work": "string"
},
"address": {
"address1": "string",
"address2": "string",
"address3": "string",
"address4": "string",
"cityOrTown": "string",
"stateOrProvince": "string",
"postalOrZipCode": "string",
"countryCode": "string",
"addressType": "string",
"isValidated": true
}
},
"isDestinationCommercial": true,
"data": {}
}
],
"payments": [
{
"id": "string",
"groupId": {
"targetType": "string",
"targetId": "string",
"targetNumber": 0
},
"paymentServiceTransactionId": "string",
"availableActions": [
"string"
],
"orderId": "string",
"paymentType": "string",
"paymentWorkflow": "string",
"externalTransactionId": "string",
"billingInfo": {
"paymentType": "string",
"paymentWorkflow": "string",
"billingContact": {
"id": 0,
"email": "string",
"firstName": "string",
"middleNameOrInitial": "string",
"lastNameOrSurname": "string",
"companyOrOrganization": "string",
"phoneNumbers": {
"home": "string",
"mobile": "string",
"work": "string"
},
"address": {
"address1": "string",
"address2": "string",
"address3": "string",
"address4": "string",
"cityOrTown": "string",
"stateOrProvince": "string",
"postalOrZipCode": "string",
"countryCode": "string",
"addressType": "string",
"isValidated": true
}
},
"isSameBillingShippingAddress": true,
"card": {
"paymentServiceCardId": "string",
"isUsedRecurring": true,
"nameOnCard": "string",
"isCardInfoSaved": true,
"isTokenized": true,
"ccLastFour": "string",
"paymentOrCardType": "string",
"cardNumberPartOrMask": "string",
"expireMonth": 0,
"expireYear": 0,
"bin": "string"
},
"token": {
"paymentServiceTokenId": "string",
"type": "string"
},
"purchaseOrder": {
"purchaseOrderNumber": "string",
"paymentTerm": {
"code": "string",
"description": "string"
},
"customFields": [
{
"code": "string",
"label": "string",
"value": "string"
}
]
},
"check": {
"checkNumber": "string"
},
"auditInfo": {
"updateDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z",
"updateBy": "string",
"createBy": "string"
},
"storeCreditCode": "string",
"storeCreditType": "string",
"customCreditType": "string",
"externalTransactionId": "string",
"isRecurring": true,
"recurringTransactionId": "string",
"data": {}
},
"data": {},
"status": "string",
"subPayments": [
{
"status": "string",
"amountCollected": 0,
"amountCredited": 0,
"amountRequested": 0,
"amountRefunded": 0,
"target": {
"targetType": "string",
"targetId": "string",
"targetNumber": 0
}
}
],
"interactions": [
{
"id": "string",
"gatewayInteractionId": 0,
"paymentId": "string",
"orderId": "string",
"target": {
"targetType": "string",
"targetId": "string",
"targetNumber": 0
},
"currencyCode": "string",
"interactionType": "string",
"checkNumber": "string",
"status": "string",
"paymentEntryStatus": "string",
"isRecurring": true,
"isManual": true,
"isPending": true,
"gatewayTransactionId": "string",
"gatewayAuthCode": "string",
"gatewayAVSCodes": "string",
"gatewayCVV2Codes": "string",
"gatewayResponseCode": "string",
"gatewayResponseText": "string",
"gatewayResponseData": [
{
"key": "string",
"value": "string"
}
],
"paymentTransactionInteractionIdReference": 0,
"amount": 0,
"note": "string",
"interactionDate": "2025-02-18T02:41:59.345Z",
"auditInfo": {
"updateDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z",
"updateBy": "string",
"createBy": "string"
},
"returnId": "string",
"refundId": "string",
"capturableShipmentsSummary": [
{
"shipmentNumber": 0,
"shipmentTotal": 0,
"amountApplied": 0
}
]
}
],
"isRecurring": true,
"amountCollected": 0,
"amountCredited": 0,
"amountRequested": 0,
"changeMessages": [
{
"id": "string",
"correlationId": "string",
"userId": "string",
"userFirstName": "string",
"userLastName": "string",
"userScopeType": "string",
"appId": "string",
"appKey": "string",
"appName": "string",
"subjectType": "string",
"success": true,
"identifier": "string",
"subject": "string",
"verb": "string",
"message": "string",
"createDate": "2025-02-18T02:41:59.345Z",
"attributes": {}
}
],
"auditInfo": {
"updateDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z",
"updateBy": "string",
"createBy": "string"
},
"gatewayGiftCard": {
"id": "string",
"cardNumber": "string",
"cardPin": "string",
"amount": 0,
"currencyCode": "string"
},
"installmentPlanCode": "string"
}
],
"amountRemainingForPayment": 0,
"acceptsMarketing": true,
"customerAccountId": 0,
"email": "string",
"alternateContact": {
"firstName": "string",
"lastNameOrSurname": "string",
"emailAddress": "string",
"phoneNumber": "string"
},
"customerTaxId": "string",
"isTaxExempt": true,
"currencyCode": "string",
"priceListCode": "string",
"attributes": [
{
"auditInfo": {
"updateDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z",
"updateBy": "string",
"createBy": "string"
},
"fullyQualifiedName": "string",
"attributeDefinitionId": 0,
"values": [
null
]
}
],
"shopperNotes": {
"giftMessage": "string",
"comments": "string",
"deliveryInstructions": "string"
},
"availableActions": [
"string"
],
"data": {},
"taxData": {},
"channelCode": "string",
"locationCode": "string",
"ipAddress": "string",
"sourceDevice": "string",
"visitId": "string",
"webSessionId": "string",
"customerInteractionType": "string",
"orderDiscounts": [
{
"impact": 0,
"discount": {
"id": 0,
"name": "string",
"itemIds": [
"string"
],
"expirationDate": "2025-02-18T02:41:59.345Z",
"hasMultipleTargetProducts": true
},
"couponCode": "string",
"excluded": true,
"data": {}
}
],
"couponCodes": [
"string"
],
"invalidCoupons": [
{
"couponCode": "string",
"reasonCode": 0,
"reason": "string",
"createDate": "2025-02-18T02:41:59.345Z",
"discountId": 0
}
],
"suggestedDiscounts": [
{
"productCode": "string",
"autoAdd": true,
"discountId": 0,
"hasMultipleProducts": true,
"hasOptions": true
}
],
"discountThresholdMessages": [
{
"discountId": 0,
"message": "string",
"thresholdValue": 0,
"showOnCheckout": true,
"showInCart": true,
"requiresCouponCode": true
}
],
"dutyTotal": 0,
"feeTotal": 0,
"subTotal": 0,
"itemLevelProductDiscountTotal": 0,
"orderLevelProductDiscountTotal": 0,
"itemTaxTotal": 0,
"itemTotal": 0,
"shippingSubTotal": 0,
"itemLevelShippingDiscountTotal": 0,
"orderLevelShippingDiscountTotal": 0,
"shippingTaxTotal": 0,
"shippingTotal": 0,
"handlingSubTotal": 0,
"itemLevelHandlingDiscountTotal": 0,
"orderLevelHandlingDiscountTotal": 0,
"handlingTaxTotal": 0,
"handlingTotal": 0,
"total": 0
}
For information about the properties in the response, refer to the REST API Help.
exec.removeData
Removes custom key/value data from the current checkout.
Parameters | Type | Description |
---|---|---|
key | string | Key of the data to remove from checkout. |
Example:
context.exec.removeData("customField");
Response:
{
"id": "string",
"siteId": 0,
"tenantId": 0,
"number": 0,
"originalCartId": "string",
"submittedDate": "2025-02-18T02:41:59.345Z",
"type": "string",
"items": [
{
"id": "string",
"destinationId": "string",
"originalCartItemId": "string",
"fulfillmentLocationCode": "string",
"fulfillmentMethod": "string",
"dutyAmount": 0,
"expectedDeliveryDate": "2025-02-18T02:41:59.345Z",
"subscription": {
"required": true,
"frequency": {
"unit": "string",
"value": 0
},
"trial": {
"enabled": true,
"duration": 0,
"substituteProductCode": "string",
"substituteProductQuantity": 0,
"substituteVariationProductCode": "string",
"substituteProductOptions": [
{
"name": "string",
"attributeFQN": "string",
"dataType": "string",
"stringValue": "string"
}
]
}
},
"isReservationEnabled": true,
"giftInfo": {
"isGiftItem": true,
"giftMessage": "string"
},
"priceMode": "string",
"returnRuleInfo": {
"isReturnable": true,
"maxQty": 0,
"maxDays": 0,
"ruleCode": "string"
},
"localeCode": "string",
"purchaseLocation": "string",
"lineId": 0,
"product": {
"mfgPartNumber": "string",
"upc": "string",
"sku": "string",
"fulfillmentTypesSupported": [
"string"
],
"imageAlternateText": "string",
"imageUrl": "string",
"variationProductCode": "string",
"options": [
{
"name": "string",
"attributeFQN": "string",
"dataType": "string",
"stringValue": "string"
}
],
"properties": [
{
"attributeFQN": "string",
"name": "string",
"dataType": "string",
"isMultiValue": true,
"values": [
{
"stringValue": "string"
}
]
}
],
"categories": [
{
"id": 0,
"parent": {}
}
],
"price": {
"price": 0,
"salePrice": 0,
"tenantOverridePrice": 0,
"msrp": 0,
"creditValue": 0,
"priceListCode": "string",
"priceListEntryMode": "string",
"isOverRidePriceSalePrice": true
},
"discountsRestricted": true,
"discountsRestrictedStartDate": "2025-02-18T02:41:59.345Z",
"discountsRestrictedEndDate": "2025-02-18T02:41:59.345Z",
"isRecurring": true,
"isTaxable": true,
"productType": "string",
"productUsage": "string",
"serialNumber": "string",
"condition": "string",
"bundledProducts": [
{
"quantity": 0,
"optionAttributeFQN": "string",
"creditValue": 0,
"deltaPrice": 0,
"imageUrl": "string",
"productCode": "string",
"name": "string",
"description": "string",
"goodsType": "string",
"isPackagedStandAlone": true,
"stock": {
"manageStock": true,
"isOnBackOrder": true,
"availableDate": "2025-02-18T02:41:59.345Z",
"stockAvailable": 0,
"aggregateInventory": 0,
"futureInventories": [
{
"futureInventoryID": 0,
"onhand": 0,
"available": 0,
"allocated": 0,
"pending": 0,
"deliveryDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z"
}
],
"availableFutureInventories": 0,
"totalAvailableStock": 0,
"isSubstitutable": true
},
"productReservationId": 0,
"allocationId": 0,
"allocationExpiration": "2025-02-18T02:41:59.345Z",
"measurements": {
"height": {
"unit": "string",
"value": 0
},
"width": {
"unit": "string",
"value": 0
},
"length": {
"unit": "string",
"value": 0
},
"weight": {
"unit": "string",
"value": 0
}
},
"fulfillmentStatus": "string"
}
],
"fulfillmentFields": [
{
"name": "string",
"required": true
}
],
"productCode": "string",
"name": "string",
"description": "string",
"goodsType": "string",
"isPackagedStandAlone": true,
"stock": {
"manageStock": true,
"isOnBackOrder": true,
"availableDate": "2025-02-18T02:41:59.345Z",
"stockAvailable": 0,
"aggregateInventory": 0,
"futureInventories": [
{
"futureInventoryID": 0,
"onhand": 0,
"available": 0,
"allocated": 0,
"pending": 0,
"deliveryDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z"
}
],
"availableFutureInventories": 0,
"totalAvailableStock": 0,
"isSubstitutable": true
},
"productReservationId": 0,
"allocationId": 0,
"allocationExpiration": "2025-02-18T02:41:59.345Z",
"measurements": {
"height": {
"unit": "string",
"value": 0
},
"width": {
"unit": "string",
"value": 0
},
"length": {
"unit": "string",
"value": 0
},
"weight": {
"unit": "string",
"value": 0
}
},
"fulfillmentStatus": "string"
},
"quantity": 0,
"isRecurring": true,
"isTaxable": true,
"subtotal": 0,
"extendedTotal": 0,
"taxableTotal": 0,
"discountTotal": 0,
"discountedTotal": 0,
"itemTaxTotal": 0,
"shippingTaxTotal": 0,
"shippingTotal": 0,
"handlingAmount": 0,
"feeTotal": 0,
"total": 0,
"unitPrice": {
"extendedAmount": 0,
"listAmount": 0,
"saleAmount": 0,
"overrideAmount": 0
},
"productDiscount": {
"appliesToSalePrice": true,
"discountQuantity": 0,
"impact": 0,
"discount": {
"id": 0,
"name": "string",
"itemIds": [
"string"
],
"expirationDate": "2025-02-18T02:41:59.345Z",
"hasMultipleTargetProducts": true
},
"couponCode": "string",
"excluded": true,
"data": {}
},
"productDiscounts": [
{
"appliesToSalePrice": true,
"discountQuantity": 0,
"impact": 0,
"discount": {
"id": 0,
"name": "string",
"itemIds": [
"string"
],
"expirationDate": "2025-02-18T02:41:59.345Z",
"hasMultipleTargetProducts": true
},
"couponCode": "string",
"excluded": true,
"data": {}
}
],
"shippingDiscounts": [
{
"methodCode": "string",
"discount": {
"impact": 0,
"discount": {
"id": 0,
"name": "string",
"itemIds": [
"string"
],
"expirationDate": "2025-02-18T02:41:59.345Z",
"hasMultipleTargetProducts": true
},
"couponCode": "string",
"excluded": true,
"data": {}
},
"discountQuantity": 0,
"impactPerUnit": 0
}
],
"data": {},
"taxData": {},
"auditInfo": {
"updateDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z",
"updateBy": "string",
"createBy": "string"
},
"shippingAmountBeforeDiscountsAndAdjustments": 0,
"weightedOrderAdjustment": 0,
"weightedOrderDiscount": 0,
"adjustedLineItemSubtotal": 0,
"totalWithoutWeightedShippingAndHandling": 0,
"weightedOrderTax": 0,
"weightedOrderShipping": 0,
"weightedOrderShippingDiscount": 0,
"weightedOrderShippingManualAdjustment": 0,
"weightedOrderShippingTax": 0,
"weightedOrderHandlingFee": 0,
"weightedOrderHandlingFeeTax": 0,
"weightedOrderHandlingFeeDiscount": 0,
"weightedOrderDuty": 0,
"totalWithWeightedShippingAndHandling": 0,
"weightedOrderHandlingAdjustment": 0,
"autoAddDiscountId": 0,
"isAssemblyRequired": true,
"childItemIds": [
"string"
],
"parentItemId": "string",
"inventoryTags": [
{
"name": "string",
"value": "string"
}
],
"lineItemAdjustment": 0,
"substituteInfo": {
"optIn": "string",
"substituteProductCode": "string",
"substituteVariantCode": "string"
}
}
],
"groupings": [
{
"id": "string",
"destinationId": "string",
"fulfillmentMethod": "string",
"orderItemIds": [
"string"
],
"shippingMethodCode": "string",
"shippingMethodName": "string",
"standaloneGroup": true,
"shippingDiscounts": [
{
"methodCode": "string",
"discount": {
"impact": 0,
"discount": {
"id": 0,
"name": "string",
"itemIds": [
"string"
],
"expirationDate": "2025-02-18T02:41:59.345Z",
"hasMultipleTargetProducts": true
},
"couponCode": "string",
"excluded": true,
"data": {}
}
}
],
"handlingDiscounts": [
{
"impact": 0,
"discount": {
"id": 0,
"name": "string",
"itemIds": [
"string"
],
"expirationDate": "2025-02-18T02:41:59.345Z",
"hasMultipleTargetProducts": true
},
"couponCode": "string",
"excluded": true,
"data": {}
}
],
"dutyAmount": 0,
"dutyTotal": 0,
"shippingAmount": 0,
"shippingSubTotal": 0,
"itemLevelShippingDiscountTotal": 0,
"orderLevelShippingDiscountTotal": 0,
"shippingTax": 0,
"shippingTaxTotal": 0,
"shippingTotal": 0,
"handlingAmount": 0,
"handlingSubTotal": 0,
"itemLevelHandlingDiscountTotal": 0,
"orderLevelHandlingDiscountTotal": 0,
"handlingTax": 0,
"handlingTaxTotal": 0,
"handlingTotal": 0,
"taxData": {}
}
],
"auditInfo": {
"updateDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z",
"updateBy": "string",
"createBy": "string"
},
"destinations": [
{
"id": "string",
"destinationContact": {
"id": 0,
"email": "string",
"firstName": "string",
"middleNameOrInitial": "string",
"lastNameOrSurname": "string",
"companyOrOrganization": "string",
"phoneNumbers": {
"home": "string",
"mobile": "string",
"work": "string"
},
"address": {
"address1": "string",
"address2": "string",
"address3": "string",
"address4": "string",
"cityOrTown": "string",
"stateOrProvince": "string",
"postalOrZipCode": "string",
"countryCode": "string",
"addressType": "string",
"isValidated": true
}
},
"isDestinationCommercial": true,
"data": {}
}
],
"payments": [
{
"id": "string",
"groupId": {
"targetType": "string",
"targetId": "string",
"targetNumber": 0
},
"paymentServiceTransactionId": "string",
"availableActions": [
"string"
],
"orderId": "string",
"paymentType": "string",
"paymentWorkflow": "string",
"externalTransactionId": "string",
"billingInfo": {
"paymentType": "string",
"paymentWorkflow": "string",
"billingContact": {
"id": 0,
"email": "string",
"firstName": "string",
"middleNameOrInitial": "string",
"lastNameOrSurname": "string",
"companyOrOrganization": "string",
"phoneNumbers": {
"home": "string",
"mobile": "string",
"work": "string"
},
"address": {
"address1": "string",
"address2": "string",
"address3": "string",
"address4": "string",
"cityOrTown": "string",
"stateOrProvince": "string",
"postalOrZipCode": "string",
"countryCode": "string",
"addressType": "string",
"isValidated": true
}
},
"isSameBillingShippingAddress": true,
"card": {
"paymentServiceCardId": "string",
"isUsedRecurring": true,
"nameOnCard": "string",
"isCardInfoSaved": true,
"isTokenized": true,
"ccLastFour": "string",
"paymentOrCardType": "string",
"cardNumberPartOrMask": "string",
"expireMonth": 0,
"expireYear": 0,
"bin": "string"
},
"token": {
"paymentServiceTokenId": "string",
"type": "string"
},
"purchaseOrder": {
"purchaseOrderNumber": "string",
"paymentTerm": {
"code": "string",
"description": "string"
},
"customFields": [
{
"code": "string",
"label": "string",
"value": "string"
}
]
},
"check": {
"checkNumber": "string"
},
"auditInfo": {
"updateDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z",
"updateBy": "string",
"createBy": "string"
},
"storeCreditCode": "string",
"storeCreditType": "string",
"customCreditType": "string",
"externalTransactionId": "string",
"isRecurring": true,
"recurringTransactionId": "string",
"data": {}
},
"data": {},
"status": "string",
"subPayments": [
{
"status": "string",
"amountCollected": 0,
"amountCredited": 0,
"amountRequested": 0,
"amountRefunded": 0,
"target": {
"targetType": "string",
"targetId": "string",
"targetNumber": 0
}
}
],
"interactions": [
{
"id": "string",
"gatewayInteractionId": 0,
"paymentId": "string",
"orderId": "string",
"target": {
"targetType": "string",
"targetId": "string",
"targetNumber": 0
},
"currencyCode": "string",
"interactionType": "string",
"checkNumber": "string",
"status": "string",
"paymentEntryStatus": "string",
"isRecurring": true,
"isManual": true,
"isPending": true,
"gatewayTransactionId": "string",
"gatewayAuthCode": "string",
"gatewayAVSCodes": "string",
"gatewayCVV2Codes": "string",
"gatewayResponseCode": "string",
"gatewayResponseText": "string",
"gatewayResponseData": [
{
"key": "string",
"value": "string"
}
],
"paymentTransactionInteractionIdReference": 0,
"amount": 0,
"note": "string",
"interactionDate": "2025-02-18T02:41:59.345Z",
"auditInfo": {
"updateDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z",
"updateBy": "string",
"createBy": "string"
},
"returnId": "string",
"refundId": "string",
"capturableShipmentsSummary": [
{
"shipmentNumber": 0,
"shipmentTotal": 0,
"amountApplied": 0
}
]
}
],
"isRecurring": true,
"amountCollected": 0,
"amountCredited": 0,
"amountRequested": 0,
"changeMessages": [
{
"id": "string",
"correlationId": "string",
"userId": "string",
"userFirstName": "string",
"userLastName": "string",
"userScopeType": "string",
"appId": "string",
"appKey": "string",
"appName": "string",
"subjectType": "string",
"success": true,
"identifier": "string",
"subject": "string",
"verb": "string",
"message": "string",
"createDate": "2025-02-18T02:41:59.345Z",
"attributes": {}
}
],
"auditInfo": {
"updateDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z",
"updateBy": "string",
"createBy": "string"
},
"gatewayGiftCard": {
"id": "string",
"cardNumber": "string",
"cardPin": "string",
"amount": 0,
"currencyCode": "string"
},
"installmentPlanCode": "string"
}
],
"amountRemainingForPayment": 0,
"acceptsMarketing": true,
"customerAccountId": 0,
"email": "string",
"alternateContact": {
"firstName": "string",
"lastNameOrSurname": "string",
"emailAddress": "string",
"phoneNumber": "string"
},
"customerTaxId": "string",
"isTaxExempt": true,
"currencyCode": "string",
"priceListCode": "string",
"attributes": [
{
"auditInfo": {
"updateDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z",
"updateBy": "string",
"createBy": "string"
},
"fullyQualifiedName": "string",
"attributeDefinitionId": 0,
"values": [
null
]
}
],
"shopperNotes": {
"giftMessage": "string",
"comments": "string",
"deliveryInstructions": "string"
},
"availableActions": [
"string"
],
"data": {},
"taxData": {},
"channelCode": "string",
"locationCode": "string",
"ipAddress": "string",
"sourceDevice": "string",
"visitId": "string",
"webSessionId": "string",
"customerInteractionType": "string",
"orderDiscounts": [
{
"impact": 0,
"discount": {
"id": 0,
"name": "string",
"itemIds": [
"string"
],
"expirationDate": "2025-02-18T02:41:59.345Z",
"hasMultipleTargetProducts": true
},
"couponCode": "string",
"excluded": true,
"data": {}
}
],
"couponCodes": [
"string"
],
"invalidCoupons": [
{
"couponCode": "string",
"reasonCode": 0,
"reason": "string",
"createDate": "2025-02-18T02:41:59.345Z",
"discountId": 0
}
],
"suggestedDiscounts": [
{
"productCode": "string",
"autoAdd": true,
"discountId": 0,
"hasMultipleProducts": true,
"hasOptions": true
}
],
"discountThresholdMessages": [
{
"discountId": 0,
"message": "string",
"thresholdValue": 0,
"showOnCheckout": true,
"showInCart": true,
"requiresCouponCode": true
}
],
"dutyTotal": 0,
"feeTotal": 0,
"subTotal": 0,
"itemLevelProductDiscountTotal": 0,
"orderLevelProductDiscountTotal": 0,
"itemTaxTotal": 0,
"itemTotal": 0,
"shippingSubTotal": 0,
"itemLevelShippingDiscountTotal": 0,
"orderLevelShippingDiscountTotal": 0,
"shippingTaxTotal": 0,
"shippingTotal": 0,
"handlingSubTotal": 0,
"itemLevelHandlingDiscountTotal": 0,
"orderLevelHandlingDiscountTotal": 0,
"handlingTaxTotal": 0,
"handlingTotal": 0,
"total": 0
}
For information about the properties in the response, refer to the REST API Help.
exec.setItemData
Sets custom key/value data on an order item.
Parameters | 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.
exec.removeItemData
Removes custom key/value data from an order item.
Parameters | 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.
exec.setDutyAmount
Sets the duty amount applied to a checkout.
Parameters | Type | Description |
---|---|---|
dutyAmount | number | The duty amount to set. |
groupId | string | The checkout group, if applicable. |
Example:
context.exec.setDutyAmount(8, group1);
Response:
{
"id": "string",
"siteId": 0,
"tenantId": 0,
"number": 0,
"originalCartId": "string",
"submittedDate": "2025-02-18T02:41:59.345Z",
"type": "string",
"items": [
{
"id": "string",
"destinationId": "string",
"originalCartItemId": "string",
"fulfillmentLocationCode": "string",
"fulfillmentMethod": "string",
"dutyAmount": 0,
"expectedDeliveryDate": "2025-02-18T02:41:59.345Z",
"subscription": {
"required": true,
"frequency": {
"unit": "string",
"value": 0
},
"trial": {
"enabled": true,
"duration": 0,
"substituteProductCode": "string",
"substituteProductQuantity": 0,
"substituteVariationProductCode": "string",
"substituteProductOptions": [
{
"name": "string",
"attributeFQN": "string",
"dataType": "string",
"stringValue": "string"
}
]
}
},
"isReservationEnabled": true,
"giftInfo": {
"isGiftItem": true,
"giftMessage": "string"
},
"priceMode": "string",
"returnRuleInfo": {
"isReturnable": true,
"maxQty": 0,
"maxDays": 0,
"ruleCode": "string"
},
"localeCode": "string",
"purchaseLocation": "string",
"lineId": 0,
"product": {
"mfgPartNumber": "string",
"upc": "string",
"sku": "string",
"fulfillmentTypesSupported": [
"string"
],
"imageAlternateText": "string",
"imageUrl": "string",
"variationProductCode": "string",
"options": [
{
"name": "string",
"attributeFQN": "string",
"dataType": "string",
"stringValue": "string"
}
],
"properties": [
{
"attributeFQN": "string",
"name": "string",
"dataType": "string",
"isMultiValue": true,
"values": [
{
"stringValue": "string"
}
]
}
],
"categories": [
{
"id": 0,
"parent": {}
}
],
"price": {
"price": 0,
"salePrice": 0,
"tenantOverridePrice": 0,
"msrp": 0,
"creditValue": 0,
"priceListCode": "string",
"priceListEntryMode": "string",
"isOverRidePriceSalePrice": true
},
"discountsRestricted": true,
"discountsRestrictedStartDate": "2025-02-18T02:41:59.345Z",
"discountsRestrictedEndDate": "2025-02-18T02:41:59.345Z",
"isRecurring": true,
"isTaxable": true,
"productType": "string",
"productUsage": "string",
"serialNumber": "string",
"condition": "string",
"bundledProducts": [
{
"quantity": 0,
"optionAttributeFQN": "string",
"creditValue": 0,
"deltaPrice": 0,
"imageUrl": "string",
"productCode": "string",
"name": "string",
"description": "string",
"goodsType": "string",
"isPackagedStandAlone": true,
"stock": {
"manageStock": true,
"isOnBackOrder": true,
"availableDate": "2025-02-18T02:41:59.345Z",
"stockAvailable": 0,
"aggregateInventory": 0,
"futureInventories": [
{
"futureInventoryID": 0,
"onhand": 0,
"available": 0,
"allocated": 0,
"pending": 0,
"deliveryDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z"
}
],
"availableFutureInventories": 0,
"totalAvailableStock": 0,
"isSubstitutable": true
},
"productReservationId": 0,
"allocationId": 0,
"allocationExpiration": "2025-02-18T02:41:59.345Z",
"measurements": {
"height": {
"unit": "string",
"value": 0
},
"width": {
"unit": "string",
"value": 0
},
"length": {
"unit": "string",
"value": 0
},
"weight": {
"unit": "string",
"value": 0
}
},
"fulfillmentStatus": "string"
}
],
"fulfillmentFields": [
{
"name": "string",
"required": true
}
],
"productCode": "string",
"name": "string",
"description": "string",
"goodsType": "string",
"isPackagedStandAlone": true,
"stock": {
"manageStock": true,
"isOnBackOrder": true,
"availableDate": "2025-02-18T02:41:59.345Z",
"stockAvailable": 0,
"aggregateInventory": 0,
"futureInventories": [
{
"futureInventoryID": 0,
"onhand": 0,
"available": 0,
"allocated": 0,
"pending": 0,
"deliveryDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z"
}
],
"availableFutureInventories": 0,
"totalAvailableStock": 0,
"isSubstitutable": true
},
"productReservationId": 0,
"allocationId": 0,
"allocationExpiration": "2025-02-18T02:41:59.345Z",
"measurements": {
"height": {
"unit": "string",
"value": 0
},
"width": {
"unit": "string",
"value": 0
},
"length": {
"unit": "string",
"value": 0
},
"weight": {
"unit": "string",
"value": 0
}
},
"fulfillmentStatus": "string"
},
"quantity": 0,
"isRecurring": true,
"isTaxable": true,
"subtotal": 0,
"extendedTotal": 0,
"taxableTotal": 0,
"discountTotal": 0,
"discountedTotal": 0,
"itemTaxTotal": 0,
"shippingTaxTotal": 0,
"shippingTotal": 0,
"handlingAmount": 0,
"feeTotal": 0,
"total": 0,
"unitPrice": {
"extendedAmount": 0,
"listAmount": 0,
"saleAmount": 0,
"overrideAmount": 0
},
"productDiscount": {
"appliesToSalePrice": true,
"discountQuantity": 0,
"impact": 0,
"discount": {
"id": 0,
"name": "string",
"itemIds": [
"string"
],
"expirationDate": "2025-02-18T02:41:59.345Z",
"hasMultipleTargetProducts": true
},
"couponCode": "string",
"excluded": true,
"data": {}
},
"productDiscounts": [
{
"appliesToSalePrice": true,
"discountQuantity": 0,
"impact": 0,
"discount": {
"id": 0,
"name": "string",
"itemIds": [
"string"
],
"expirationDate": "2025-02-18T02:41:59.345Z",
"hasMultipleTargetProducts": true
},
"couponCode": "string",
"excluded": true,
"data": {}
}
],
"shippingDiscounts": [
{
"methodCode": "string",
"discount": {
"impact": 0,
"discount": {
"id": 0,
"name": "string",
"itemIds": [
"string"
],
"expirationDate": "2025-02-18T02:41:59.345Z",
"hasMultipleTargetProducts": true
},
"couponCode": "string",
"excluded": true,
"data": {}
},
"discountQuantity": 0,
"impactPerUnit": 0
}
],
"data": {},
"taxData": {},
"auditInfo": {
"updateDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z",
"updateBy": "string",
"createBy": "string"
},
"shippingAmountBeforeDiscountsAndAdjustments": 0,
"weightedOrderAdjustment": 0,
"weightedOrderDiscount": 0,
"adjustedLineItemSubtotal": 0,
"totalWithoutWeightedShippingAndHandling": 0,
"weightedOrderTax": 0,
"weightedOrderShipping": 0,
"weightedOrderShippingDiscount": 0,
"weightedOrderShippingManualAdjustment": 0,
"weightedOrderShippingTax": 0,
"weightedOrderHandlingFee": 0,
"weightedOrderHandlingFeeTax": 0,
"weightedOrderHandlingFeeDiscount": 0,
"weightedOrderDuty": 0,
"totalWithWeightedShippingAndHandling": 0,
"weightedOrderHandlingAdjustment": 0,
"autoAddDiscountId": 0,
"isAssemblyRequired": true,
"childItemIds": [
"string"
],
"parentItemId": "string",
"inventoryTags": [
{
"name": "string",
"value": "string"
}
],
"lineItemAdjustment": 0,
"substituteInfo": {
"optIn": "string",
"substituteProductCode": "string",
"substituteVariantCode": "string"
}
}
],
"groupings": [
{
"id": "string",
"destinationId": "string",
"fulfillmentMethod": "string",
"orderItemIds": [
"string"
],
"shippingMethodCode": "string",
"shippingMethodName": "string",
"standaloneGroup": true,
"shippingDiscounts": [
{
"methodCode": "string",
"discount": {
"impact": 0,
"discount": {
"id": 0,
"name": "string",
"itemIds": [
"string"
],
"expirationDate": "2025-02-18T02:41:59.345Z",
"hasMultipleTargetProducts": true
},
"couponCode": "string",
"excluded": true,
"data": {}
}
}
],
"handlingDiscounts": [
{
"impact": 0,
"discount": {
"id": 0,
"name": "string",
"itemIds": [
"string"
],
"expirationDate": "2025-02-18T02:41:59.345Z",
"hasMultipleTargetProducts": true
},
"couponCode": "string",
"excluded": true,
"data": {}
}
],
"dutyAmount": 0,
"dutyTotal": 0,
"shippingAmount": 0,
"shippingSubTotal": 0,
"itemLevelShippingDiscountTotal": 0,
"orderLevelShippingDiscountTotal": 0,
"shippingTax": 0,
"shippingTaxTotal": 0,
"shippingTotal": 0,
"handlingAmount": 0,
"handlingSubTotal": 0,
"itemLevelHandlingDiscountTotal": 0,
"orderLevelHandlingDiscountTotal": 0,
"handlingTax": 0,
"handlingTaxTotal": 0,
"handlingTotal": 0,
"taxData": {}
}
],
"auditInfo": {
"updateDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z",
"updateBy": "string",
"createBy": "string"
},
"destinations": [
{
"id": "string",
"destinationContact": {
"id": 0,
"email": "string",
"firstName": "string",
"middleNameOrInitial": "string",
"lastNameOrSurname": "string",
"companyOrOrganization": "string",
"phoneNumbers": {
"home": "string",
"mobile": "string",
"work": "string"
},
"address": {
"address1": "string",
"address2": "string",
"address3": "string",
"address4": "string",
"cityOrTown": "string",
"stateOrProvince": "string",
"postalOrZipCode": "string",
"countryCode": "string",
"addressType": "string",
"isValidated": true
}
},
"isDestinationCommercial": true,
"data": {}
}
],
"payments": [
{
"id": "string",
"groupId": {
"targetType": "string",
"targetId": "string",
"targetNumber": 0
},
"paymentServiceTransactionId": "string",
"availableActions": [
"string"
],
"orderId": "string",
"paymentType": "string",
"paymentWorkflow": "string",
"externalTransactionId": "string",
"billingInfo": {
"paymentType": "string",
"paymentWorkflow": "string",
"billingContact": {
"id": 0,
"email": "string",
"firstName": "string",
"middleNameOrInitial": "string",
"lastNameOrSurname": "string",
"companyOrOrganization": "string",
"phoneNumbers": {
"home": "string",
"mobile": "string",
"work": "string"
},
"address": {
"address1": "string",
"address2": "string",
"address3": "string",
"address4": "string",
"cityOrTown": "string",
"stateOrProvince": "string",
"postalOrZipCode": "string",
"countryCode": "string",
"addressType": "string",
"isValidated": true
}
},
"isSameBillingShippingAddress": true,
"card": {
"paymentServiceCardId": "string",
"isUsedRecurring": true,
"nameOnCard": "string",
"isCardInfoSaved": true,
"isTokenized": true,
"ccLastFour": "string",
"paymentOrCardType": "string",
"cardNumberPartOrMask": "string",
"expireMonth": 0,
"expireYear": 0,
"bin": "string"
},
"token": {
"paymentServiceTokenId": "string",
"type": "string"
},
"purchaseOrder": {
"purchaseOrderNumber": "string",
"paymentTerm": {
"code": "string",
"description": "string"
},
"customFields": [
{
"code": "string",
"label": "string",
"value": "string"
}
]
},
"check": {
"checkNumber": "string"
},
"auditInfo": {
"updateDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z",
"updateBy": "string",
"createBy": "string"
},
"storeCreditCode": "string",
"storeCreditType": "string",
"customCreditType": "string",
"externalTransactionId": "string",
"isRecurring": true,
"recurringTransactionId": "string",
"data": {}
},
"data": {},
"status": "string",
"subPayments": [
{
"status": "string",
"amountCollected": 0,
"amountCredited": 0,
"amountRequested": 0,
"amountRefunded": 0,
"target": {
"targetType": "string",
"targetId": "string",
"targetNumber": 0
}
}
],
"interactions": [
{
"id": "string",
"gatewayInteractionId": 0,
"paymentId": "string",
"orderId": "string",
"target": {
"targetType": "string",
"targetId": "string",
"targetNumber": 0
},
"currencyCode": "string",
"interactionType": "string",
"checkNumber": "string",
"status": "string",
"paymentEntryStatus": "string",
"isRecurring": true,
"isManual": true,
"isPending": true,
"gatewayTransactionId": "string",
"gatewayAuthCode": "string",
"gatewayAVSCodes": "string",
"gatewayCVV2Codes": "string",
"gatewayResponseCode": "string",
"gatewayResponseText": "string",
"gatewayResponseData": [
{
"key": "string",
"value": "string"
}
],
"paymentTransactionInteractionIdReference": 0,
"amount": 0,
"note": "string",
"interactionDate": "2025-02-18T02:41:59.345Z",
"auditInfo": {
"updateDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z",
"updateBy": "string",
"createBy": "string"
},
"returnId": "string",
"refundId": "string",
"capturableShipmentsSummary": [
{
"shipmentNumber": 0,
"shipmentTotal": 0,
"amountApplied": 0
}
]
}
],
"isRecurring": true,
"amountCollected": 0,
"amountCredited": 0,
"amountRequested": 0,
"changeMessages": [
{
"id": "string",
"correlationId": "string",
"userId": "string",
"userFirstName": "string",
"userLastName": "string",
"userScopeType": "string",
"appId": "string",
"appKey": "string",
"appName": "string",
"subjectType": "string",
"success": true,
"identifier": "string",
"subject": "string",
"verb": "string",
"message": "string",
"createDate": "2025-02-18T02:41:59.345Z",
"attributes": {}
}
],
"auditInfo": {
"updateDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z",
"updateBy": "string",
"createBy": "string"
},
"gatewayGiftCard": {
"id": "string",
"cardNumber": "string",
"cardPin": "string",
"amount": 0,
"currencyCode": "string"
},
"installmentPlanCode": "string"
}
],
"amountRemainingForPayment": 0,
"acceptsMarketing": true,
"customerAccountId": 0,
"email": "string",
"alternateContact": {
"firstName": "string",
"lastNameOrSurname": "string",
"emailAddress": "string",
"phoneNumber": "string"
},
"customerTaxId": "string",
"isTaxExempt": true,
"currencyCode": "string",
"priceListCode": "string",
"attributes": [
{
"auditInfo": {
"updateDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z",
"updateBy": "string",
"createBy": "string"
},
"fullyQualifiedName": "string",
"attributeDefinitionId": 0,
"values": [
null
]
}
],
"shopperNotes": {
"giftMessage": "string",
"comments": "string",
"deliveryInstructions": "string"
},
"availableActions": [
"string"
],
"data": {},
"taxData": {},
"channelCode": "string",
"locationCode": "string",
"ipAddress": "string",
"sourceDevice": "string",
"visitId": "string",
"webSessionId": "string",
"customerInteractionType": "string",
"orderDiscounts": [
{
"impact": 0,
"discount": {
"id": 0,
"name": "string",
"itemIds": [
"string"
],
"expirationDate": "2025-02-18T02:41:59.345Z",
"hasMultipleTargetProducts": true
},
"couponCode": "string",
"excluded": true,
"data": {}
}
],
"couponCodes": [
"string"
],
"invalidCoupons": [
{
"couponCode": "string",
"reasonCode": 0,
"reason": "string",
"createDate": "2025-02-18T02:41:59.345Z",
"discountId": 0
}
],
"suggestedDiscounts": [
{
"productCode": "string",
"autoAdd": true,
"discountId": 0,
"hasMultipleProducts": true,
"hasOptions": true
}
],
"discountThresholdMessages": [
{
"discountId": 0,
"message": "string",
"thresholdValue": 0,
"showOnCheckout": true,
"showInCart": true,
"requiresCouponCode": true
}
],
"dutyTotal": 0,
"feeTotal": 0,
"subTotal": 0,
"itemLevelProductDiscountTotal": 0,
"orderLevelProductDiscountTotal": 0,
"itemTaxTotal": 0,
"itemTotal": 0,
"shippingSubTotal": 0,
"itemLevelShippingDiscountTotal": 0,
"orderLevelShippingDiscountTotal": 0,
"shippingTaxTotal": 0,
"shippingTotal": 0,
"handlingSubTotal": 0,
"itemLevelHandlingDiscountTotal": 0,
"orderLevelHandlingDiscountTotal": 0,
"handlingTaxTotal": 0,
"handlingTotal": 0,
"total": 0
}
For information about the properties in the response, refer to the REST API Help.
exec.setHandlingAmount
Sets the overall handling amount applied to a checkout. This method is only available for the embedded.commerce.checkouts.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.
Parameters | Type | Description |
---|---|---|
handlingAmount | number | The handling amount to set on the checkout. |
Example:
context.exec.setHandlingAmount(3.99);
Response:
{
"id": "string",
"siteId": 0,
"tenantId": 0,
"number": 0,
"originalCartId": "string",
"submittedDate": "2025-02-18T02:41:59.345Z",
"type": "string",
"items": [
{
"id": "string",
"destinationId": "string",
"originalCartItemId": "string",
"fulfillmentLocationCode": "string",
"fulfillmentMethod": "string",
"dutyAmount": 0,
"expectedDeliveryDate": "2025-02-18T02:41:59.345Z",
"subscription": {
"required": true,
"frequency": {
"unit": "string",
"value": 0
},
"trial": {
"enabled": true,
"duration": 0,
"substituteProductCode": "string",
"substituteProductQuantity": 0,
"substituteVariationProductCode": "string",
"substituteProductOptions": [
{
"name": "string",
"attributeFQN": "string",
"dataType": "string",
"stringValue": "string"
}
]
}
},
"isReservationEnabled": true,
"giftInfo": {
"isGiftItem": true,
"giftMessage": "string"
},
"priceMode": "string",
"returnRuleInfo": {
"isReturnable": true,
"maxQty": 0,
"maxDays": 0,
"ruleCode": "string"
},
"localeCode": "string",
"purchaseLocation": "string",
"lineId": 0,
"product": {
"mfgPartNumber": "string",
"upc": "string",
"sku": "string",
"fulfillmentTypesSupported": [
"string"
],
"imageAlternateText": "string",
"imageUrl": "string",
"variationProductCode": "string",
"options": [
{
"name": "string",
"attributeFQN": "string",
"dataType": "string",
"stringValue": "string"
}
],
"properties": [
{
"attributeFQN": "string",
"name": "string",
"dataType": "string",
"isMultiValue": true,
"values": [
{
"stringValue": "string"
}
]
}
],
"categories": [
{
"id": 0,
"parent": {}
}
],
"price": {
"price": 0,
"salePrice": 0,
"tenantOverridePrice": 0,
"msrp": 0,
"creditValue": 0,
"priceListCode": "string",
"priceListEntryMode": "string",
"isOverRidePriceSalePrice": true
},
"discountsRestricted": true,
"discountsRestrictedStartDate": "2025-02-18T02:41:59.345Z",
"discountsRestrictedEndDate": "2025-02-18T02:41:59.345Z",
"isRecurring": true,
"isTaxable": true,
"productType": "string",
"productUsage": "string",
"serialNumber": "string",
"condition": "string",
"bundledProducts": [
{
"quantity": 0,
"optionAttributeFQN": "string",
"creditValue": 0,
"deltaPrice": 0,
"imageUrl": "string",
"productCode": "string",
"name": "string",
"description": "string",
"goodsType": "string",
"isPackagedStandAlone": true,
"stock": {
"manageStock": true,
"isOnBackOrder": true,
"availableDate": "2025-02-18T02:41:59.345Z",
"stockAvailable": 0,
"aggregateInventory": 0,
"futureInventories": [
{
"futureInventoryID": 0,
"onhand": 0,
"available": 0,
"allocated": 0,
"pending": 0,
"deliveryDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z"
}
],
"availableFutureInventories": 0,
"totalAvailableStock": 0,
"isSubstitutable": true
},
"productReservationId": 0,
"allocationId": 0,
"allocationExpiration": "2025-02-18T02:41:59.345Z",
"measurements": {
"height": {
"unit": "string",
"value": 0
},
"width": {
"unit": "string",
"value": 0
},
"length": {
"unit": "string",
"value": 0
},
"weight": {
"unit": "string",
"value": 0
}
},
"fulfillmentStatus": "string"
}
],
"fulfillmentFields": [
{
"name": "string",
"required": true
}
],
"productCode": "string",
"name": "string",
"description": "string",
"goodsType": "string",
"isPackagedStandAlone": true,
"stock": {
"manageStock": true,
"isOnBackOrder": true,
"availableDate": "2025-02-18T02:41:59.345Z",
"stockAvailable": 0,
"aggregateInventory": 0,
"futureInventories": [
{
"futureInventoryID": 0,
"onhand": 0,
"available": 0,
"allocated": 0,
"pending": 0,
"deliveryDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z"
}
],
"availableFutureInventories": 0,
"totalAvailableStock": 0,
"isSubstitutable": true
},
"productReservationId": 0,
"allocationId": 0,
"allocationExpiration": "2025-02-18T02:41:59.345Z",
"measurements": {
"height": {
"unit": "string",
"value": 0
},
"width": {
"unit": "string",
"value": 0
},
"length": {
"unit": "string",
"value": 0
},
"weight": {
"unit": "string",
"value": 0
}
},
"fulfillmentStatus": "string"
},
"quantity": 0,
"isRecurring": true,
"isTaxable": true,
"subtotal": 0,
"extendedTotal": 0,
"taxableTotal": 0,
"discountTotal": 0,
"discountedTotal": 0,
"itemTaxTotal": 0,
"shippingTaxTotal": 0,
"shippingTotal": 0,
"handlingAmount": 0,
"feeTotal": 0,
"total": 0,
"unitPrice": {
"extendedAmount": 0,
"listAmount": 0,
"saleAmount": 0,
"overrideAmount": 0
},
"productDiscount": {
"appliesToSalePrice": true,
"discountQuantity": 0,
"impact": 0,
"discount": {
"id": 0,
"name": "string",
"itemIds": [
"string"
],
"expirationDate": "2025-02-18T02:41:59.345Z",
"hasMultipleTargetProducts": true
},
"couponCode": "string",
"excluded": true,
"data": {}
},
"productDiscounts": [
{
"appliesToSalePrice": true,
"discountQuantity": 0,
"impact": 0,
"discount": {
"id": 0,
"name": "string",
"itemIds": [
"string"
],
"expirationDate": "2025-02-18T02:41:59.345Z",
"hasMultipleTargetProducts": true
},
"couponCode": "string",
"excluded": true,
"data": {}
}
],
"shippingDiscounts": [
{
"methodCode": "string",
"discount": {
"impact": 0,
"discount": {
"id": 0,
"name": "string",
"itemIds": [
"string"
],
"expirationDate": "2025-02-18T02:41:59.345Z",
"hasMultipleTargetProducts": true
},
"couponCode": "string",
"excluded": true,
"data": {}
},
"discountQuantity": 0,
"impactPerUnit": 0
}
],
"data": {},
"taxData": {},
"auditInfo": {
"updateDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z",
"updateBy": "string",
"createBy": "string"
},
"shippingAmountBeforeDiscountsAndAdjustments": 0,
"weightedOrderAdjustment": 0,
"weightedOrderDiscount": 0,
"adjustedLineItemSubtotal": 0,
"totalWithoutWeightedShippingAndHandling": 0,
"weightedOrderTax": 0,
"weightedOrderShipping": 0,
"weightedOrderShippingDiscount": 0,
"weightedOrderShippingManualAdjustment": 0,
"weightedOrderShippingTax": 0,
"weightedOrderHandlingFee": 0,
"weightedOrderHandlingFeeTax": 0,
"weightedOrderHandlingFeeDiscount": 0,
"weightedOrderDuty": 0,
"totalWithWeightedShippingAndHandling": 0,
"weightedOrderHandlingAdjustment": 0,
"autoAddDiscountId": 0,
"isAssemblyRequired": true,
"childItemIds": [
"string"
],
"parentItemId": "string",
"inventoryTags": [
{
"name": "string",
"value": "string"
}
],
"lineItemAdjustment": 0,
"substituteInfo": {
"optIn": "string",
"substituteProductCode": "string",
"substituteVariantCode": "string"
}
}
],
"groupings": [
{
"id": "string",
"destinationId": "string",
"fulfillmentMethod": "string",
"orderItemIds": [
"string"
],
"shippingMethodCode": "string",
"shippingMethodName": "string",
"standaloneGroup": true,
"shippingDiscounts": [
{
"methodCode": "string",
"discount": {
"impact": 0,
"discount": {
"id": 0,
"name": "string",
"itemIds": [
"string"
],
"expirationDate": "2025-02-18T02:41:59.345Z",
"hasMultipleTargetProducts": true
},
"couponCode": "string",
"excluded": true,
"data": {}
}
}
],
"handlingDiscounts": [
{
"impact": 0,
"discount": {
"id": 0,
"name": "string",
"itemIds": [
"string"
],
"expirationDate": "2025-02-18T02:41:59.345Z",
"hasMultipleTargetProducts": true
},
"couponCode": "string",
"excluded": true,
"data": {}
}
],
"dutyAmount": 0,
"dutyTotal": 0,
"shippingAmount": 0,
"shippingSubTotal": 0,
"itemLevelShippingDiscountTotal": 0,
"orderLevelShippingDiscountTotal": 0,
"shippingTax": 0,
"shippingTaxTotal": 0,
"shippingTotal": 0,
"handlingAmount": 0,
"handlingSubTotal": 0,
"itemLevelHandlingDiscountTotal": 0,
"orderLevelHandlingDiscountTotal": 0,
"handlingTax": 0,
"handlingTaxTotal": 0,
"handlingTotal": 0,
"taxData": {}
}
],
"auditInfo": {
"updateDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z",
"updateBy": "string",
"createBy": "string"
},
"destinations": [
{
"id": "string",
"destinationContact": {
"id": 0,
"email": "string",
"firstName": "string",
"middleNameOrInitial": "string",
"lastNameOrSurname": "string",
"companyOrOrganization": "string",
"phoneNumbers": {
"home": "string",
"mobile": "string",
"work": "string"
},
"address": {
"address1": "string",
"address2": "string",
"address3": "string",
"address4": "string",
"cityOrTown": "string",
"stateOrProvince": "string",
"postalOrZipCode": "string",
"countryCode": "string",
"addressType": "string",
"isValidated": true
}
},
"isDestinationCommercial": true,
"data": {}
}
],
"payments": [
{
"id": "string",
"groupId": {
"targetType": "string",
"targetId": "string",
"targetNumber": 0
},
"paymentServiceTransactionId": "string",
"availableActions": [
"string"
],
"orderId": "string",
"paymentType": "string",
"paymentWorkflow": "string",
"externalTransactionId": "string",
"billingInfo": {
"paymentType": "string",
"paymentWorkflow": "string",
"billingContact": {
"id": 0,
"email": "string",
"firstName": "string",
"middleNameOrInitial": "string",
"lastNameOrSurname": "string",
"companyOrOrganization": "string",
"phoneNumbers": {
"home": "string",
"mobile": "string",
"work": "string"
},
"address": {
"address1": "string",
"address2": "string",
"address3": "string",
"address4": "string",
"cityOrTown": "string",
"stateOrProvince": "string",
"postalOrZipCode": "string",
"countryCode": "string",
"addressType": "string",
"isValidated": true
}
},
"isSameBillingShippingAddress": true,
"card": {
"paymentServiceCardId": "string",
"isUsedRecurring": true,
"nameOnCard": "string",
"isCardInfoSaved": true,
"isTokenized": true,
"ccLastFour": "string",
"paymentOrCardType": "string",
"cardNumberPartOrMask": "string",
"expireMonth": 0,
"expireYear": 0,
"bin": "string"
},
"token": {
"paymentServiceTokenId": "string",
"type": "string"
},
"purchaseOrder": {
"purchaseOrderNumber": "string",
"paymentTerm": {
"code": "string",
"description": "string"
},
"customFields": [
{
"code": "string",
"label": "string",
"value": "string"
}
]
},
"check": {
"checkNumber": "string"
},
"auditInfo": {
"updateDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z",
"updateBy": "string",
"createBy": "string"
},
"storeCreditCode": "string",
"storeCreditType": "string",
"customCreditType": "string",
"externalTransactionId": "string",
"isRecurring": true,
"recurringTransactionId": "string",
"data": {}
},
"data": {},
"status": "string",
"subPayments": [
{
"status": "string",
"amountCollected": 0,
"amountCredited": 0,
"amountRequested": 0,
"amountRefunded": 0,
"target": {
"targetType": "string",
"targetId": "string",
"targetNumber": 0
}
}
],
"interactions": [
{
"id": "string",
"gatewayInteractionId": 0,
"paymentId": "string",
"orderId": "string",
"target": {
"targetType": "string",
"targetId": "string",
"targetNumber": 0
},
"currencyCode": "string",
"interactionType": "string",
"checkNumber": "string",
"status": "string",
"paymentEntryStatus": "string",
"isRecurring": true,
"isManual": true,
"isPending": true,
"gatewayTransactionId": "string",
"gatewayAuthCode": "string",
"gatewayAVSCodes": "string",
"gatewayCVV2Codes": "string",
"gatewayResponseCode": "string",
"gatewayResponseText": "string",
"gatewayResponseData": [
{
"key": "string",
"value": "string"
}
],
"paymentTransactionInteractionIdReference": 0,
"amount": 0,
"note": "string",
"interactionDate": "2025-02-18T02:41:59.345Z",
"auditInfo": {
"updateDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z",
"updateBy": "string",
"createBy": "string"
},
"returnId": "string",
"refundId": "string",
"capturableShipmentsSummary": [
{
"shipmentNumber": 0,
"shipmentTotal": 0,
"amountApplied": 0
}
]
}
],
"isRecurring": true,
"amountCollected": 0,
"amountCredited": 0,
"amountRequested": 0,
"changeMessages": [
{
"id": "string",
"correlationId": "string",
"userId": "string",
"userFirstName": "string",
"userLastName": "string",
"userScopeType": "string",
"appId": "string",
"appKey": "string",
"appName": "string",
"subjectType": "string",
"success": true,
"identifier": "string",
"subject": "string",
"verb": "string",
"message": "string",
"createDate": "2025-02-18T02:41:59.345Z",
"attributes": {}
}
],
"auditInfo": {
"updateDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z",
"updateBy": "string",
"createBy": "string"
},
"gatewayGiftCard": {
"id": "string",
"cardNumber": "string",
"cardPin": "string",
"amount": 0,
"currencyCode": "string"
},
"installmentPlanCode": "string"
}
],
"amountRemainingForPayment": 0,
"acceptsMarketing": true,
"customerAccountId": 0,
"email": "string",
"alternateContact": {
"firstName": "string",
"lastNameOrSurname": "string",
"emailAddress": "string",
"phoneNumber": "string"
},
"customerTaxId": "string",
"isTaxExempt": true,
"currencyCode": "string",
"priceListCode": "string",
"attributes": [
{
"auditInfo": {
"updateDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z",
"updateBy": "string",
"createBy": "string"
},
"fullyQualifiedName": "string",
"attributeDefinitionId": 0,
"values": [
null
]
}
],
"shopperNotes": {
"giftMessage": "string",
"comments": "string",
"deliveryInstructions": "string"
},
"availableActions": [
"string"
],
"data": {},
"taxData": {},
"channelCode": "string",
"locationCode": "string",
"ipAddress": "string",
"sourceDevice": "string",
"visitId": "string",
"webSessionId": "string",
"customerInteractionType": "string",
"orderDiscounts": [
{
"impact": 0,
"discount": {
"id": 0,
"name": "string",
"itemIds": [
"string"
],
"expirationDate": "2025-02-18T02:41:59.345Z",
"hasMultipleTargetProducts": true
},
"couponCode": "string",
"excluded": true,
"data": {}
}
],
"couponCodes": [
"string"
],
"invalidCoupons": [
{
"couponCode": "string",
"reasonCode": 0,
"reason": "string",
"createDate": "2025-02-18T02:41:59.345Z",
"discountId": 0
}
],
"suggestedDiscounts": [
{
"productCode": "string",
"autoAdd": true,
"discountId": 0,
"hasMultipleProducts": true,
"hasOptions": true
}
],
"discountThresholdMessages": [
{
"discountId": 0,
"message": "string",
"thresholdValue": 0,
"showOnCheckout": true,
"showInCart": true,
"requiresCouponCode": true
}
],
"dutyTotal": 0,
"feeTotal": 0,
"subTotal": 0,
"itemLevelProductDiscountTotal": 0,
"orderLevelProductDiscountTotal": 0,
"itemTaxTotal": 0,
"itemTotal": 0,
"shippingSubTotal": 0,
"itemLevelShippingDiscountTotal": 0,
"orderLevelShippingDiscountTotal": 0,
"shippingTaxTotal": 0,
"shippingTotal": 0,
"handlingSubTotal": 0,
"itemLevelHandlingDiscountTotal": 0,
"orderLevelHandlingDiscountTotal": 0,
"handlingTaxTotal": 0,
"handlingTotal": 0,
"total": 0
}
For information about the properties in the response, refer to the REST API Help.
exec.setItemHandlingAmount
Sets the handling amount applied to a specific item. This method is only available for the embedded.commerce.checkouts.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.
Parameters | Type | Description |
---|---|---|
handlingAmount | number | The handling amount to set on an item. |
itemId | string | Id of the item for which to set the handling amount. |
Example:
context.exec.setItemHandlingAmount(2, "123");
Response:
{
"id": "string",
"siteId": 0,
"tenantId": 0,
"number": 0,
"originalCartId": "string",
"submittedDate": "2025-02-18T02:41:59.345Z",
"type": "string",
"items": [
{
"id": "string",
"destinationId": "string",
"originalCartItemId": "string",
"fulfillmentLocationCode": "string",
"fulfillmentMethod": "string",
"dutyAmount": 0,
"expectedDeliveryDate": "2025-02-18T02:41:59.345Z",
"subscription": {
"required": true,
"frequency": {
"unit": "string",
"value": 0
},
"trial": {
"enabled": true,
"duration": 0,
"substituteProductCode": "string",
"substituteProductQuantity": 0,
"substituteVariationProductCode": "string",
"substituteProductOptions": [
{
"name": "string",
"attributeFQN": "string",
"dataType": "string",
"stringValue": "string"
}
]
}
},
"isReservationEnabled": true,
"giftInfo": {
"isGiftItem": true,
"giftMessage": "string"
},
"priceMode": "string",
"returnRuleInfo": {
"isReturnable": true,
"maxQty": 0,
"maxDays": 0,
"ruleCode": "string"
},
"localeCode": "string",
"purchaseLocation": "string",
"lineId": 0,
"product": {
"mfgPartNumber": "string",
"upc": "string",
"sku": "string",
"fulfillmentTypesSupported": [
"string"
],
"imageAlternateText": "string",
"imageUrl": "string",
"variationProductCode": "string",
"options": [
{
"name": "string",
"attributeFQN": "string",
"dataType": "string",
"stringValue": "string"
}
],
"properties": [
{
"attributeFQN": "string",
"name": "string",
"dataType": "string",
"isMultiValue": true,
"values": [
{
"stringValue": "string"
}
]
}
],
"categories": [
{
"id": 0,
"parent": {}
}
],
"price": {
"price": 0,
"salePrice": 0,
"tenantOverridePrice": 0,
"msrp": 0,
"creditValue": 0,
"priceListCode": "string",
"priceListEntryMode": "string",
"isOverRidePriceSalePrice": true
},
"discountsRestricted": true,
"discountsRestrictedStartDate": "2025-02-18T02:41:59.345Z",
"discountsRestrictedEndDate": "2025-02-18T02:41:59.345Z",
"isRecurring": true,
"isTaxable": true,
"productType": "string",
"productUsage": "string",
"serialNumber": "string",
"condition": "string",
"bundledProducts": [
{
"quantity": 0,
"optionAttributeFQN": "string",
"creditValue": 0,
"deltaPrice": 0,
"imageUrl": "string",
"productCode": "string",
"name": "string",
"description": "string",
"goodsType": "string",
"isPackagedStandAlone": true,
"stock": {
"manageStock": true,
"isOnBackOrder": true,
"availableDate": "2025-02-18T02:41:59.345Z",
"stockAvailable": 0,
"aggregateInventory": 0,
"futureInventories": [
{
"futureInventoryID": 0,
"onhand": 0,
"available": 0,
"allocated": 0,
"pending": 0,
"deliveryDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z"
}
],
"availableFutureInventories": 0,
"totalAvailableStock": 0,
"isSubstitutable": true
},
"productReservationId": 0,
"allocationId": 0,
"allocationExpiration": "2025-02-18T02:41:59.345Z",
"measurements": {
"height": {
"unit": "string",
"value": 0
},
"width": {
"unit": "string",
"value": 0
},
"length": {
"unit": "string",
"value": 0
},
"weight": {
"unit": "string",
"value": 0
}
},
"fulfillmentStatus": "string"
}
],
"fulfillmentFields": [
{
"name": "string",
"required": true
}
],
"productCode": "string",
"name": "string",
"description": "string",
"goodsType": "string",
"isPackagedStandAlone": true,
"stock": {
"manageStock": true,
"isOnBackOrder": true,
"availableDate": "2025-02-18T02:41:59.345Z",
"stockAvailable": 0,
"aggregateInventory": 0,
"futureInventories": [
{
"futureInventoryID": 0,
"onhand": 0,
"available": 0,
"allocated": 0,
"pending": 0,
"deliveryDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z"
}
],
"availableFutureInventories": 0,
"totalAvailableStock": 0,
"isSubstitutable": true
},
"productReservationId": 0,
"allocationId": 0,
"allocationExpiration": "2025-02-18T02:41:59.345Z",
"measurements": {
"height": {
"unit": "string",
"value": 0
},
"width": {
"unit": "string",
"value": 0
},
"length": {
"unit": "string",
"value": 0
},
"weight": {
"unit": "string",
"value": 0
}
},
"fulfillmentStatus": "string"
},
"quantity": 0,
"isRecurring": true,
"isTaxable": true,
"subtotal": 0,
"extendedTotal": 0,
"taxableTotal": 0,
"discountTotal": 0,
"discountedTotal": 0,
"itemTaxTotal": 0,
"shippingTaxTotal": 0,
"shippingTotal": 0,
"handlingAmount": 0,
"feeTotal": 0,
"total": 0,
"unitPrice": {
"extendedAmount": 0,
"listAmount": 0,
"saleAmount": 0,
"overrideAmount": 0
},
"productDiscount": {
"appliesToSalePrice": true,
"discountQuantity": 0,
"impact": 0,
"discount": {
"id": 0,
"name": "string",
"itemIds": [
"string"
],
"expirationDate": "2025-02-18T02:41:59.345Z",
"hasMultipleTargetProducts": true
},
"couponCode": "string",
"excluded": true,
"data": {}
},
"productDiscounts": [
{
"appliesToSalePrice": true,
"discountQuantity": 0,
"impact": 0,
"discount": {
"id": 0,
"name": "string",
"itemIds": [
"string"
],
"expirationDate": "2025-02-18T02:41:59.345Z",
"hasMultipleTargetProducts": true
},
"couponCode": "string",
"excluded": true,
"data": {}
}
],
"shippingDiscounts": [
{
"methodCode": "string",
"discount": {
"impact": 0,
"discount": {
"id": 0,
"name": "string",
"itemIds": [
"string"
],
"expirationDate": "2025-02-18T02:41:59.345Z",
"hasMultipleTargetProducts": true
},
"couponCode": "string",
"excluded": true,
"data": {}
},
"discountQuantity": 0,
"impactPerUnit": 0
}
],
"data": {},
"taxData": {},
"auditInfo": {
"updateDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z",
"updateBy": "string",
"createBy": "string"
},
"shippingAmountBeforeDiscountsAndAdjustments": 0,
"weightedOrderAdjustment": 0,
"weightedOrderDiscount": 0,
"adjustedLineItemSubtotal": 0,
"totalWithoutWeightedShippingAndHandling": 0,
"weightedOrderTax": 0,
"weightedOrderShipping": 0,
"weightedOrderShippingDiscount": 0,
"weightedOrderShippingManualAdjustment": 0,
"weightedOrderShippingTax": 0,
"weightedOrderHandlingFee": 0,
"weightedOrderHandlingFeeTax": 0,
"weightedOrderHandlingFeeDiscount": 0,
"weightedOrderDuty": 0,
"totalWithWeightedShippingAndHandling": 0,
"weightedOrderHandlingAdjustment": 0,
"autoAddDiscountId": 0,
"isAssemblyRequired": true,
"childItemIds": [
"string"
],
"parentItemId": "string",
"inventoryTags": [
{
"name": "string",
"value": "string"
}
],
"lineItemAdjustment": 0,
"substituteInfo": {
"optIn": "string",
"substituteProductCode": "string",
"substituteVariantCode": "string"
}
}
],
"groupings": [
{
"id": "string",
"destinationId": "string",
"fulfillmentMethod": "string",
"orderItemIds": [
"string"
],
"shippingMethodCode": "string",
"shippingMethodName": "string",
"standaloneGroup": true,
"shippingDiscounts": [
{
"methodCode": "string",
"discount": {
"impact": 0,
"discount": {
"id": 0,
"name": "string",
"itemIds": [
"string"
],
"expirationDate": "2025-02-18T02:41:59.345Z",
"hasMultipleTargetProducts": true
},
"couponCode": "string",
"excluded": true,
"data": {}
}
}
],
"handlingDiscounts": [
{
"impact": 0,
"discount": {
"id": 0,
"name": "string",
"itemIds": [
"string"
],
"expirationDate": "2025-02-18T02:41:59.345Z",
"hasMultipleTargetProducts": true
},
"couponCode": "string",
"excluded": true,
"data": {}
}
],
"dutyAmount": 0,
"dutyTotal": 0,
"shippingAmount": 0,
"shippingSubTotal": 0,
"itemLevelShippingDiscountTotal": 0,
"orderLevelShippingDiscountTotal": 0,
"shippingTax": 0,
"shippingTaxTotal": 0,
"shippingTotal": 0,
"handlingAmount": 0,
"handlingSubTotal": 0,
"itemLevelHandlingDiscountTotal": 0,
"orderLevelHandlingDiscountTotal": 0,
"handlingTax": 0,
"handlingTaxTotal": 0,
"handlingTotal": 0,
"taxData": {}
}
],
"auditInfo": {
"updateDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z",
"updateBy": "string",
"createBy": "string"
},
"destinations": [
{
"id": "string",
"destinationContact": {
"id": 0,
"email": "string",
"firstName": "string",
"middleNameOrInitial": "string",
"lastNameOrSurname": "string",
"companyOrOrganization": "string",
"phoneNumbers": {
"home": "string",
"mobile": "string",
"work": "string"
},
"address": {
"address1": "string",
"address2": "string",
"address3": "string",
"address4": "string",
"cityOrTown": "string",
"stateOrProvince": "string",
"postalOrZipCode": "string",
"countryCode": "string",
"addressType": "string",
"isValidated": true
}
},
"isDestinationCommercial": true,
"data": {}
}
],
"payments": [
{
"id": "string",
"groupId": {
"targetType": "string",
"targetId": "string",
"targetNumber": 0
},
"paymentServiceTransactionId": "string",
"availableActions": [
"string"
],
"orderId": "string",
"paymentType": "string",
"paymentWorkflow": "string",
"externalTransactionId": "string",
"billingInfo": {
"paymentType": "string",
"paymentWorkflow": "string",
"billingContact": {
"id": 0,
"email": "string",
"firstName": "string",
"middleNameOrInitial": "string",
"lastNameOrSurname": "string",
"companyOrOrganization": "string",
"phoneNumbers": {
"home": "string",
"mobile": "string",
"work": "string"
},
"address": {
"address1": "string",
"address2": "string",
"address3": "string",
"address4": "string",
"cityOrTown": "string",
"stateOrProvince": "string",
"postalOrZipCode": "string",
"countryCode": "string",
"addressType": "string",
"isValidated": true
}
},
"isSameBillingShippingAddress": true,
"card": {
"paymentServiceCardId": "string",
"isUsedRecurring": true,
"nameOnCard": "string",
"isCardInfoSaved": true,
"isTokenized": true,
"ccLastFour": "string",
"paymentOrCardType": "string",
"cardNumberPartOrMask": "string",
"expireMonth": 0,
"expireYear": 0,
"bin": "string"
},
"token": {
"paymentServiceTokenId": "string",
"type": "string"
},
"purchaseOrder": {
"purchaseOrderNumber": "string",
"paymentTerm": {
"code": "string",
"description": "string"
},
"customFields": [
{
"code": "string",
"label": "string",
"value": "string"
}
]
},
"check": {
"checkNumber": "string"
},
"auditInfo": {
"updateDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z",
"updateBy": "string",
"createBy": "string"
},
"storeCreditCode": "string",
"storeCreditType": "string",
"customCreditType": "string",
"externalTransactionId": "string",
"isRecurring": true,
"recurringTransactionId": "string",
"data": {}
},
"data": {},
"status": "string",
"subPayments": [
{
"status": "string",
"amountCollected": 0,
"amountCredited": 0,
"amountRequested": 0,
"amountRefunded": 0,
"target": {
"targetType": "string",
"targetId": "string",
"targetNumber": 0
}
}
],
"interactions": [
{
"id": "string",
"gatewayInteractionId": 0,
"paymentId": "string",
"orderId": "string",
"target": {
"targetType": "string",
"targetId": "string",
"targetNumber": 0
},
"currencyCode": "string",
"interactionType": "string",
"checkNumber": "string",
"status": "string",
"paymentEntryStatus": "string",
"isRecurring": true,
"isManual": true,
"isPending": true,
"gatewayTransactionId": "string",
"gatewayAuthCode": "string",
"gatewayAVSCodes": "string",
"gatewayCVV2Codes": "string",
"gatewayResponseCode": "string",
"gatewayResponseText": "string",
"gatewayResponseData": [
{
"key": "string",
"value": "string"
}
],
"paymentTransactionInteractionIdReference": 0,
"amount": 0,
"note": "string",
"interactionDate": "2025-02-18T02:41:59.345Z",
"auditInfo": {
"updateDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z",
"updateBy": "string",
"createBy": "string"
},
"returnId": "string",
"refundId": "string",
"capturableShipmentsSummary": [
{
"shipmentNumber": 0,
"shipmentTotal": 0,
"amountApplied": 0
}
]
}
],
"isRecurring": true,
"amountCollected": 0,
"amountCredited": 0,
"amountRequested": 0,
"changeMessages": [
{
"id": "string",
"correlationId": "string",
"userId": "string",
"userFirstName": "string",
"userLastName": "string",
"userScopeType": "string",
"appId": "string",
"appKey": "string",
"appName": "string",
"subjectType": "string",
"success": true,
"identifier": "string",
"subject": "string",
"verb": "string",
"message": "string",
"createDate": "2025-02-18T02:41:59.345Z",
"attributes": {}
}
],
"auditInfo": {
"updateDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z",
"updateBy": "string",
"createBy": "string"
},
"gatewayGiftCard": {
"id": "string",
"cardNumber": "string",
"cardPin": "string",
"amount": 0,
"currencyCode": "string"
},
"installmentPlanCode": "string"
}
],
"amountRemainingForPayment": 0,
"acceptsMarketing": true,
"customerAccountId": 0,
"email": "string",
"alternateContact": {
"firstName": "string",
"lastNameOrSurname": "string",
"emailAddress": "string",
"phoneNumber": "string"
},
"customerTaxId": "string",
"isTaxExempt": true,
"currencyCode": "string",
"priceListCode": "string",
"attributes": [
{
"auditInfo": {
"updateDate": "2025-02-18T02:41:59.345Z",
"createDate": "2025-02-18T02:41:59.345Z",
"updateBy": "string",
"createBy": "string"
},
"fullyQualifiedName": "string",
"attributeDefinitionId": 0,
"values": [
null
]
}
],
"shopperNotes": {
"giftMessage": "string",
"comments": "string",
"deliveryInstructions": "string"
},
"availableActions": [
"string"
],
"data": {},
"taxData": {},
"channelCode": "string",
"locationCode": "string",
"ipAddress": "string",
"sourceDevice": "string",
"visitId": "string",
"webSessionId": "string",
"customerInteractionType": "string",
"orderDiscounts": [
{
"impact": 0,
"discount": {
"id": 0,
"name": "string",
"itemIds": [
"string"
],
"expirationDate": "2025-02-18T02:41:59.345Z",
"hasMultipleTargetProducts": true
},
"couponCode": "string",
"excluded": true,
"data": {}
}
],
"couponCodes": [
"string"
],
"invalidCoupons": [
{
"couponCode": "string",
"reasonCode": 0,
"reason": "string",
"createDate": "2025-02-18T02:41:59.345Z",
"discountId": 0
}
],
"suggestedDiscounts": [
{
"productCode": "string",
"autoAdd": true,
"discountId": 0,
"hasMultipleProducts": true,
"hasOptions": true
}
],
"discountThresholdMessages": [
{
"discountId": 0,
"message": "string",
"thresholdValue": 0,
"showOnCheckout": true,
"showInCart": true,
"requiresCouponCode": true
}
],
"dutyTotal": 0,
"feeTotal": 0,
"subTotal": 0,
"itemLevelProductDiscountTotal": 0,
"orderLevelProductDiscountTotal": 0,
"itemTaxTotal": 0,
"itemTotal": 0,
"shippingSubTotal": 0,
"itemLevelShippingDiscountTotal": 0,
"orderLevelShippingDiscountTotal": 0,
"shippingTaxTotal": 0,
"shippingTotal": 0,
"handlingSubTotal": 0,
"itemLevelHandlingDiscountTotal": 0,
"orderLevelHandlingDiscountTotal": 0,
"handlingTaxTotal": 0,
"handlingTotal": 0,
"total": 0
}
For information about the properties in the response, refer to the REST API Help.
Context Objects Available to All Actions
apiContext
Accesses tenant information.
Properties | 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.
Properties | Type | Description |
---|---|---|
Varies | object | Custom fields and values that you can set in the Action Management JSON Editor. |
Example:
context.configuration.customData;