Use the productSellingModel tagname to write a constraint that sets the Product Selling Model (PSM) for a type. You can define a PSM as one time, time-deferred (subscription with end date), or evergreen (recurring subscription with no preset end date). The PSM is updated for new line items at runtime, based on the constraint.
You can’t use a Constraint Modeling Language (CML) constraint to update the PSM for an existing quote line. For more information on product selling models, see Manage Product Selling Model in Revenue Cloud in Salesforce Help.
Constraint Example
Using the GeneratorSet model, a constraint can be defined that sets the PSM based on a specific operational attribute chosen by the user, such as the DutyRating. This assumes that different duty ratings correspond to different billing models (for example, permanent installation versus temporary rental).
This example sets the PSM to a specific ID (for example, PSM_EVERGREEN_ID) if the user selects the “Continuous Power (COP)” duty rating.
1//Global variable PSM ID2define PSM_EVERGREEN_ID "a00Tx000000Qz1g"3type GeneratorSet {4// Use the productSellingModel tag from the context definition5@(tagName = "ProductSellingModel")6string productSellingModel;7string DutyRating = ["Prime Power (PRP)", "Continuous Power (COP)", "Emergency Standby Power (ESP)"];8// Set PSM based on Duty Rating9constraint(10DutyRating == 'Continuous Power (COP)' -> productSellingModel == PSM_EVERGREEN_ID11);12}