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.
Create Subscription Records Action
Special Access Rules
This action is available in API version 63.0 and later for users with system administrator access or the Assetize Order permission set assigned, along with any of the following licenses enabled:
- B2B Commerce, or D2C Commerce and Revenue Cloud Subscription Management. When this license is enabled in your org, both orderSummaryId and orderItemSummaryIds are supported.
- B2B Commerce, or D2C Commerce and Revenue Lifecycle Management. When this license is enabled in your org, only orderSummaryId is supported.
Supported REST HTTP Methods
URI: /services/data/vXX.X/actions/standard/createSubscriptionRecords
Formats: JSON, XML
HTTP Methods: POST
Authentication: Authorization: Bearer token
Inputs
| Input | Type | Description |
|---|---|---|
| webStoreId | String | Required. The ID of the web store associated with the order. |
| orderSummaryId | String | The ID of the order summary record. Optional if orderItemSummaryIds is specified. |
| orderItemSummaryIds | String | The list of the order item summary IDs. Optional if orderSummaryId is specified. |
Outputs
| Output | Type | Description |
|---|---|---|
| SubscriptionProcessedItems | STRING | An array of order item summary IDs that are processed and have an associated subscription record created. |
Example
Sample Request
Here's a sample request with orderSummaryID and webStoreID:
1{
2 "inputs": [
3 {
4 "createSubscriptionRecords": {
5 "orderSummaryId": "1OsJ3000000Gmd3KAC",
6 "webStoreId": "0ZE5i000000PbfKGAS"
7 }
8 }
9 ]
10}Here's a sample request with orderItemSummaryIDs and webStoreID:
1{
2 "inputs": [
3 {
4 "createSubscriptionRecords": {
5 "orderItemSummaryIds": [
6 "10uJ3000000GmczIAC", "10uJ3000000GmcyIAC"
7 ],
8 "webStoreId": "0ZE5i000000PbfKGAS"
9 }
10 }
11 ]
12}Sample Response
1[
2 {
3 "actionName": "createSubscriptionRecords",
4 "errors": null,
5 "isSuccess": true,
6 "outputValues": {
7 "SubscriptionProcessedItems": [
8 "10uJ3000000GmczIAC",
9 "10uJ3000000GmcyIAC"
10 ]
11 }
12 }
13]