0

I'm very much stuck on how to approach this, so any guidance would be greatly appreciated!

Background A client wants to build a simple cloudpage from which entities will fill in their details, and submit this data into SFMC. One of the fields that needs to be submitted is policy_number.

Despite this field already existing in SFMC, entities need to manually submit this via the cloudpage because they are not being sent to the form via email - so I can't do a Lookup. This is not ideal, and I'm tempted to challenge the client on this.

Problem Once the entity has submitted this data, I need to check that the policy_number they input matches what we have in SFMC. If it doesn't, it should be overwritten with the correct policy_number. This is essential as the entity may input the wrong number.

How can I do this? I believe that if the entities were sent the cloudpage via email, I can simply pass through their details with ampscript, and do a lookup to validate their information.

3
  • How does the recipient have the Cloudpage URL?
    – Duc Le
    Commented Sep 22, 2023 at 10:15
  • It will be posted on an internal webpage. Commented Sep 22, 2023 at 10:19
  • 1
    How can you identify the relationship between the correct policy_number and the entity? Commented Sep 22, 2023 at 11:22

1 Answer 1

0

I would suggest you create an additional handler page (also a Cloudpage) to check and progress data.

In the main Cloudpage: put handler page URL in the "form action" with the POST method so it can wrap the form response and send it to the handler page.

In the handler page:

  1. RequestParameter to get all the field values including the policy_number field.
  2. Use 1 or multiple fields you get from step 1 as the identifiers for the lookup to your stored DE for the policy_number value.

E.g.

%%[
set @policy_number = Lookup("Your policy DE","policy_number","EmailAddress", @Email, "FirstName", @fName)
]%%
  1. Do the next thing you want to do after that. E.g. upsert to an DE
2
  • 1
    Unless you are passing additional parameters to the processing page (handler page) then you don't need to use CloudPagesURL as the form POST would properly secure the responses. I mention this because at times I have seen issues with form posts when using CloudPagesURL where the fields do not come through, or come through with unexpected results. Commented Sep 22, 2023 at 19:27
  • 1
    @Gortonington Ahh you are right; there is no need to use CloudPagesURL. Specifying the POST method in the form is a better choice. I was afraid that data would be showed in URL so I used this function. Thank you for your insights!
    – Duc Le
    Commented Sep 23, 2023 at 1:18

You must log in to answer this question.

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