78  /  79

Change in price

Change price type - this case describe how to set several price types in Bitrix24.

1. Create some product properties with data type "number" to specify additional price:


2. Add to the Invoice (deal, quote) a custom field with data type "list" and add values to the list:


3. Create a webhook description and specify the condition for the handler run:

1) object and event type;
2) object's custom field;
3) custom field value.

4. Set the new price type for the handler job


How does it work?
1. You've saved invoice.
2. The webhook is looking through events descriptions. If user field "Price type" is not "Custom price #1", nothing will happen. In other case handler will be run.
3. The handler is looking through product table and comparing current price with "Custom price #1", if it different it'll set the new value.
4. The invoice will be saved.
5. In case "Notification" will be specified, you'll get a notification with specified text.