77  /  79

Here is a new offer

You've changed a price or quantity at the quote and you want to send new conditions to your customer...
 
You had worked hard with a quote draft and you want to send it to customer by one click after quote state will be changed to "Being reviewed by client"...

What shall you do?

1. Add a new webhook for quote. Set reviewed state of quote and current amount is not "Previous Sum". "Previous Sum" is the custom field for quote with data type "number", it should be added before.


2. Add a handler to PDF creation.


3. Add a handler to send e-mail with new offer.


4.Set "Previous Sum" as current amount to excluding re-circle.


How does it work?

1. You've saved a quote. The webhook is looking through events descriptions. If quote state is "Being reviewed by client" and custom field "Previous Sum" is not "Amount", handlers will be run. In other case nothing will happen.
2. Will be created a PDF.
3. PDF will be sended by e-mail as attach, after that file will be deleted from disk.
4. The quote fields will be modified. "Previous Sum" will be set equal amount, quote state will be set as "Sent to client".