Replace OffersAdd commentMore actions
The replaceOffers API enables the replacement of an assetized product (source product) with another product from the same product family (target product) within an order or quote. This process preserves attributes, child products, and specific fields from the original order line item (OLI) during the replacement.
Key Features:
- Source and Target Product Replacement:
- The target product must belong to the same product family as the source product.
- Attributes from the source product are copied to the target product if they match.
- Child Product Handling:
- Common child products between source and target are copied, including their quantity and attribute configuration.
- Optional child products present in the source are added to the target during replacement.
- Optional child products can be nested within the product bundle hierarchy.
- Line Item Field Copying:
- Both standard and custom fields can be copied from the source to the target line item.
- Field settings must be configured under the feature name
COPFieldsToCopyDuringReplace.
- Copying Line Item Properties:
- Transfers relevant attributes and fields from the source item to the target item.
- Mandatory fields are always copied, including those defined under
COPFieldsToCopyDuringReplace.
- Addition of Optional Line Items:
- Optional line items in source and target bundles are automatically added under the target bundle if present in the source.
This API supports the guest user enhancements that Salesforce introduced with the Winter ‘21 release. To encrypt and decrypt data for guest users, use the UserSecurity class with this API. See Guest User Technical Details.
For additional information, see UserSecurity Class and CPQ and Digital Commerce Changes for Guest Users.
Communication (vlocity_cmt)
For API parameter names and descriptions, see Cart-Based API Swagger Reference.
- Resource URL:
/services/apexrest/{namespace}/v2/cpq/carts/{cart_ID}/offermigration/replacement - HTTP Method: POST
- Content-Type: application/json
- Response Format: JSON