added loop email tokens for CustomObjectsBundle which helps to send e…#382
Open
Ravi-topchunks wants to merge 4 commits intoacquia:5.xfrom
Open
added loop email tokens for CustomObjectsBundle which helps to send e…#382Ravi-topchunks wants to merge 4 commits intoacquia:5.xfrom
Ravi-topchunks wants to merge 4 commits intoacquia:5.xfrom
Conversation
…mails with the list of custom items from an Object
Author
|
this PR contains email tokens which provides loop tokens this helps to add top products into the email with LIMIT. Please have a look at emailtokens.md |
escopecz
reviewed
Mar 13, 2026
escopecz
reviewed
Mar 16, 2026
Contributor
escopecz
left a comment
There was a problem hiding this comment.
I think I'm commenting on the same things as our CI will. I let it run first.
escopecz
requested changes
Mar 31, 2026
Contributor
escopecz
left a comment
There was a problem hiding this comment.
Can you please also provide functional tests for this feature? You can reuse these instructions for your AI agent:
https://github.com/mautic/mautic/blob/7.x/.github/prompts/write-test.prompt.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…mails with the list of custom items from an Object
Description:
DOCS
Custom object loop tokens
Custom items can be rendered in emails (or other content) using loop tokens.
Basic syntax
{custom-object-loop ...}: Opens the loop and defines which custom items to load.{/custom-object-loop}: Closes the loop. Everything between the opening and closing tags is repeated for each matching custom item.Loop parameters (
custom-object-loop)product-views). Required.segment-filteris implemented so far (and it is the default if omitted).WHEREconditions.latestis supported (and is the default if omitted).1if not provided.1, multiple items are rendered.Loop-value parameters (
custom-object-loop-value)objectused in the surroundingcustom-object-loop. If it does not match, it is ignored.name,price,color).default=Unknown).Examples
List product names bought by the contact:
Rendered example:
Render a small HTML block per product:
{custom-object-loop object=product-views | where=segment-filter | order=latest | limit=2} <div class="product"> <strong>{custom-object-loop-value object=product-views | field=name | default=Unknown}</strong><br> Price: {custom-object-loop-value object=product-views | field=price | default=0}<br> Color: {custom-object-loop-value object=product-views | field=color | default=Unknown} </div> {/custom-object-loop}Rendered HTML (for 2 products):
Warnings and limitations
ORconditions in the source segments for custom object filters.Steps to test this PR: