I’m doing a basic automation with scheduled reminders: I want to send a survey to every one where a certain activity is completed. For the survey I use a nice third party app: surveypal.com. As I want to personalise the survey, I need personal data from civi to surveypal to identify the response.
Surveypal has nice documentation on how to do this. The url send to a potential respondent should look like:
https://my.surveypal.com/app/form/ext?_d=0&_sid=261570634&_k=2kpdVu0Y20GKuXoMnpsCYQ6c43g82T4PWT29J4Kj5TFRIBltoKRMpAng0p
iVLOtX&externalId=[ID]&meta=[{"key":"Gender","value":"Male"},{"key":"Age","value":"15"}]
where sid and k are the id’s of the survey in surveypal, externalID could be the contact_id from civi and the data in meta data could be other civi fields.
Building a message template in civimail, including some tokens for the personal data, this url so becomes:
https://my.surveypal.com/app/form/ext?_d=0&_sid=xxx&_k=xxxxx&externalid=[{contact.contact_id}]&meta=[{"key":"email","value":"{contact.email}"},{"key":"SRdonorcontactid","value":"{contact.contact_id}"},{"key":"firstname","value":"{contact.first_name}"},{"key":"lastname","value":"{contact.last_name}"},{"key":"Aanspreking","value":"{contact.addressee}"}]
When sending manually this message template using an individual email (activity -> send an email). This works perfect. Civi does send an email to the particular contact, and the person gets a nice link, participates the survey in surveypal and I have all the response data I need.
But, when I use this same message template to set a scheduled reminder link to an activity, then the email is send automatically correctly, but the url is changed towards something like &meta:[,,,,,,]
So no personal data is transferred. The potential respondent gets an error message when clicking the url that the url does not exist.
Any idea’s: what happened, what is wrong? I’m afraid it has something to do with the {} used for tokens in civimail, while used to group data in the surveypal-url.