1

We link to a customer profile center like this:

SET @clientkey = [Id]
SET @clientkeyencoded = URLencode(@clientkey,1,1)
SET @URLprofile = 
Concat("https://vf_page_name.secure.force.com/profile?source=marketing_mailing&id=",@clientkeyencoded)

and then insert the link:

href="%%=redirectto(@URLprofile)=%%"

Under certain circumstances, the VF page should forward to the web version of a newsletter after saving / updating data. To be able to do so, I wanted to pass the system-generated VAWP link in the background, so the VF page knows where to forward when the source equals "marketing_mailing". I tried to amend the standard view_email_url like this:

source=marketing_mailing&id=",@clientkeyencoded,view_email_url)

but this doesn't work.

Do I have to amend it in the redirectto somehow?

Any idea is highly appreciated.

2
  • Which part is not working? Are you not able to pass encoded customer id to the customer profile center? Commented Aug 16, 2018 at 9:31
  • Hi Selim, it is about the view_email_url, as described, how to add this to the URL so the VF page then receives profile?source=marketing_mailing&id=1234567890ABCDEF&VAWP_url How I have to add the view_email_url to the whole string so it gets passed through properly. If I do it like described, the email is not being sent to due error without any further information. Commented Aug 16, 2018 at 11:22

1 Answer 1

0

Not an ideal way, but you can use this link in your email:

SET @a = view_email_url
SET @b = Substring(@a,9,600) // you should remove the first part to not make it seem like an url "https://" part.
SET @URLprofile = 
Concat("https://vf_page_name.secure.force.com/profile?source=marketing_mailing&id=",@clientkeyencoded, "&VAWP_url=", @b)

You should also consider "?" part in your view online URL, you may replace with with & with Replace() function.

8
  • Thanks, will try this! What do you mean by "remove first part not to make it seem like a url / https:// part"? And what do you mean by "consider ? part in your url" — the only "?" in the beginning works just fine this way. For me, I would not need "&VAWP_url=" as a parameter definition, it was just a dummy for the url, so I want to add that URL with & only. Should this work then with a ", @b" at the end? Commented Aug 17, 2018 at 7:49
  • To avoid http in http, you might use that function. Otherwise, your final URL will have something like "WAMP_url=http" Commented Aug 17, 2018 at 7:51
  • So, I got it to work — mostly. Problem is, the view_email_url is being changed from view.mc.url.com/?qs=af3... to view.mc.url.com/&qs=af3... automatically in the process, thus the link will not usable then. I guess you referred to this by You should also consider "?" part in your view online URL, you may replace with with & with Replace() function. How do I have to implement this Replace()? On the VF page then? Thanks for your help, again! Commented Aug 21, 2018 at 8:31
  • You can use something like that: Replace(@a,'&,'?') Commented Aug 21, 2018 at 10:33
  • Where exactly do I have to use this? In the SET @b? In the parameter itself? Commented Aug 21, 2018 at 13:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .