Place Sales Transaction for Consumer Sales Action

Place a sales transaction for Consumer Sales by submitting orders with validated cart contents and delivery information.

This action is available in API version 68.0 and later.

This is applicable for Consumer Sales for business-to-consumer (B2C).

Note

Special Access Rules 

You need the CME B2C permission set to use this invocable action.

Supported REST HTTP Methods 

URI: /services/data/v68.0/actions/standard/placeSalesTransactionConsuSls

Formats: JSON, XML

HTTP Methods: POST

Authentication: Authorization: Bearer TOKEN

Where, TOKEN is a variable.

Inputs 

InputTypeDescription
recordsGraphApexRequired.
An Apex Graph record that contains the records to place as a sales transaction.
configurationOptionsApexOptional.
Options that control configuration behavior during the sales transaction.
contextInfoDetailsApexOptional.
An Apex ContextInfo record that contains the sales transaction context details.
catalogRatesPrefstringOptional.
The preference for fetching catalog rates during the sales transaction.
pricingPrefstringOptional.
The preference for calculating pricing during the sales transaction.

Outputs 

OutputTypeDescription
salesTransactionIdstringThe ID of the sales transaction that was placed.
trackerIdstringThe tracker ID of the sales transaction.
statusUrlstringThe URL to check the status of the sales transaction.
isSuccessbooleanIndicates whether the sales transaction was executed.
contextDetailsApexAn Apex ContextDetails record that contains the sales transaction context details.
errorMessagesApex[]The list of error messages encountered while placing the sales transaction.

Example 

POST

This sample request is for the Place Sales Transaction for Consumer Sales action.

1{
2  "inputs": [
3    {
4      "pricingPref": "System",
5      "catalogRatesPref": "Skip",
6      "contextInfoDetails": {
7        "contextId": "e055bb18-d4e8-41c3-881e-0132b9561708"
8      },
9      "recordsGraph": {
10        "graphId": "createQuote",
11        "records": [
12          {
13            "referenceId": "refQuote",
14            "record": {
15              "attributes": {
16                "method": "POST",
17                "type": "Quote"
18              },
19              "Name": "Quote_Acme",
20              "Pricebook2Id": "01sDU000000JvhbYAC"
21            }
22          }
23        ]
24      }
25    }
26  ]
27}

This sample response is for the Place Sales Transaction for Consumer Sales action.

1[
2  {
3    "actionName": "placeSalesTransactionConsuSls",
4    "errors": null,
5    "invocationId": null,
6    "isSuccess": true,
7    "outputValues": {
8      "salesTransactionId": "0Q0xx0000004CNYCA2",
9      "trackerId": null,
10      "statusUrl": null,
11      "isSuccess": true,
12      "contextDetails": {
13        "contextId": "e055bb18-d4e8-41c3-881e-0132b9561708"
14      },
15      "errorMessages": []
16    },
17    "sortOrder": -1,
18    "version": 1
19  }
20]