Expand my Community achievements bar.

We are excited to introduce our latest innovation to enhance the Adobe Campaign user experience — the Adobe Campaign v8 Web User Interface!
SOLVED

Trying to get "if you are not <email address>, click here" to remove preloading

Avatar

Level 4

Hi All,

We are working on trying to simplify how we reduce the effect of recipients forwarding emails with preloaded webApp links.

The basic "click here if you are not johnsmith@smith.com" message.

Currently we use 2 identical webapps....one with a link as below, that then links to another identical webApp that is not preloaded.

If you are not <%= ctx.vars.recipient.@email %> <a href="http://m.communications.waters.com/webApp/APP1924"> click here </A>

Ideally, we would like one webApp, and have a container with visibility set by whether or not the email was already preloaded.

We tried by setting visibility by @email is not empty, which almost works....but as soon as you fill in the email field and move to the next, the container shows.

So, there must be a way to set the visibility only if the form was preloaded.

You can see the problem at this link....type anything into the email field then move to another field...you will see the 'If you are not...." container show.

http://m.communications.waters.com/webApp/testingPreload

Is there anyway that this can be addressed? Note that I am not a developer...and right now don't really have easy access to an FED, alas.

Any help is greatly appreciated!!

1 Accepted Solution

Avatar

Correct answer by
Employee

Hello,

it seems that you are working on incomingLead not recipient. So, for option 1, instead [recipient/@id], can you try [incomingLead/@recipient-id]

Regards,

Damien

View solution in original post

17 Replies

Avatar

Level 10

Hi,

There are 3 ways of doing it:

  • Try setting the visibility on the @id field rather than on the @email field. As the ID is not used in the form, that should prevent the conditional content from displaying when not wanted.

 

  • Another approach is by making the test not in the page but in a Test activity, and then use 2 different pages, one if the test on the email is true, with the additional content always displayed. And a second page for when the test is false, not containing the additional content. Like this:

 

  • A last approach would be to declare a variable in the web application properties and to perform the test here again from a Test activity, and another test in the page:
    1. Declare a variable in the web application properties with a default value of 0. For example preloading:
    2. Define a Test activity to test whether the email is empty. 
    3. On the "False" branch of the test, add a Script activity to change the value of the preloading variable: 
    4. Set visibility of your additional content by testing the preloading variable value.

 

Let me know how it goes or if you have additional questions.

Hope this helps,

Florent

Avatar

Level 10

Hi,

There are 3 ways of doing it:

  • Try setting the visibility on the @id field rather than on the @email field. As the ID is not used in the form, that should prevent the conditional content from displaying when not wanted.

 

  • Another approach is by making the test not in the page but in a Test activity, and then use 2 different pages, one if the test on the email is true, with the additional content always displayed. And a second page for when the test is false, not containing the additional content. Like this:

 

  • A last approach would be to declare a variable in the web application properties and to perform the test here again from a Test activity, and another test in the page:
    1. Declare a variable in the web application properties with a default value of 0. For example preloading:
    2. Define a Test activity to test whether the email is empty. 
    3. On the "False" branch of the test, add a Script activity to change the value of the preloading variable: 
    4. Set visibility of your additional content by testing the preloading variable value.

 

Let me know how it goes or if you have additional questions.

Hope this helps,

Florent

Avatar

Level 4

Hello Florent,

Thank you so much for your reply and suggestions!

Here's what I tried:

Option 1 does not seem available to me, as the id is not available to me when I make the visibility condition:

Option 2 is kind of what we are doing now...ideally want to move away from have 2 separate webApps, because of the authoring and data management bandwidth...2 webapps makes my authors unhappy.

 

Option 3 seems the best...but when I attempt to preload, I get the error (from the debug mode in the webapp) below....I tried various combinations of enclosing the default value with and without quotes, etc....

Any more ideas?

Also, what version of Campaign are you using? Looks more modern than 6.11  :-)

ReferenceError: ct is not defined
{anonymous}("script")@_webApp_testingPreload__preview:463
{anonymous}()@/nl/core/formbase.js:373
_webApp_testingPreload__preview([object HttpServletRequest],[object HttpServletResponse])@_webApp_testingPreload__preview:819
<ctx _console="1" lang="en" score="0" date="2017-01-26T01:59:23Z" _target="web" webApp-id="679758702" origin="neolane" _folderModel="crmIncomingLead" deliveryId="0">
  <userInfo datakitInDatabase="true" homeDir="" instanceLocale="en-US" locale="en-US" login="webapp" loginCS="Web applications agent (webapp)" loginId="3289" noConsoleCnx="true" orgUnitId="0" theme="" timezone="America/New_York" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="urn:xtk:session" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <login-right right="admin"/>
  </userInfo>
  <timezone current="America/New_York" changed="false"/>
  <vars>
    <pageTitle>Titre de la page</pageTitle>
    <preloaded>0</preloaded>
    <recipient email="eugene_goffredo@waters.com" firstName="Eugene" id="672929721" lastName="Goffredo">
      <rawData companyRaw="Waters Corporations"/>
    </recipient>
  </vars>
  <incomingLead email="eugene_goffredo@waters.com" firstName="Eugene" recipient-id="672929721" lastName="Goffredo" _operation="insert" delivery-id="0">
    <rawData companyRaw="Waters Corporations"/>
  </incomingLead>
  <activityHistory>
    <activity name="test"/>
    <activity name="prefill"/>
  </activityHistory>
</ctx>

Avatar

Level 4

Hello Florent,

Thank you so much for your reply and suggestions!

Here's what I tried:

Option 1 does not seem available to me, as the id is not available to me when I make the visibility condition:

Option 2 is kind of what we are doing now...ideally want to move away from have 2 separate webApps, because of the authoring and data management bandwidth...2 webapps makes my authors unhappy.

 

Option 3 seems the best...but when I attempt to preload, I get the error (from the debug mode in the webapp) below....I tried various combinations of enclosing the default value with and without quotes, etc....

Any more ideas?

Also, what version of Campaign are you using? Looks more modern than 6.11  :-)

ReferenceError: ct is not defined
{anonymous}("script")@_webApp_testingPreload__preview:463
{anonymous}()@/nl/core/formbase.js:373
_webApp_testingPreload__preview([object HttpServletRequest],[object HttpServletResponse])@_webApp_testingPreload__preview:819
<ctx _console="1" lang="en" score="0" date="2017-01-26T01:59:23Z" _target="web" webApp-id="679758702" origin="neolane" _folderModel="crmIncomingLead" deliveryId="0">
  <userInfo datakitInDatabase="true" homeDir="" instanceLocale="en-US" locale="en-US" login="webapp" loginCS="Web applications agent (webapp)" loginId="3289" noConsoleCnx="true" orgUnitId="0" theme="" timezone="America/New_York" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="urn:xtk:session" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <login-right right="admin"/>
  </userInfo>
  <timezone current="America/New_York" changed="false"/>
  <vars>
    <pageTitle>Titre de la page</pageTitle>
    <preloaded>0</preloaded>
    <recipient email="eugene_goffredo@waters.com" firstName="Eugene" id="672929721" lastName="Goffredo">
      <rawData companyRaw="Waters Corporations"/>
    </recipient>
  </vars>
  <incomingLead email="eugene_goffredo@waters.com" firstName="Eugene" recipient-id="672929721" lastName="Goffredo" _operation="insert" delivery-id="0">
    <rawData companyRaw="Waters Corporations"/>
  </incomingLead>
  <activityHistory>
    <activity name="test"/>
    <activity name="prefill"/>
  </activityHistory>
</ctx>

Avatar

Level 10

Hello,

Ok let's focus on #1 and #3 then.

  • About #1. Yes, I forgot to mention but there is a little trick there. To use @id you need to enter it directly as it won't be visible. This is the easiest way I see. 

  • About #3. "ct is not defined": are you sure there is no typo such as "ct" instead of "ctx" in the script? Also, variable value should be surrounded by quotes only in the script activity, and not in the properties nor the visibility condition.

Let me know how it goes.

 

Edit: This is not entirely 6.1.1 indeed but web applications are the same here. Consider it an exclusive preview :) Stay tuned!

Florent.

Avatar

Level 10

Hello,

Ok let's focus on #1 and #3 then.

  • About #1. Yes, I forgot to mention but there is a little trick there. To use @id you need to enter it directly as it won't be visible. This is the easiest way I see. 

  • About #3. "ct is not defined": are you sure there is no typo such as "ct" instead of "ctx" in the script? Also, variable value should be surrounded by quotes only in the script activity, and not in the properties nor the visibility condition.

Let me know how it goes.

 

Edit: This is not entirely 6.1.1 indeed but web applications are the same here. Consider it an exclusive preview :) Stay tuned!

Florent.

Avatar

Level 4

Hello Florent,

Thank you again for your kind response...but alas, still is not working as expected.

For option 1:
http://m.communications.waters.com/webApp/testingPreloadNewUsingID?id=@ORHlQ/cqCcejRNfGGnTEUQ

I've manually referenced the recipient ID exactly as showing in your example...here's what is in mine:

It does not work...if you refresh the view...you can see the link display sometimes...but then it disappears.

 

For option 3, I created a new webapp just to make sure everything was fresh:
http://m.communications.waters.com/webApp/testingPreloadNewUsingScript?id=@EsybBL7FNMk6/zdWNJF3tQ

I no longer get the error, but it still does not work.

Here's the variable definition:

Here's the check if email exists activity:

Here's the script to set the preloading variable to '1' if email exists

And finally the testing on whether to show the div with the link:

For reference, here's the preloading activity at the start of the webApp workflow...is there something I need to change here?

Thank you again for your help!!

Regards,

Eugene
 

Avatar

Level 4

Hello Florent,

Thank you again for your kind response...but alas, still is not working as expected.

For option 1:
http://m.communications.waters.com/webApp/testingPreloadNewUsingID?id=@ORHlQ/cqCcejRNfGGnTEUQ

I've manually referenced the recipient ID exactly as showing in your example...here's what is in mine:

It does not work...if you refresh the view...you can see the link display sometimes...but then it disappears.

 

For option 3, I created a new webapp just to make sure everything was fresh:
http://m.communications.waters.com/webApp/testingPreloadNewUsingScript?id=@EsybBL7FNMk6/zdWNJF3tQ

I no longer get the error, but it still does not work.

Here's the variable definition:

Here's the check if email exists activity:

Here's the script to set the preloading variable to '1' if email exists

And finally the testing on whether to show the div with the link:

For reference, here's the preloading activity at the start of the webApp workflow...is there something I need to change here?

Thank you again for your help!!

Regards,

Eugene
 

Avatar

Level 10

I think that should have worked as that is exactly what we tested back here from a fresh web app.

Can you check the build number of your server and console from the Help menu?

Florent.

Avatar

Level 10

I think that should have worked as that is exactly what we tested back here from a fresh web app.

Can you check the build number of your server and console from the Help menu?

Florent.

Avatar

Level 4

Hello Florent,

Were are on build 8705 of 6.1.1

We are finishing an integration in the next few weeks....and plan to address updating to the newest build in Feb or March at the latest.

If you think that is the issue, I can go down the two webApp or two landing pages in a webApp for now...

Thanks,

Eugene

Avatar

Level 4

Hello Florent,

Were are on build 8705 of 6.1.1

We are finishing an integration in the next few weeks....and plan to address updating to the newest build in Feb or March at the latest.

If you think that is the issue, I can go down the two webApp or two landing pages in a webApp for now...

Thanks,

Eugene

Avatar

Employee

Hello,

it seems that you are working on incomingLead not recipient. So, for option 1, instead [recipient/@id], can you try [incomingLead/@recipient-id]

Regards,

Damien

Avatar

Correct answer by
Employee

Hello,

it seems that you are working on incomingLead not recipient. So, for option 1, instead [recipient/@id], can you try [incomingLead/@recipient-id]

Regards,

Damien

Avatar

Level 4

Hello Damien and Florent,

The [incomingLead/@recipient-id] worked PERFECTLY!

I guess another learning when asking questions is that we use Campaign 6.1.1 with Leads  :-)

Truly thank you again!

Avatar

Level 4

Hello Damien and Florent,

The [incomingLead/@recipient-id] worked PERFECTLY!

I guess another learning when asking questions is that we use Campaign 6.1.1 with Leads  :-)

Truly thank you again!