Forum Discussion
Detect channel in Content block (push vs email)
Hi,
There isn’t a direct method to detect the delivery channel from within a shared content block.
However, a practical workaround is to follow a naming convention for the message step that includes the channel (e.g., "Welcome Email", "Promo Push", etc.).
You can then retrieve the message step name inside the content block using below personalization snippets.
{{campaign.${name}}}
{{campaign.${message_name}}}
Based on this name, you can implement conditional logic to tailor the content accordingly.
Once deployed, the shared content block automatically adapts its behavior depending on the delivery channel of the message it's embedded in, as long as your logic is set up based on the naming pattern.
Check "Canvas Step Attributes" on https://www.braze.com/docs/user_guide/personalization_and_dynamic_content/liquid/supported_personalization_tags/#summary-of-supported-tags
Related Content
- 5 months ago
- 2 years ago
- 9 months ago