Feb 14, 20198:31 AM - edited Feb 18, 20198:11 AM
Not applicable
Update contact property on form submit
SOLVE
Hi guys,
I have a custom property group called "Salesforce Information". Within this group I've created a custom property called "web_activity_most_recent__c" and set it to hidden on a form.
Scenario: Everytime a form is submitted, we need this property to be updated with a value dependent on the page the form is submitted from. We currently have over 120 pages with corrsponsponding web_activity_most_recent__c values.
eg. if the visitor submits a form from huddle.com/get-started/ then the value forweb_activity_most_recent__c should be "Downloaded_ebook_collaboration_client-experience", and a different value if the form is submited from another page, etc.
Also ensure your Salesforce mapping within the Hubspot integration settings is set to "Use most recent value" to avoid Salesforce from overwriting recent values changes in Hubspot.
Hi, @Anonymous. While the approach outlined would work, the properties in the Salesforce Information section are used in mappings. Populating the properties ending in "__c" - custom fields from Salesforce - won't push values to Salesforce from HubSpot. You want to update the HubSpot property mapped to that Salesforce Information property instead in your form.
Brad Mampe, Salesforce Analyst, Fidelity I'm probably wrong. I may not be right about that.
Feb 18, 20192:28 AM - edited Feb 18, 20197:43 AM
Not applicable
Update contact property on form submit
SOLVE
Thanks for this @bradmin , what do you suggest I do?
I've gone ahead and updated the Update Rule in the Salesforce mapping section within Hubspot from Use Salesforce value to Use updated value - as per Hubspot documentation. Everything seems to be working fine? Is there something I'm missing?
@Anonymous, it looks like the API name of the HubSpot-side property matches the Salesforce property. That would work if your custom HubSpot property has that same API name, but that may not be sustainable.
Mappings allow you to populate the Salesforce side of the mapping, by setting the value in the HubSpot-side property part of the mapping. You'd have CustomHubspotProperty on the left side of the mapping, and Custom_Salesforce_Field__c on the right. After that's established, put CustomHubSpotProperty as your field on the form, and subsequent submissions will pass the desired value to Salesforce in Custom_Salesforce_Field__c.
The ambiguous part is that the Salesforce field needs to exist among your HubSpot properties, so it can be included in the mapping. However, if you map the Salesforce field to the Salesforce field, nothing will effectively get synced to Salesforce from HubSpot.
Brad Mampe, Salesforce Analyst, Fidelity I'm probably wrong. I may not be right about that.
@bradmin thanks for the response, however everything seems to be working and matches up perfectly. Basically we had this working through Marketo for ages, so it's the exact same implementation.
The field's value updates whether amended from Salesforce or Hubspot.
Okay, if it's working for you, you're all set. That's a particular config which does have the potential to interfere with results, but if you haven't experienced any issues, disregard what I wrote.
Brad Mampe, Salesforce Analyst, Fidelity I'm probably wrong. I may not be right about that.
Also ensure your Salesforce mapping within the Hubspot integration settings is set to "Use most recent value" to avoid Salesforce from overwriting recent values changes in Hubspot.
This way you wouldn't be relying on jQuery at all, and it would, in general, be much quicker and more reliable. (No blocking, fires as soon as form loaded)
The valueFrom variable in my example is only an example of where the data could come from. In this case, it's an element with the ID value-from somewhere on the page.