Salesforce Marketing Cloud Interactive Forms And Its Capabilities
Updated: Aug 4, 2020
As part of March 2020 release, Salesforce Marketing Cloud has introduced a new feature called 'Interactive Form blocks' which can be used in Emails. This feature allows email recipients to input their responses within the mail client itself nullifying the need to visit any other external sites. This will significantly shorten the workflow, leading to an increase in customer engagement.
Once the recipient enters data in the email, the results will be captured in Data Extensions within Marketing Cloud. But wait- there’s more! Read on to learn more about the other benefits of this new feature.
Technical Capabilities Post Submission of Interactive Form:
The submitted data is stored in Data Extensions instantly.
You can send a real time email in response to the customer submitting their data to Marketing Cloud.
Once their data is submitted, you can add this recipient directly into Journey Builder.
You can add/update the same submitted record in Salesforce.
Interested?! To get started, we first need to understand how the Interactive Form works. So, let's get started.
If at any point of time if you get stuck, there is a module on Trailhead for Interactive Email Content.
I have outlined the below steps at a very high level. Our focus would be achieving other capabilities in Interactive Forms.
Step 1: Create a Cloud Page with the 'Interactive Email Page' Type:
Go to Web Studio > Cloud Pages > Create > Interactive Email Page
Give a Name for the Cloud Page and click on 'Create'
Click on the Email Form. Select the option most suitable for your use case.
Make sure you publish this page.
Step 2: Add the Interactive Block in Template Based Emails
Go to Content Builder > Click on Create template based email.
Drag & Drop the Email Form from the Interactive Content section.
You can start from scratch, or start with a predefined template. For this example, I have choose a Rating template.
In the section 'Cloud Page Destination', select the cloud page we published in the previous step.
In the 'Response Capture' section, you can select an existing Data Extension or choose to create a new one. This is where your captured responses will be stored.
Map all the form fields to their corresponding Marketing Cloud fields. In the below screenshot you can see that I have mapped the %%_subscriberKey%%. If the Subscriber Key in the sendable Data Extension is Contact ID, then in Data Extensions it will be stored as Contact ID via the hidden field.
Step 3: Set up Fallback content
It’s important to note that Interactive email forms will not work on all the email clients. For example, in Outlook the form render. In that case you would need to set up a fallback content.
A good idea would be to set this content block as ‘none’ or use a content block with an action button linked to a cloud page.
To do this, go to the ‘Design’ tab within the interactive form and select your content block or set it as none.
Step 4 : Send an Email and submit the response
When you send this email from Marketing Cloud and the recipient enters their response within their inbox, the data gets added into the Data Extension. You will then be navigated to a Cloud Page (or external URL), depending upon the setting you choose in Cloud Page.
Testing Interactive Forms in all Email Clients:
You can use litmus to test your Interactive Form and its performance in different email clients.
Here is the link which has been used to test the review form - Litmus Test Review Form Link.
You can see that in all of the Outlook versions it is not rendering.
In Gmail it doesn't support some CSS attributes that were used to build the Interactive Forms. You can find more information on Salesforce help on Interactive form.
As a workaround, you can add the radio buttons in vertical alignment instead of horizontal.
How Interactive Form is Working Behind the Scene:
Interactive email forms use existing Marketing Cloud infrastructure and encryption. Which means that it uses AMPscript to add the records into the Data Extension.
If you go to the Email and view it in Code view, you can find something like this:
%%[ VAR @CPID, @deExtKey, @encodedDeExtKey, @CPURL, @qsStart, @qsValueStart, @qsValue, @unmappedFields SET @CPID = "241" SET @deExtKey = "A48A2C8F-8B97-4408-B156-81CA0EF01836" IF (@CPID == "undefined") AND (@deExtKey == "undefined") THEN RaiseError("Please select a CloudPage and Data Extension and assign all fields to data attributes on the Interactive Email Form Block.") ELSEIF (@CPID == "undefined") THEN RaiseError("Please select a CloudPage on the Interactive Email Form Block.") ELSEIF (@deExtKey == "undefined") THEN RaiseError("Please select a Data Extension and assign all fields to data attributes on the Interactive Email Form Block.") ENDIF SET @encodedDeExtKey = URLEncode(@deExtKey,1,1) SET @CPURL = CloudPagesURL(@CPID,"ic_deN",@encodedDeExtKey) SET @qsStart = IndexOf(@CPURL,"?") SET @qsValueStart = Add(@qsStart, 4) SET @qsValue = Substring(@CPURL, @qsValueStart) ]%%
Let's Debug the Interactive Form:
@CPID - Is the Cloud Page ID , which we have published initially.
@deExtKey - Is the external key of the Data Extension in which we need to store the records.
RaiseError function is used to suppress or cancel the email send when unexpected errors occur. In this case, this error will occur when no Cloud Page or Data Extension is added to the Interactive Form.
URLencode function is used to the encode the string values with as same as application/x-www-form-urlencoded media type.
CloudPagesURL function will link to a Cloud Page with encrypted values. The major benefit of using the Cloud Page URL is that you can access this via personalization strings from Marketing Cloud. In the case of an Interactive Form, this function is used to redirect it to a Cloud Page with encrypted parameters of email.
Here is where the fun begins. You can get the subscriber key , email address and other personalization strings from the encrypted URL.
Send a Real Time Email Once a Customer submits the Interactive email form:
Remember the Cloud Page you have published initially? In that Cloud Page, you can actually add an AMPscript to get the subscriber key and email address like below.
%%[ Set @subscriberkey = [_subscriberkey] Set @emailaddr = [_emailaddr] ]%%
You know which Data Extension your values are stored in or any other data extensions in which all the fields are present. You can use Lookup Rows function to fetch the other fields.
You can use my previous post on How to Send a real time email using Triggered Sends.
Add the Subscriber to the Journey Builder:
Once the user submits the form you can use the above instructions to fetch the subscriberkey and add them into the Journey Builder via Fire entry event API.
Check out a nice blog written by Zuzanna on adding a subscriber to a journey using Fire entry event.
Add/Update Salesforce Objects:
Similarly, you can use Server Side Java Scripts (SSJS) or any other AMPscript functions in the same Cloud Page once you retrieve the subscriber key. The logic is still the same.
Please feel free to comment your thoughts/queries.
Happy Learning ! Share the Salesforce!