Create Subscription Records Action

Creates subscription records for orders containing subscription products. It accepts either the order summary ID or the order item summary IDs as input, filters the subscription products, and creates records to manage them effectively.

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
Subscription​ProcessedItems 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]