I have created a sign up cloud page in marketing cloud and I want that page to be embedded in some other website. I know there are options like iFrame or DEmanager but iFrame are not that good for mobile devices and I want the data to be stored directly into salesforce not in any DE so DEmanager is also not an option. So is there any way to do that? I was also thinking to create a Lightning component and use Lightning Out to use it externally but it is also causing some problem. So is there any solution to achieve this or maybe any workaround for that?
1 Answer
I would advise you to a confirmation page as a Cloud Page, which accepts submitted values from a form you create natively on your landing page. This will use CreateSalesforceObject to upsert data and RequestParameter to fetch your submitted values:
%%[
var @email, @firstName, @lastName, @SFRecord
set @firstName = RequestParameter('firstName')
set @lastName = RequestParameter('lastName')
set @email = RequestParameter('email')
set @SFRecord = CreateSalesforceObject(
'Account', 3,
'FirstName', @firstName,
'LastName', @lastName,
'Email', @email)
]%%
Alternatively, you could create a JSON code resource with more or less similar code, allowing you to perform the POST using AJAX, keeping your visitor on your native website instead of redirecting to Cloud Pages.
-
Yeah..but what I want is that the signup form should be made from marketing cloud or salesforce that should be embedded externally. Commented Oct 23, 2019 at 10:10
-
May I ask why, @AnkurNigam? Do you have any logic in the cloud page form? I would normally just place the processing of the data on SFMC, and not the form itself. Commented Oct 23, 2019 at 10:12
-
Yeah I also do the same but the thing is here the team that handles the website is different and in the signup form there is block that is dynamic and that needs to be modified often. So for doing this we need to be depended on that team and will take time thus I wanted to make this page in marketing cloud or salesforce only so that we can make changes by ourselves only Commented Oct 23, 2019 at 10:40
-
That probably brings us back again to an iframe, hosted as a cloud page in sfmc. Like Lukas said tho, you can write data directly into salescloud using the function above.– DonLCommented Oct 23, 2019 at 11:26