Wondering about my requirement and how to proceed.
- First landing page which contains just an email text field,a submit button and a link. The customer-care person enter email to check if the subscriber exist in DE (based on email). And also a direct link to create new subscriber in DE under it.
- Next, both button and link leads to same new landing page where there is a subscriber form with pre-filled subscriber data to be updated if the email exist in DE, or an empty subscriber form to create a new subscriber in DE if the email doesn't exist in DE
Is there a standard approach for this?
Attribution to: Jack85
Possible Suggestion/Solution #1
What you're describing is a very common use case. Here is what I would recommend.
On landing page 1: just POST the page to the landing page 2 on submit. You will get the posted value on landing page 2.
On LP2, have a ampscript block at the top of the page to do a look up on your DE. You would then initialize some AMPscript variables to the column values associated with the email address passed in (if the lookup returns anything). You would use AMPscript function RequestParameter to get the POSTed email address.
On your HTML on LP2, for the fields you wish to populate, put in the AMPscript variables from above. If they didn't get initialized, its OK, nothing will be put in. Like input name='DummyData' id='DummyData' value='%%=v(@value1)=%%' . This handles both an insert case and an update case
On submit for LP2, I would post to a PROCESSING page, that consists of nothing but an AMPscript block. Use RequestParameter to get all the values, and use UpsertData to push the data to the DE. It covers both the insert and update case. The last line of the processing page, use function Redirect to send you to the desired URL, like a confirmation page.
Attribution to: Timothy
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/32758