Get Cart Summary
Return the cart details, including, account, multi-site, and additional action information.
Account information associated with this cart
If this cart includes a multi-site order, available sites
Links to further actions, such as check out
1 GET /v2/cpq/carts/{cart_ID}?headerFieldSet={field_set_feature}&validate={true|false}
Get Cart Details excludes these fields from the Opportunity, Order, and Quote.
IsDeleted
CreatedDate
CreatedById
LastModifiedDate
LastModifiedById
SystemModstamp
LastActivityDate
CleanStatus
Get Cart Details returns these fields from the Opportunity, Order, and Quote.
Opportunity
{
‘Name’, ‘Account.Id’, ‘Account.Name’, ‘Account.PhotoUrl’,
‘Email__c’, ‘Phone__c’, ‘EffectiveRecurringTotal__c’, ‘EffectiveOneTimeTotal__c’, ‘EffectiveOpportunityTotal__c’,
‘PriceListId__c’,‘PriceListId__r.Name’,‘PriceListId__r.CurrencyCode__c’,‘PriceListId__r.LoyaltyCode__c’,
‘OriginatingContractId__c’
}
Order
{
‘Name’, ‘Status’, ‘OrderNumber’, ‘Account.Id’,
‘Account.Name’, ‘Account.PhotoUrl’, ‘ShippingAddress’, ‘ShipToContact.Name’,
‘Email__c’, ‘Phone__c’, ‘EffectiveRecurringTotal__c’,
‘EffectiveOneTimeTotal__c’, ‘EffectiveOrderTotal__c’,‘PriceListId__c’,‘PriceListId__r.Name’,‘PriceListId__r.CurrencyCode__c’,‘PriceListId__r.LoyaltyCode__c’,
‘OrderStatus__c’, ‘IsChangesAllowed__c’, ‘SupersededOrderId__c’, ‘OriginatingContractId__c’,‘SupplementalAction__c’, ‘RecordType.Name’, ‘AsyncOperation__c’
}
Order
{
‘Name’, ‘QuoteNumber’, ‘Account.Id’,
‘Account.Name’, ‘Account.PhotoUrl’, ‘ShippingAddress’, ‘ShippingName’,
‘Email’, ‘Phone’, ‘EffectiveRecurringTotal__c’, ‘EffectiveOneTimeTotal__c’, ‘EffectiveQuoteTotal__c’,
‘PriceListId__c’,‘PriceListId__r.Name’,‘PriceListId__r.CurrencyCode__c’,‘PriceListId__r.LoyaltyCode__c’,
‘RenewalSourceContractId__c’, ‘RecordType.Name’, ‘AsyncOperation__c’
}
By default, items deleted from a cart are not evaluated for Vlocity Rules. To enable evaluation of deleted items, set the ‘ShouldConsiderDeletedItems’ custom setting to true.
In Salesforce Industries Communications, Media, and Energy Winter ‘21 and later releases, the getCarts validate parameter has a default value of _True*, so the API will return validation messages. If validate=false is not specified, validation messages are returned by default. Specify validate=false in the UI if you do not want to receive validation messages.
This API supports the guest user enhancements that Salesforce introduced with the Winter ‘21 release. To encrypt and decrypt data for guest users, use the UserSecurity class with this API. See Guest User Technical Details.
For additional information, see UserSecurity Class and CPQ and Digital Commerce Changes for Guest Users.
Remote Method
REST Handler
Apex Remote Service
Apex Remote Input Map
1 {
2 methodName: getCarts,
3 cartId: 801360000008 eNU,
4 "headerFieldSet": "CPQV2"
5 }
6 cartId = order.Id, opportunity.Id, or quote.Id
Package
Communication (vlocity_cmt)
API Parameters and Response Format
For API parameter names and descriptions, see Cart-Based API Swagger Reference .
Resource Information
| Response Format | JSON |
| --------------- | -------------------------------------------------------------------------------------------------------- | ------- |
| Resource URL | /services/apexrest/{namespace}/v2/cpq/carts/{cart_ID}?headerFieldSet={field_set_feature}&validate={true | false} |
Example Request
1 GET
2 /services/apexrest/vlocity_cmt/v2/cpq/carts/80141000000Cg8H
Example Result
1 {
2 "totalSize": 1,
3 "messages": [],
4 "records": [{
5 "messages": [],
6 "displaySequence": -1,
7 "details": {
8 "totalSize": 1,
9 "messages": [],
10 "records": [{
11 "messages": [],
12 "actions": {
13 "checkout": {
14 "rest": {
15 "params": {},
16 "method": "POST",
17 "link": "/services/apexrest/vlocity_cmt/v2/cpq/carts/80141000000Cg8HAAS/checkout"
18 },
19 "remote": {
20 "params": {
21 "cartId": "80141000000Cg8HAAS",
22 "methodName": "checkout"
23 }
24 },
25 "client": {
26 "params": {}
27 }
28 }
29 },
30 "displaySequence": -1,
31 "Id": "80141000000Cg8HAAS",
32 "Status": "Draft",
33 "OrderNumber": "00000965",
34 "Account.Name": "Telco test",
35 "EffectiveRecurringTotal__c": 0.00,
36 "EffectiveOneTimeTotal__c": 5.00,
37 "EffectiveOrderTotal__c": 5.00,
38 "ObjectType": "Order"
39 }]
40 },
41 "sites": {
42 "totalSize": 0,
43 "messages": [{
44 "severity": "ERROR",
45 "messageId": null,
46 "message": "No Results Found.",
47 "code": "101",
48 "actions": {}
49 }],
50 "actions": {
51 "newsite": {
52 "rest": {
53 "params": {},
54 "method": "POST",
55 "link": "/services/apexrest/vlocity_cmt/v2/cpq/carts/80141000000Cg8HAAS/sites"
56 },
57 "remote": {
58 "params": {
59 "type": "Service",
60 "methodName": "newSite"
61 }
62 },
63 "client": {
64 "params": {}
65 }
66 }
67 }
68 }
69 }]
70 }