Loading
ただいま大変多くのお問い合わせをいただいており、ご連絡までにお時間を頂戴しております続きを読む

Revenue Cloud Advanced: Use Product Classifications in CML to Alert Users of Incompatible Products on a Quote

公開日: Jun 29, 2026
説明

When building a Quote for a Product, ensure that any Product(s) with a certain Product Classification cannot also be included on the Quote.

 

Example Use Case: When building a Quote for a Car, I want to alert Users when they have added any Products with the Motorcycle Product Classification.

 

Note:

  • This use case must be setup with the CML Editor.
  • More than one Product Classification can be referenced. 
解決策
  1. Create a Constraint Model.
  2. Click New Type and enter the Name of your Product 'Car' > click Create to add the Car Product.
  3. Add the Type Association > Create Association > Object Category = Product > Object to Map = 'Car' Product > Save.
  4. Click New Type and enter the Name of your Product Classification 'Motorcycle' > click Create to add the Product Classifiation.
  5. Add the Type Association > Create Association > Object Category = Product Classification > Object to Map = 'Motorcycle' Product Classification > Save.
  6. Save the CML.
  7. Add a virtual type Quote, and Save the CML.
  8. Include the relations to the Car Product, Computer Classification, and your error message.
  9. Save and Activate the CML.
@(virtual = true)
type Quote{

@(sourceContextNode = "SalesTransaction.SalesTransactionItem")
    relation car : Car[0..1];

@(sourceContextNode = "SalesTransaction.SalesTransactionItem")
    relation motorcyle : Motorcyle;

    string Msg = "Cannot combine Motorcyle Parts with Car Products";

    message(car[Car] > 0 && motorcyle[Motorycle] > 0, "{}", Msg, "Error");
    
}

type Car;

type Computer;

 

When a User adds a Product associated with the Motorcycle Product Classification, the error message is displayed on the Quote header, and the Quote cannot be ordered until the Motorcycle Product Classification is removed from the Quote.

ナレッジ記事番号

005387421

 
読み込み中
Salesforce Help | Article