Adding Zingtree Session Data to Salesforce Forms

z-salesforce

As we are making Zingtree more connected to the rest of the world, our valued customers have been asking us how to import the results of a Zingtree session into Salesforce.

With just a little JavaScript magic, you can now add Zingtree data invisibly into your custom “Create Lead” forms.

Here’s what you’ll need to do:

  • Create a new custom field in Salesforce. It should be a “Text Area Long” – we like to call it “Zingtree Session Data,” but you can call it whatever you like.
  • In your “new case” form, make sure this field is a part of the data entered in the “new case” form.
  • Go to Setup, and search for “Web-to-case.” Generate the HTML, and note the id= value of the Zingtree Session Data field in the form.
  • At the bottom of the page that contains the form, just above the </body> tag, add this line of code, substituting the id of the form field which will receive the Zingtree data for “######” :

<script
id="zingtree_field_id"
value="######"
src="http://zingtree.com/api/add-session-data-to-form.js">
</script>

  • When loading this form from a Zingtree URL Link Node, make sure to add this code to the URL which opens the form:

?session_id=#session#

This setup will load the Zingtree session data into the field you designated for Zingtree data, and then hide the field so it’s not seen by your end-users.

You can see an example page that contains a crude Salesforce form here. When you view the source, you’ll see a text area field with id=”00N61000006Bdlq“, and this code at the bottom of the page:

<script
id="zingtree_field_id"
value="00N61000006Bdlq"
src="http://zingtree.com/api/add-session-data-to-form.js">
</script>

Any more questions? View more of our Zingtree How-To’s on the blog, or contact our support staff

1 Trackback

Leave a Reply

Your email address will not be published. Required fields are marked *