Hello everyone,
we are looking for a way to add dynamic values to links in email templates where those dynamic values are coming from the Odoo database.
E.g. in our case, we want to send out an automatized email to new Contacts we add to Odoo. This email shall contain a link to a survey, e.g. https://my-survey-app.com/survey/abc123?cid=<ODOO_CUSTOMER_ID_HASH>
where the ODOO_CUSTOMER_ID_HASH
is supposed to be a value from this Contact.
In the template text we can use /dynamicplaceholder
to insert dynamic fields. We already managed to display this (Placeholder object.partner_id.cid_hash) and other values in the mail, but we cannot seem to add the dynamic placeholders to the link URL. But we cannot add them in the link customization modal. We also tried to use some kind of syntax like...
https://my-survey-app.com/survey/abc123?cid={{object.partner_id.cid_hash}}
https://my-survey-app.com/survey/abc123?cid=${object.partner_id.cid_hash}
... but none of these worked. Instead, this gets encoded into
https://my-survey-app.com/survey/abc123?cid=%7B%7Bobject.partner_id.cid_hash%7D%7D
https://my-survey-app.com/survey/abc123?cid=%24%7Bobject.partner_id.cid_hash%7D
We really need to add these dynamic values since we require this information to match the submissions from the survey to their according contact in the Odoo Contacts database.
Do you have any idea how we can add this data to links in email templates for Marketing Campaigns?
Any help appreciated. Thanks in advance.
We are using Odoo 18.0+e-20241114 (Enterprise-Edition)
.