Adding Zingtree Session Data to Salesforce Forms

  • Updated
  • 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>



  • 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>

     

  • Throughout 2022 Zingtree will be upgrading customers to our new faster and more modern user experience! Here's how to tell which experience your Zingtree Authors are currently using.

    Log in to your Zingtree Author account and navigate to My Trees. How does your current My Trees page look?

    Zingtree Classic

    2022-02-25_12-24-51.png

    New User Experience

    mceclip0.png

Was this article helpful?

0 out of 1 found this helpful

Have more questions? Submit a request