Aborting Connected Content
Using Liquid templating, you have the option to abort messages with conditional logic.
In the following example, the conditionals connected.recommendations.size < 5
and connected.foo.bar == nil
specify situations that would cause the message to be aborted.
1
2
3
4
{% connected_content https://example.com/webservice.json :save connected %}
{% if connected.recommendations.size < 5 or connected.foo.bar == nil %}
{% abort_message() %}
{% endif %}
You can also specify an abort reason, which will be saved to the Message Activity Log. This abort reason must be a string and cannot contain Liquid.
{% abort_message('Could not get enough recommendations') %}
important:
Braze does not count aborted messages toward the send count in your Braze account or in Currents.
New Stuff!