Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
Cart
The details of a cart and its line items for which to evaluate and execute promotions.
- JSON example
- This example shows a sample
response.
1{ 2 "cart": { 3 "cartDetails": [ 4 { 5 "adjustedCartAmount": 69.5, 6 "appliedCartPromotionDetails": [ 7 { 8 "cartAmountAfterDiscount": 99.5, 9 "cartAmountBeforeDiscount": 99.5, 10 "cartLevelDiscountAmount": 0, 11 "displayName": "Get 10% off on Burger + Voucher", 12 "isAutomatic": true, 13 "nonPricingRewards": { 14 "voucherRewards": [ 15 { 16 "voucherDefinitionId": "2Xaxx00000000XtCAI", 17 "voucherDefinitionName": "Voucher1" 18 } 19 ] 20 }, 21 "promotionId": "0c8xx00000004y5AAA" 22 }, 23 { 24 "cartAmountAfterDiscount": 89.5, 25 "cartAmountBeforeDiscount": 99.5, 26 "cartLevelDiscountAmount": 10, 27 "displayName": "10% off on Cart", 28 "isAutomatic": true, 29 "nonPricingRewards": {}, 30 "promotionId": "0c8xx00000005R7AAI" 31 }, 32 { 33 "cartAmountAfterDiscount": 99.5, 34 "cartAmountBeforeDiscount": 99.5, 35 "cartLevelDiscountAmount": 0, 36 "displayName": "Cart Voucher", 37 "isAutomatic": true, 38 "nonPricingRewards": { 39 "voucherRewards": [ 40 { 41 "voucherDefinitionId": "2Xaxx00000000XtCAI", 42 "voucherDefinitionName": "Voucher1" 43 } 44 ] 45 }, 46 "promotionId": "0c8xx000000060bAAA" 47 }, 48 { 49 "cartAmountAfterDiscount": 79.5, 50 "cartAmountBeforeDiscount": 99.5, 51 "cartLevelDiscountAmount": 20, 52 "isAutomatic": true, 53 "nonPricingRewards": {}, 54 "promotionId": "0c8xx00000006wfAAA" 55 }, 56 { 57 "cartAmountAfterDiscount": 99.5, 58 "cartAmountBeforeDiscount": 99.5, 59 "cartLevelDiscountAmount": 0, 60 "displayName": "LOY promotion", 61 "isAutomatic": true, 62 "nonPricingRewards": { 63 "badgeRewards": [ 64 { 65 "loyaltyProgramBadgeId": "0w8xx0000000001AAA", 66 "badgeValidityEndDate": "2025-08-31T00:00:00.000Z", 67 "loyaltyProgramBadgeName": "badge1" 68 } 69 ], 70 "fixedPointsRewards": [ 71 { 72 "loyaltyProgramCurrencyName": "NQP", 73 "loyaltyProgramCurrencyId": "0lcxx00000001FRAAY", 74 "points": 100 75 } 76 ] 77 }, 78 "promotionId": "0c8xx0000000EpNAAU" 79 }, 80 { 81 "cartAmountAfterDiscount": 99.5, 82 "cartAmountBeforeDiscount": 99.5, 83 "cartLevelDiscountAmount": 0, 84 "isAutomatic": true, 85 "nonPricingRewards": { 86 "multiplierPointsRewards": [ 87 { 88 "loyaltyProgramCurrencyName": "NQP", 89 "pointsExpirationDate": "2025-09-07T00:00:00.000Z", 90 "transactionJournalField": "TransactionJournal.TransactionAmount", 91 "loyaltyProgramCurrencyId": "0lcxx00000001FRAAY", 92 "multiplierValue": 44 93 } 94 ], 95 "gameRewards": [ 96 { 97 "gameDefinitionId": "3GDxx0000004C92GAE", 98 "gameType": "Scratchcard", 99 "gameDefinitionName": "GD1" 100 } 101 ] 102 }, 103 "promotionId": "0c8xx0000000Fv7AAE" 104 } 105 ], 106 "cartHeaderId": "01ddf0000003kfMAAW", 107 "cartLineDetails": [ 108 { 109 "appliedCartLinePromotionDetails": [ 110 { 111 "cartLineItemAmountAfterDiscount": 95, 112 "cartLineItemAmountBeforeDiscount": 100, 113 "cartLineItemDiscountAmount": 5, 114 "couponCode": "PIZZA5", 115 "currencyIsoCode": "USD", 116 "displayName": "5 % off on Pizza", 117 "isAutomatic": false, 118 "promotionId": "0c8xx00000005NtAAI" 119 } 120 ], 121 "cartLineItemAmountAfterDiscount": 66.36, 122 "cartLineItemAmountBeforeDiscount": 100, 123 "cartLineItemId": "abcd1", 124 "cartLineItemQuantity": 2, 125 "cartLineProduct": "Pizza", 126 "totalCartLineItemDiscountAmount": 33.64, 127 "totalCartLinePromotionsDiscountAmount": 5, 128 "totalCartPromotionsDistributedDiscountAmount": 28.64 129 }, 130 { 131 "appliedCartLinePromotionDetails": [ 132 { 133 "cartLineItemAmountAfterDiscount": 9, 134 "cartLineItemAmountBeforeDiscount": 10, 135 "cartLineItemDiscountAmount": 1, 136 "currencyIsoCode": "USD", 137 "displayName": "Get 10% off on Burger + Voucher", 138 "isAutomatic": true, 139 "promotionId": "0c8xx00000004y5AAA" 140 }, 141 { 142 "cartLineItemAmountAfterDiscount": 4.5, 143 "cartLineItemAmountBeforeDiscount": 9, 144 "cartLineItemDiscountAmount": 4.5, 145 "currencyIsoCode": "USD", 146 "displayName": "Buy 1 Pizza, Get 1 Burger Free", 147 "isAutomatic": true, 148 "promotionId": "0c8xx00000006TdAAI" 149 } 150 ], 151 "cartLineItemAmountAfterDiscount": 3.14, 152 "cartLineItemAmountBeforeDiscount": 10, 153 "cartLineItemId": "abcd2", 154 "cartLineItemQuantity": 2, 155 "cartLineProduct": "Burger", 156 "totalCartLineItemDiscountAmount": 6.86, 157 "totalCartLinePromotionsDiscountAmount": 5.5, 158 "totalCartPromotionsDistributedDiscountAmount": 1.36 159 } 160 ], 161 "initialCartAmount": 110, 162 "totalCartLevelDiscountAmount": 30, 163 "totalDiscountAmount": 40.5, 164 "totalLineLevelDiscountAmount": 10.5 165 } 166 ] 167 } 168}
| Property Name | Type | Description | Filter Group and Version | Available Version |
|---|---|---|---|---|
| cartDetails | Cart Details[] | Details of the cart and its line items, including initial amount, adjusted price, and details of all applied discounts and promotions. | Big, 65.0 | 65.0 |