Get Promotions Applied to Cart

Return a list of promotions applied to a specified cart.

1GET /v2/cpq/carts/{cart_ID}

Remote Method 

1getPromotionsAppliedToCart

REST Handlers 

  • REST endpoint: APIPromotionsCartsCpqV2.cls

  • Implementation: CpqAppliedPromotionsCartsActionV2.cls

Apex Remote Service 

1CpqAppHandler

Apex Remote Input Map 

1{
2  methodName:getPromotionsAppliedToCart
3  cartId:80146000000iwCx,
4  pagesize:10,
5  fields:"Id,Name",
6  includePenalties:true,
7  filters:vlocity_cmt__AppliesTo__c:Account_Contract,
8  commitmentDateFilter:2020-04-05T07:00:00.000Z,
9  appliedPromoStatusFilter:Expired
10}

Package 

Communication (vlocity_cmt)

API Parameters and Response Format 

For API parameter names and descriptions, see Cart-Based API Swagger Reference.

Resource Information 

Response FormatJSON
Resource URL/services/apexrest/{namespace}/v2/cpq/carts/{cart_ID}/promotions?subaction=getPromotionsAppliedToCart

Example Request 

1GET /services/apexrest/vlocity_cmt/v2/cpq/carts/801360000000oQ9/promotions

Example Response 

1{
2  "totalSize": 1,
3  "messages": [],
4  "records": [
5    {
6      "messages": [],
7      "actions": {
8        "deleteappliedpromoitems": {
9          "rest": {
10            "params": {},
11            "method": "DELETE",
12            "link": "/services/apexrest/vlocity_cmt/v2/cpq/carts/801f40000008UlxAAE/promotions?id=a2Lf4000000TvFmEAK"
13          },
14          "remote": {
15            "params": {
16              "id": "a2Lf4000000TvFmEAK",
17              "cartId": "801f40000008UlxAAE",
18              "methodName": "deleteAppliedPromoItems"
19            }
20          },
21          "client": {
22            "params": {}
23          }
24        },
25        "getpromodetails": {
26          "rest": {
27            "params": {},
28            "method": "GET",
29            "link": "/services/apexrest/vlocity_cmt/v2/cpq/carts/801f40000008UlxAAE/promotions?id=a2Lf4000000TvFmEAK&subaction=getPromotionsAppliedToCart&includePenalties=true"
30          },
31          "remote": {
32            "params": {
33              "includePenalties": true,
34              "subaction": "getPromotionsAppliedToCart",
35              "id": "a2Lf4000000TvFmEAK",
36              "cartId": "801f40000008UlxAAE",
37              "methodName": "getPromotionsAppliedToCart"
38            }
39          },
40          "client": {
41            "params": {}
42          }
43        }
44      },
45      "displaySequence": -1,
46      "Id": {
47        "value": "a2Lf4000000TvFmEAK",
48        "previousValue": null,
49        "originalValue": null,
50        "messages": [],
51        "label": "Record ID",
52        "hidden": true,
53        "fieldName": "Id",
54        "editable": false,
55        "dataType": "ID",
56        "actions": {}
57      },
58      "vlocity_cmt__BillingAccountId__c": {
59        "value": "001f40000093uqMAAQ",
60        "previousValue": null,
61        "originalValue": null,
62        "messages": [],
63        "label": "Account",
64        "hidden": true,
65        "fieldName": "vlocity_cmt__BillingAccountId__c",
66        "editable": true,
67        "dataType": "REFERENCE",
68        "actions": {}
69      },
70      "vlocity_cmt__Action__c": {
71        "value": "Change",
72        "previousValue": null,
73        "originalValue": null,
74        "messages": [],
75        "label": "Action",
76        "hidden": true,
77        "fieldName": "vlocity_cmt__Action__c",
78        "editable": true,
79        "dataType": "PICKLIST",
80        "actions": {}
81      },
82      "vlocity_cmt__PromotionId__c": {
83        "value": "a2ff4000000cHPMAA2",
84        "previousValue": null,
85        "originalValue": null,
86        "messages": [],
87        "label": "Promotion",
88        "hidden": true,
89        "fieldName": "vlocity_cmt__PromotionId__c",
90        "editable": true,
91        "dataType": "REFERENCE",
92        "actions": {}
93      },
94      "vlocity_cmt__Sequence__c": {
95        "value": null,
96        "previousValue": null,
97        "originalValue": null,
98        "messages": [],
99        "label": "Sequence",
100        "hidden": true,
101        "fieldName": "vlocity_cmt__Sequence__c",
102        "editable": true,
103        "dataType": "DOUBLE",
104        "actions": {}
105      },
106      "vlocity_cmt__FulfilmentStatus__c": {
107        "value": null,
108        "previousValue": null,
109        "originalValue": null,
110        "messages": [],
111        "label": "Fulfilment Status",
112        "hidden": true,
113        "fieldName": "vlocity_cmt__FulfilmentStatus__c",
114        "editable": true,
115        "dataType": "PICKLIST",
116        "actions": {}
117      },
118      "vlocity_cmt__ReasonForCancellation__c": {
119        "value": null,
120        "previousValue": null,
121        "originalValue": null,
122        "messages": [],
123        "label": "Reason for Cancellation",
124        "hidden": true,
125        "fieldName": "vlocity_cmt__ReasonForCancellation__c",
126        "editable": true,
127        "dataType": "STRING",
128        "actions": {}
129      },
130      "vlocity_cmt__RequestDate__c": {
131        "value": null,
132        "previousValue": null,
133        "originalValue": null,
134        "messages": [],
135        "label": "Request Date",
136        "hidden": true,
137        "fieldName": "vlocity_cmt__RequestDate__c",
138        "editable": true,
139        "dataType": "DATETIME",
140        "actions": {}
141      },
142      "vlocity_cmt__SubAction__c": {
143        "value": null,
144        "previousValue": null,
145        "originalValue": null,
146        "messages": [],
147        "label": "Sub Action",
148        "hidden": true,
149        "fieldName": "vlocity_cmt__SubAction__c",
150        "editable": true,
151        "dataType": "PICKLIST",
152        "actions": {}
153      },
154      "vlocity_cmt__CommitmentStartDate__c": {
155        "value": null,
156        "previousValue": null,
157        "originalValue": null,
158        "messages": [],
159        "label": "Commitment Start Date",
160        "hidden": true,
161        "fieldName": "vlocity_cmt__CommitmentStartDate__c",
162        "editable": true,
163        "dataType": "DATETIME",
164        "actions": {}
165      },
166      "vlocity_cmt__CommitmentEndDate__c": {
167        "value": null,
168        "previousValue": null,
169        "originalValue": null,
170        "messages": [],
171        "label": "Commitment End Date",
172        "hidden": true,
173        "fieldName": "vlocity_cmt__CommitmentEndDate__c",
174        "editable": true,
175        "dataType": "DATETIME",
176        "actions": {}
177      },
178      "vlocity_cmt__PricingStartDate__c": {
179        "value": null,
180        "previousValue": null,
181        "originalValue": null,
182        "messages": [],
183        "label": "Benefit Start Date",
184        "hidden": true,
185        "fieldName": "vlocity_cmt__PricingStartDate__c",
186        "editable": true,
187        "dataType": "DATETIME",
188        "actions": {}
189      },
190      "vlocity_cmt__PricingEndDate__c": {
191        "value": null,
192        "previousValue": null,
193        "originalValue": null,
194        "messages": [],
195        "label": "Benefit End Date",
196        "hidden": true,
197        "fieldName": "vlocity_cmt__PricingEndDate__c",
198        "editable": true,
199        "dataType": "DATETIME",
200        "actions": {}
201      },
202      "vlocity_cmt__AppliesTo__c": {
203        "value": null,
204        "previousValue": null,
205        "originalValue": null,
206        "messages": [],
207        "label": "Applies To",
208        "hidden": true,
209        "fieldName": "vlocity_cmt__AppliesTo__c",
210        "editable": true,
211        "dataType": "PICKLIST",
212        "actions": {}
213      },
214      "Name": "BundleJul19Promo",
215      "Description": "BundleJul19Promo",
216      "OrderRequestDate": "2019-11-13"
217    }
218  ]
219}