How to use a trigger to check field changes.
Copy the link to the article
Copied

If you want to exclude the execution of a trigger action for certain phone numbers by an exact match, you must add the code corresponding to the trigger event to the trigger condition\filter.

  • "Change of order" and "After trigger for order"
  • "Change of the customer information", "The customer visited the site", "The customer did not visit the site", "The customer left the site" and "After trigger for customer".
  • "New call" and "Missed call".

Note

The "Customer visited the site", "Customer did not visit the site" and "Customer left the site" events will become available for selection after connecting the Daemon Collector.

For the "Change of order" and "After trigger for order" events:

order.phone != '+74951111111'

The trigger will not be executed in case of the exact match of the phone number +74951111111 in the order.

order.phone not matches '7495'

The trigger will not be executed if the phone number contains 7495

For the "Change of the custimer information", "Customer visited the site", "Customer did not visit the site", "Customer left the site" and "After trigger for customer" events:

customer.phones | every(phone =>phone != '+74951111111')

The trigger will not be executed if there is no phone number in the customer's phone number list +74951111111

customer.phones | every(phone =>phone not matches '7495')

The trigger will not be executed if there is no phone number in the customer's phone number list that contains 7495

For the "New call" and "Missed call" events:

call.phone != '+74951111111'

The trigger will not be executed if the customer's phone number is +74951111111

call.phone not matches '7495'

The trigger will not be executed if the customer's phone number does not contain 7495

Thank you for your feedback.
Was this article helpful?
No
  • Рекомендации не помогли
  • Нет ответа на мой вопрос
  • Текст трудно понять
  • Не нравится описанный функционал
Yes
Next article
Actions that can be performed in triggers with fields
When certain conditions are met, a trigger can perform mathematical and logical actions using operators, as well as being able to work with PipeLanguage functions and filters.
#}