Loading

Forwarding data from a Account Engagement Form Post to a third-party

Julkaisupäivä: Sep 30, 2025
Kuvaus
It's easy to forward data from a Account Engagement Form Handler to a third-party URL by enabling data forwarding. Though less straight-forward, this is also possible via Account Engagement forms placed on your site or on Account Engagement Landing Pages that use Layout Templates (unfortunately this is not available for Forms on Account Engagement Landing Pages created using the Landing Page Builder). Note: In order to post foreign/special characters to Salesforce correctly, your form or landing page template must have the meta tag character set declared as:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
Ratkaisu

NOTE: This process involves custom coding and is presented for reference only. Account Engagement Support is unable to assist with the implementation or troubleshooting of the following steps.


Create a New Layout Template

This is a very specialized form that will need a slightly different layout template from your other forms and landing pages. The modification is very minor and will not affect the look and feel of the form or landing page.

1. Navigate to :

  • In Account Engagement Classic, Marketing | Forms | Layout Templates

  • In Account Engagement Lightning, Content | Layout Templates

2. Take your existing form or landing page layout and Copy it. Note: If your form resides on a Account Engagement landing page, make these edits to the landing page layout template. If the form is being iframed onto an external (non-Account Engagement) page, edit the form's layout template.
 

Edit the Layout Template's Form Tab

1. In the Form tab of the layout template, copy the following lines:
%%form-if-thank-you%% 
  %%form-javascript-focus%% 
  %%form-thank-you-content%% 
  %%form-thank-you-code%% 
%%form-end-if-thank-you%%
2. Delete them from the layout and paste them back in somewhere outside of the form tag (either before or after it).
3. Once moved outside of the form tag, your code may start out like the following:
%%form-if-thank-you%% 
%%form-javascript-focus%% 
%%form-thank-you-content%% 
%%form-thank-you-code%% 
%%form-end-if-thank-you%%
<form action="%%form-action-url%%" method="post">
%%form-opening-general-content%% 
%%form-if-display-form%% ...
4. If you need the form to forward to a page outside of the Account Engagement form iframe, you will also want to add target="_blank"' to the form tag in the layout template:
<form accept-charset="UTF-8" method="post" action="%%form-action-url%%" id="pardot-form" target="_blank">
5. Save the Layout Template.


Edit Your Existing Form

1. In Account Engagement Classic, Marketing | Forms or in Account Engagement Lightning App, Content | Forms.
2. Edit your existing form.
3. Go to Step 3: Look and Feel.
4. Select your Layout Template created from the previous step. Note: If you are placing the form on a Account Engagement Landing Page, you will need to edit the landing page and select your new layout template from the steps above there instead of at the form level
5. Go to Step 4: Completion Actions.
6. Click on the Thank You Content Tab, then click the HTML button in the WYSIWYG editor and add code similar to the following:

<blockquote>
<form action="http://www.site.com" method="post" name="hidden_form">
<input type="hidden" name="email" value="%%email{html}%%" />
<input type="hidden" name="company" value="%%company{html}%%" /></form>
</blockquote>
7. Notes:
  • The form's action URL should be replaced with the success location to which you want to send your prospects.
  • You will want to include a value, name, and type for every field you would like to post to the third-party location.
  • The input value would be the same tag that you would use when doing a mail merge. You can find this by clicking on a Prospect Fields in your system and looking at the Field ID.
  • The {html} inside the variable tags serves to HTML escape the content. We recommend using this because if the input contains special HTML characters, it could cut off your form’s data, or cause a submission failure. For example, if a prospect entered I wouldn’t say we’re “ready to buy” yet in a form field, your data would cut off at I wouldn’t say we’re if you didn’t use {html} in your variable tag. You can find out more about HTML escaping your variable tags here.
  • The name value should be the value for the field in the third-party system you're posting to.
  • Custom fields set to 'Record and display multiple responses' cannot be used with this setup, because variable tags are unable to be used for such fields.
8. Click on the Thank You Code Tab and add the following javascript:
<script type="text/javascript">// <![CDATA[
 document.hidden_form.submit();
// ]]>
</script>
9. Save your form.


How to post Account Engagement form data to Salesforce

All of the information above remains the same but you would add one additional line to the Thank You Content for your form to send your OID.
<blockquote>
<form action="https://webto.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8" method="POST" name="hidden_form">
<input type="hidden" name="email" value="%%email{html}%%" />
<input type="hidden" name="company" value="%%company{html}%%" />
<input type="hidden" name="oid" value="your OID" />
<input type="hidden" name="retURL" value="http://www.success.com" />
</form>
</blockquote>
Note that your OID should be replaced with your organization's numeric Salesforce Organization ID. You can obtain your Organization ID value within your Salesforce account by going to Setup > Company Profile (under Administration Setup) > Company Information. The retURLvalue should be replaced with the success location to which you want to send your prospects. You can optionally add a campaign with something like the following:
<input type="hidden" name="Campaign_ID" value="Campaign Value" />
Note that "Campaign Value" should be replaced with Salesforce's numeric value for the campaign value you want to use.
Knowledge-artikkelin numero

000383963

 
Ladataan
Salesforce Help | Article