0

We have many complex Price Rules in our org. Sometimes it is not clear how the price came to be and what Price Rules was executed out.

Therefore, I wanted to ask if it would be possible to adjust the Price Rules so that you can send an email in addition to their actual function.

I have already googled it, but didn't find anything.

2 Answers 2

1

You can't send emails from Price Rules (no apex, workflows as well). When user is working in QLE, then Price rule calculations are only stored on UI side, not in Salesforce's objects (so no dml executed). Only when you click Save - CPQ makes a dml operation and commits to the database - in this case Salesforce context is executed (with triggers, workflows etc).

What you are asking is how to debug Price Rules to understand what values are calculated (especially if you have some intermediate data), correct? There three main ways of doing so:

  1. Order all you price rules, so at least you have expectations of what is executed. Order by event - On Initialization, Before Calculate, On Calculate, After Calculate (e.g. 2 rules On Initialization with order 2 and 4, then 5 rules on Before Calculate with order 6, 8, 10, 12, 14 and so on for other events).
  2. When you have an order, try to 'play' with rules by activating and deactivating some of them, so you can check intermediate results.
  3. Create some dummy fileds (which you will delete after all) and save intermediate results there.

Here is CPQ Quote Calculation Stages documentation.

-1

The primary purpose of pricerule is to update field based on calculation. You can certainly cannot trigger email just with pricerule. But you can do a workaround with the help of workflow, process builder or Apex.

Cheers!!!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .