APIs & Integrations

RS1
Member

Wordpress Gravity Forms - Partial Fill Outs - Sales Reps

Thank you for taking a moment to read my post. Please excuse me if you feel it is in the wrong section but I believe this should be right.

I have WordPress using Gravity Forms and have a few questions. I need to know if HubSpot can do a few things. The website has a form that is filled out by retail customers who supply a sales rep code to the form to inform the company which sales rep this sale should be attributed to.

  1. When the customers fill out the form and pay - they should populate the contacts section of Hubspot under the heading customer.

  2. If they fill out the form but do anything less than completing the transaction they should populate a contact subsection heading as potential customer. Can HubSpot record a partial form without the user submitting the form?

  3. The sales rep codes entered on the form should link to the CRM and populate the sales records for that particular independent sales rep. Then the sales made on the site should be recorded into HubSpot and attributed to the correct independent sales rep.

  4. The CRM then should auto-generate an email/text to a new customer that confirms the sale. It should also auto-generate an email/text to potential customers who decide to not complete the transaction and then invite them to complete the transaction with a link in the email/text.

Are these things possible in HubSpot? Please let me know if you need any clarification and I appreciate any help!

0 Upvotes
4 Replies 4
RS1
Member

Wordpress Gravity Forms - Partial Fill Outs - Sales Reps

Does anyone have any more insight into question 3 or 4?

0 Upvotes
DanielBertschi
HubSpot Employee
HubSpot Employee

Wordpress Gravity Forms - Partial Fill Outs - Sales Reps

@RS1 Here is my take on your questions. Please feel free to correct me if I misunderstood your requirements:

3. The sales rep codes entered on the form should link to the CRM and populate the sales records for that particular independent sales rep. Then the sales made on the site should be recorded into HubSpot and attributed to the correct independent sales rep.

If I understand this correctly, you would like to do the following:

  • the customer fills out a web form to purchase a product. In order to make sure that the sales person gets logged correctly a ‘sales rep code’ is input into a form field.
  • all of this goes into the CRM.

All of this is possible:

  • You build/use a custom HTML form instead of a normal HubSpot form.
  • When the form is submitted, the data from the form is sent to the HubSpot Forms API. This will either update an existing contact or if no contact exists for the provided email address, a new contact will be created.
  • The next step will be to create a deal via Deals API. However, in order to associate the person with this new deal, we need to get the internal ID of the just created/updated contact first. You can do this via this endpoint from the Contacts API.
  • Now you ping the Deals API to create a new deal and you pass in the VID (contact ID) that you extracted from the contacts API in the previous API call.
  • In order to log the deal with the correct sales person, you need to provide the internal ID of the rep (= ‘HubSpot owner’). Ideally, you would directly use the internal ID of the HubSpot owner as the ‘Sales Rep Code’. If this isn’t possible and you need to use other rep codes instead, you will need to maintain a server-side data structure that maps ‘your’ rep codes to the HubSpot owner IDs. In that case, you would need to look up the HubSpot owner ID based on the provided rep code before passing creating the deal via Deals API.

4. The CRM then should auto-generate an email/text to a new customer that confirms the sale. It should also auto-generate an email/text to potential customers who decide to not complete the transaction and then invite them to complete the transaction with a link in the email/text.

This part shouldn’t be difficult if you pass all the necessary data into HubSpot as described above. Please note that you cannot use deal properties for personalization in an email. All the data you that you would like to use in the email needs to be stored in the contact record. This data will be overwritten when the same contact purchases the next time but the deal information will always remain in the system and can be used for segmentation.
The abandoned cart email should also be possible but it really depends on your set up. The Forms API works really well for abandoned cart ‘submissions’ but it does require that you can grab the email address from the user at an early stage.


Actually, the following might be easier:

  • instead of using the Forms API you could use a normal HubSpot form
  • all the data would be stored in contact properties and would be available for personalization in the email
  • when the form is submitted, a workflow is kicked off in HubSpot which triggers a POST webhook (that sends the full contact record in JSON format).
  • the script that consumes the webhook, extracts all the necessary information before creating a deal via Deals API.
  • You would still need to maintain an owner look up table to extract the correct owner ID but you wouldn’t need to call the Contacts API to get the VID as the VID is already part of the webhook payload.
RS1
Member

Wordpress Gravity Forms - Partial Fill Outs - Sales Reps

Thank you very much for your help! I think you are definitely pointing me in the correct direction.

Everything you mentioned would also require a HubSpot account with the “Custom Form Fields” feature to make these work, correct?

0 Upvotes
danaketh
Participant

Wordpress Gravity Forms - Partial Fill Outs - Sales Reps

While using HubSpot forms would be easier for what you’re trying to achieve, I’ll try to point you towards possible solutions without them.

1. When the customers fill out the form and pay - they should populate the contacts section of Hubspot under the heading customer.

When the form is submitted, same script that processes it can also contact HubSpot API and create the contact. I can’t help you with the way of making Gravity Forms doing that however, as I’m not familiar with them. We’re using HS forms (but in combination with API - we’re avoiding embed). You’ll find more about creating contact via API at https://developers.hubspot.com/docs/methods/contacts/create_contact

I’d suggest creating HS form for this and when user submits the GF form, you’ll submit the data to API as described at https://developers.hubspot.com/docs/methods/forms/submit_form

2. If they fill out the form but do anything less than completing the transaction they should populate a contact subsection heading as potential customer. Can HubSpot record a partial form without the user submitting the form?

You should be able to only require an e-mail for creating a contact. As mentioned above, I’d use HS form to shadow yours and then set up rules in HS on how to mark customers based on the information they give you. Can’t help you there tho, as those are done by my colleagues and I only deal with the technical part :slight_smile: There is however a field called lifecyclestage which you may fill with the customer’s role and it should save it.

Also you can actually have a script that will auto-submit the form on background when user fills in e-mail but I’m not sure people will be thrilled about that.

3. and 4.

To be honest, I have no idea what is this about as I’m but a simple developer :smiley: Deals and Engagements could be the solution here but I’ve not used them so far, so can’t really help there.

0 Upvotes