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:
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 firstname.lastname@example.org.