We are migrating from Salesforce CPQ to Revenue Cloud (Agentforce Revenue Management), API v67/v68. We have a custom picklist field Action_Type__c (Add, Amend, Cancel, Renew, No Change, Transfer, Cancel and Renew) that we stamp on Quote Line Item and Quote Action, and it flows to Order Product through the Sales Transaction context definition (Sales Transaction Item attribute mapped in QuoteEntitiesMapping and OrderEntitiesMapping). That part works.
We want the same value on Asset Action and Asset Action Source after the order is activated and assets are created or updated (createOrUpdateAssetFromOrder, called from a record-triggered flow on Order).
What we tried:
- Created Action_Type__c (picklist) on Asset Action and Asset Action Source.
- In the context definition: added a custom attribute on the Asset Action Source and Asset Action nodes, hydration mapping in AssetEntitiesMapping (Asset Action Source to Asset Action Source), and in AssetToSalesTransactionMapping the Asset Action Source to Sales Transaction Item mapping with ctxAttrHydrationCtxs, following the same pattern we use for another custom field (Average Unit Price).
- Activated new versions and ran fresh amendment and renewal orders.
Result: Order Product has the value, but Asset Action and Asset Action Source stay blank. Asset Action and Asset Action Source are not createable or updateable through the API or Apex, so we cannot backfill them either. The only link we have is AssetActionSource.ReferenceEntityItemId (polymorphic to OrderItem or OrderItemDetail).
Questions:
- Is it supported to persist a custom field value onto Asset Action or Asset Action Source when assets are created from orders? If yes, which context mapping, node or setting is required (is the Asset context mapping used on the write path, or only for hydration)?
- Does createOrUpdateAssetFromOrder copy any custom fields from Order Product to Asset Action Source, and if so how is the mapping defined?
- If it is not supported, what is the recommended pattern for reporting the originating action type per Asset Action (sidecar object populated by an Apex trigger on Asset Action Source, or something else)?
Any pointers to documentation or a release note would be appreciated.
#Revenue Cloud #Salesforce Revenue Cloud