Home / Integrations / Salesforce / Contact form data inside Salesforce
Contact form data inside salesforce

Contact form data inside Salesforce

Continuing on from the first part of how to get your form submission data into a Salesforce custom object we will further explore how you can use this contact form data inside Salesforce to better help your organisation make informed business decisions based on the data.

Implementation time: 2 hours

Count of form submissions

How it is useful

This might sound basic, but there are times when you might want to see exactly how many forms each Lead/Contact submitted a form. If you’re running a website that has many different forms, often you will see the same Lead/Contact submitting multiple forms before finally converting.

Once the data is computed, you can then run standard Salesforce reports to calculate averages of how many times your segmented users submit forms before converting.

How to implement

For this we will use a free Salesforce app called Declarative Lookup Rollup Summaries Tool. This tool is required as there is no master-detail relationship between the two objects allowing us to create a roll up summary field.

I will not going into details about how to use this tool as it’s already well documented. Below will be a screenshot example which can be used as a guide.

  1. Create a new Number field on your Lead/Contact called Total Form Submissions (api name “Total_Form_Submissions__c”).
  2. Open the Declarative lookup rollup summaries tool and create a new rollup. In our case we are filtering based on the RecordTypeID. If you are only use a single record type for your form submissions you can leave this field blank.
  3. Save and deploy the trigger for Declarative lookup rollup summaries to work on your custom object.
  4. To update existing records you should click the “Calculate” button to calculate the job.

If everything is working you should be able to open a contact that has related form submissions and see the count.

Contact form data inside salesforce

Contact form data inside salesforce

Last form submission date

How it is useful

If you’re a large organisation with a lot of leads coming in every day, then you want to know when the last time was someone submitted a form. The problem is generally the created date of a contact. While you can sort leads by who was created first, with the last form submission date you can filter different list views to see if any of your old leads have re-surfaced to submit another form.

For example: Customer A’s first touch point is when he starts a trial of your software. Nothing happens to this customer for 12+ months and then he comes back to request an eBook on your website. After requesting the eBook, his last touch point is TODAY, boosting him right to the top of your list of hot leads. Time to call this customer and close the deal!

Example below shows a few variables which we use to see when a lead last touched our website or submitted a form.

salesforce last form submission

How to implement

To implement this we will be using a combination of Salesforce Process Builder and a headless Flow to pull the last form submission time each time a new Online Actions record is created.

NOTE: this part is used in conjunction with declarative lookup rollup summaries above – each time the record is modified to reflect a new ‘total form submission count’ process builder will run the flow.

NOTE: You can do this with process builder only if you desire. When a form submission is created, simply run a flow to update your newly created field. This can have some bugs if you modify records which are older as it’s not checking all form submissions, only the last one which was created.

Create the Contact/Lead field

  1. Create a new DateTime field on your Contact/Lead called  Last form submission (Api name: Last_form_submission__c)

Create the Flow

  1. Navigate to Setup > Create > Workflows & Approvals > Flows.
  2. Click to create a new Flow

Create a new Lookup element to search for any contacts which are equal to your contactID. Sort this by Descending so you will pull the last record only.

We use the NULL variable to ensure that the last contact date has a value, otherwise the flow could throw an error.

The variable var_ContactID should be set to “Input Only”. This is so later process builder can be used to populate the ContactID from the contact which was just updated.

Contact form data inside salesforce

Create a new decision to check if the DateTime field of your form submission date is “NULL”

Contact form data inside salesforce

Create a record update element to update the contact/lead with the DateTime of the last form submission.

Contact form data inside salesforce

Connect everything together and set the lookup element as the flow start point (the green arrow). Save your flow and activate.

Contact form data inside salesforce

Create the Process

The final step is to use Process Builder to execute every time a contact’s total form submissions field is updated.

  1. Navigate to Setup > Create > Workflows & Approvals > Process Builder
  2. Create a new process calling it whatever you like.

Select the Contact/Lead object which has the Last Form Submission field created in the first step. Ensure that it is set to run whenever a record is created or edited.

Contact form data inside salesforce

Create the criteria so the process will only run with the Total Form Submissions field is updated. Operator should be set to Is ChangedBoolean True.

Contact form data inside salesforce

The final step is to then launch the flow created in the previous step. If you don’t see your flow, make sure you’ve activated it. Select the flow variable var_ContactID and set the reference to the [Contact].id.

Contact form data inside salesforce

The final process should look something like this.

Contact form data inside salesforce

Top forms being used

Because all of your form submission data is in one place, you can use Salesforce reports to slice and dice the data and find out what forms have been submitted the most.

Example below is a quick dashboard i threw together to show how many form submissions we were getting per week in total.

Contact form data inside salesforce

Concluding

This is just the very beginning of what you can do with the newly acquired contact form data inside Salesforce. If you want to take your analytics one step further, you can even look at our article on using SalesWings to score leads and easily add a “Last Visit Time” to each one of your Leads/Contacts. Combined with the last form submission data and form submission count you can even further segment your Lead/Contact data.

These are just a few ideas but we would love to hear how you are also using contact form data inside Salesforce. Leave your comment below and let us know.

  • Was this Helpful ?
  • yes   no

About The Moo Master

As today's world moves towards more cloud based solutions, it's not always easy to find an all-in-one solution to a business problem. We focus on business development. finding new, creative and innovative ways to use different IT systems to enhance and automate business processes. We're happy to share our knowledge and solutions we've come up with over the years to some of those unique IT/Business problems.

Check Also

Wordpress form submissions to Salesforce

WordPress form submissions to Salesforce custom object (web-to-any)

Contents1 Prepare CFDB JSON query1.1 Clean up contact form fields1.2 Prepare the JSON export query2 ...

One comment

  1. How can I contact you about your services? I can’t find a contact link on your website.

Leave a Reply

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