Newer Version Available

This content describes an older version of this product. View Latest

Change a Lifecycle-Managed Asset

Review an example of using Connect REST API to amend an asset after a new lifecycle event.

Example

On 10/01, your customer wants to increase number of licenses by 10 from October through December. They make an amendment order that creates the following order product.

Order Product
ID: 1237
Date of Sale: 10/01/20 2:00:00pm PST
Start Date: 10/01/20 9:00:00am PST
End Date: 12/31/20 8:59:59am PST
Amount: $600
Quantity: 10

Build an integration that calls the Change Asset resource and passes an asset action source, asset action, and two asset state periods. The first asset state period represents the period from 07/01 through 09/30, with a license quantity of 20. The second asset state period represents the period from 10/01 through 12/31, with a license quantity of 25. The asset action provides information on what type of change took place, when the change occurred, and the change in quantity, amount, and/or monthly recurring revenue.

Endpoint
/services/data/v50.0/asset-management/assets/02iB00000007bZ6IAI/actions/change
Input
1{
2"assetStatePeriods":[ {
3    "startDate":"2020-07-01T09:00:00+08:00",
4    "endDate":"2020-09-30T08:59:59+08:00",
5    "quantity":20.0,
6    "mrr":200.00,
7    "amount":600.00
8    },
9    {
10    "startDate":"2020-10-01T09:00:00+08:00",
11    "endDate":"2020-12-31T08:59:59+08:00",
12    "quantity":25.0,
13    "mrr":250.00,
14    "amount":750.00
15    }],
16    
17"assetAction":{
18    "category":"Upsells",
19    "actionDate":"2020-10-01T14:00:00+08:00",
20    "quantityChange":5.0,
21    "mrrChange":50.00,
22    "amount":150.00
23    },
24    
25"assetActionSources":[{
26    "transactionDate":"2020-10-01T14:00:00+08:00",
27    "startDate":"2020-10-01T09:00:00+08:00",
28    "endDate":"2020-12-31T08:59:59+08:00",
29    "quantity":5.0,
30    "productAmount":150.00,
31    "referenceEntityItem":"1WLB00000003geJOAQ"
32    }]
33}
Output
Asset change 1