Changing trigger conditions for sending a track number In version 8.0 of the system, we have changed the delivery registration process. Triggers that are used to send email or SMS messages with delivery tracking information must now be changed. false W3sidGl0bGUiOiJBdXRvbWF0aW9uIiwidXJsIjoiL3VzZXJzL2F1dG9tYXRpb24tdXNlci8ifSx7InRpdGxlIjoiVHJpZ2dlcnMiLCJ1cmwiOiIvdXNlcnMvYXV0b21hdGlvbi11c2VyL2Z1bmN0aW9uLXRyaWdnZXJzLyJ9XQ== Automation /users/automation-user/ ["users","Automation"] ["users","Automation","Triggers"] users

Changing trigger conditions for sending a track number

In version 8.0 of the system, we have changed the delivery registration process. Triggers that are used to send email or SMS messages with delivery tracking information must now be changed.

A track number is added to the order during the process of delivery registration that’s why conditions connected with the track number and changes in the order shouldn’t be used simultaneously in one trigger.

Conditions connected with the track number:

  • Adding
  • Changing
  • Deleting

Conditions connected with changes in the order:

  • Change of the order status
  • Change of the payment status
  • Change of any field of the order and so on

If you use the above-mentioned conditions in one trigger, it won’t be executed as you expect.

Information for users who upgraded from version 7 to version 8

In version 8.0, the process of delivery registration has changed, which means changes in the work of previously created triggers.

In version 7.0., triggers reacted to the change of the order status. When the order status changed, the order already contained the track number which afterwards was transferred via email or SMS messages. But now previously created triggers don’t transfer information about the track number because the email and SMS messages they send are empty.

To fix this, your old triggers need to be edited. For example, if, in the trigger conditions, the order status transition is checked:

changeSet.hasChangedField("status") and changeSet.getNewValue("status").getCode() == "send-to-delivery"

We recommend replacing this condition with a check for the appearance of tracking number in the order:

changeSet.hasChangedField("integration_delivery_data.track_number") and order.integrationDeliveryData.trackNumber != null

If you encounter difficulties or questions when making changes to triggers, please contact the technical support team via email support@retailcrm.pro.

Thank you for your feedback.
Was this article helpful?
No
  • The recommendations did not help
  • There is no answer to my question
  • The text is difficult to understand
  • I do not like the described functionality
Yes
Next article
General information about triggers
A trigger in an event-driven tool used to automate various system processes. A trigger is activated when a specified event occurs, checks a set of given conditions and performs actions if the conditions are met.