Add pipe text reference as a button in HTML email code | XM Community
Skip to main content
Hello,

I am trying to build an email using HTML as a source. In the email I would like to have a button with text "Survey Link" which in reality is a pipe text.(e.g. ${l://SurveyLink?d=Survey Link}.



When i try to wrap the pipe text as text into a ref, I noticed that when sending the email the pipe text removed some of my html and replaces for its own, meaning that I am unable to use it as the text content of a button, or even overlay an image (the button) with the pipe text.



Any ideas?
Any ideas, please?
It's hard to pinpoint your problem. Please consider attaching a .qsf of your [minimal, reproducible example ] (https://stackoverflow.com/help/minimal-reproducible-example) for the future - especially when there is code involved; it will allow help to come quicker.



As for your present conundrum, here's some sample html I used to create a button in an email. Feel free to customize as much as you'd like. The trick is to use just the SURVEY URL piped text (${l://SurveyURL}) in the href property.



Attaching the code in word as I cant get the silly markdown to work properly..............
> @npetrov937 said:

> It's hard to pinpoint your problem. Please consider attaching a .qsf of your [minimal, reproducible example ] (https://stackoverflow.com/help/minimal-reproducible-example) for the future - especially when there is code involved; it will allow help to come quicker.

>

> As for your present conundrum, here's some sample html I used to create a button in an email. Feel free to customize as much as you'd like. The trick is to use just the SURVEY URL piped text (${l://SurveyURL}) in the href property.

>

> Attaching the code in word as I cant get the silly markdown to work properly..............



Hello,

this worked like a charm. I was reading the pipe text support documentation but could not find any indications. Are you aware of any instructions on how to best practice when using these pipe text?



I suppose this could be a question to support but there is one thing bothering me.

When i use pipe text, it should link to the survey where I am using the pipe text references on. Nevertheless in _Distribute Survey Task_, under Survey "Actions", I get to say which survey I am distributing.

If in the message I use pipe text like:

${l://SurveyURL} : This will pick up the survey link for the survey I specified in the task (image below),

nevertheless, if I use other pipe text like ${q://QID6/ChoiceTextEntryValue}​​​​​​​, then this will pick up questions from the survey I am on and not from the survey I specified in the task. So I can see some logic being build being the use of pipe text in this Distribute Survey Task no??



!
Glad this worked.



I don't think there is any specific guidance in using piped text in html/css/js. For me it has mostly been trial and error.



On your follow-up question: I am not sure why you would want to pipe text from the survey you are about to distribute - respondants wouldn't have the data there already. If you want to prepopulate these fields, consider using embedded data.
The reason why I want to do this is because I am trying to distribute a survey through another survey. E.g. Survey1 has "form" requesting for user to input and email. This email will receive the link to a survey. This survey is survey2. I can do that through the Distribution Survey Task. But I wanted to go an extra step and instead of sharing a survey link to survey 2, I would embed the first question of the survey2 which when respond from the email would take the user to the survey flow.



There is another community post identical, which I am testing.

https://www.qualtrics.com/community/discussion/3585/adding-inline-email-question-to-a-distribute-survey-task-in-actions#latest

Leave a Reply