I'm attempting to build a Chrome plugin to set initial "default" property values for Contact records

Occasional Contributor

Goal - I want to make my salesmen more efficient by initializing specific property values to common "default" values somy salesmen do not have to enter them manually.

Scenario - Salesman gets a phone call from a brand new prospect & manually brings up HS screen to create Contact or Deal record to type in data.  Approximately 50 properties get the same value 95% of the time, but apparently there is currently no way to initialize these fields. Therefore the salesman must manually initialize them - which is inefficient (to say the least).

Attempted solutions: 
1) Workflows - Apparently workflows cannot be triggerred until the new record gets saved. That is too late. 
2) Forms - That does not fit our scenario.
3) Creating a Chrome Plug-in. That is what this ticket is about.
4) Switching to another CRM that can do this basic function - We are investigating that now.

Problem - I've written javascript that searches the DOM and locates the record's fields that need defaults. It then inserts the default proper value into the DOM. I can actually see the correct value being displayed. But when I manually click "Save" the default values that I have assigned are not saved. There must be some sort of ajax or other background interaction that I am not addressing.

What do I need to do to make this work?

I realize that this is a brittle and sub-optimal solution. But multiple calls and chats w/ tech support and reading the online docs have not revealed any viable alternative. If you have such an alternative I would love to hear about it.

I would be happy to share my javascript jQuery code snippet with you. It's pretty simple.

PS: You can see Customer Support's attempt to help with this issue in Support Ticket #3087841

Also see this: https://community.hubspot.com/t5/HubSpot-Ideas/pre-set-property-default-value/idi-p/315562

Reply
0 Upvotes
13 Replies 13
Occasional Contributor

FYI: You can see Customer Support's attempt to help with this issue in Support Ticket #3087841

Reply
0 Upvotes
HubSpot Moderator

Hey @KSM,

 

Thank you for the detailed write up on your business use case. 

 

Currently, HubSpot does not support the functionality to set a default propety values when creating object (e.g. Contact/Deal). 

 

That said, based on your attempted solution, I do think that Workflows would be the most suitable workaround here. As such, I'd like to understand more about the concern on it being too late?

 

This is because as you mention, a workflow can only be trigger after creation and I'd like to shed some light that upon creation > if the contact meets the workflow enrollment trigger > the enrollment is almost instant and typically if it's a simple set property workflow action > I would expect the newly created contact to have the property populated within 1 min or less. 

 

Are there any particular concerns that it'd be too late?

Reply
0 Upvotes
Occasional Contributor

Wendy -

Thank you for your reply.

Please allow me to provide more context:

1) The saleman is sitting at his desk and receives a phone call from a new prospect.

2) In the salesman's browser, in Hubspot's GUI, on Hubspot's Contact page, the saleman clicks on "Create Contact" and a blank contact record displays on the right side of his screen. *** Here is when the initial populating of contact property defaults needs to have immediately occured ***
3) The saleman populates the contact properties while the contact is on the phone, potentially modifying contact properties that were previously assigned defaults.
4) The saleman clicks "Create Contact" to save the new contact.


The initial populating of contact property defaults needs to happen between steps 2 and 3. It must happen before the saleman enters the data from the new contact.

Is there a solution that addresses this desired flow of events?

Reply
0 Upvotes
HubSpot Moderator

Hey @KSM,

 

Thanks for the clarification.

 

This is currently not supported within HubSpot. However if there's a particular property e.g. Status, in which 95% of the time it's of the same value, I'd use a workflow to populate the value. 

 

Essentially this means that the sales rep doesn't even have to see the property when creating the contact. However, if they'd like to change the property after the workflow has set a value on it, the sales rep can modify it in the contact record page. 

 

While I know this is not ideal, for now this is the best workaround that I can think of. 

Reply
0 Upvotes
Occasional Contributor

I want to populate the property with the initial default value before the salesman sees it on his monitor, so he can change it right then and there while he is systematically going though the properties during the Contact or Deal creation process. I do not want him to have to remember that certain fields are populated on other pages.

I have written javascript that will do this, but the values, though they show properly on the monitor, are not saved when the salesman clicks on "Create Contact". What additional things must I do to get these initial default values, if not overwritten by the salesman, to be saved?

I can share this simple jQuery/javascript with you. 

I'd rather not take this approach but the lack of this feature leaves me no other alternative except to abandon Hubspot for Salesforce, which I'd rather not do.

So how do we make this work? Or is this a feature that, because other users have requested it, your dev team is getting ready to release?


Reply
0 Upvotes
HubSpot Moderator

Hey @KSM,

 

Thank you again for sharing your detailed use case.

 

When looking to create/update contact aside from using the HubSpot UI, the next best suggestion is to use the Contacts API Overview | Contacts API. However, this endpoint doesn't support cross-origin (CORS) AJAX requests as that would expose any authentication (e.g. hapikey/oauth) you're using for the request. As such, this wouldn't be an option for your team to include it in the javascript that your team came up with.

 

For now, this isn't a function that we support.

 

That said, I'd recommend jumping over to the idea page that you shared earlier on  and upvote it so that it's visible to the HubSpot product team and other HubSpot customers and developers. Hopefully this will gather more interest and will be part of our product roadmap.

Reply
0 Upvotes
Occasional Contributor

Would it be possible to set up a workflow that insures that there is always a Contact record with the name "New Contact" present, and have this workflow create such a record w/ the properly initialized default properties if it is not already present?

If this can be done then I can instruct my salesmen to always use this record, instead of creating a new record from scratch. It would always have the over-rideable defaults they need and when they consume it the workflow would create and initialize a replacement record to be used for the next new Contact.

So instead of using the GUI to create a new record they would basically be editing a pre-created and initialized record.

What do you think?

Reply
0 Upvotes
HubSpot Moderator

Hey @KSM,

 

Currently, it is not possible to always have a contact name 'New Contact' present within HubSpot CRM. 

 

The idea that I have in mind still requires sales rep to create a contact first and name it as 'New Contact', and the workflow would be something like this: 

 

Screen Shot 2020-02-28 at 4.00.34 PM.png

 

Alternatively, the last option that I can think of and if you'd like to explore the option of using HubSpot API is to use the Create or update a group of contacts | Contacts API. With this API, you can create a bunch of contacts periodically with name 'New Contact' and set the default properties to the value that your team had like. 

Reply
0 Upvotes
Occasional Contributor

At this point I think the best I can do is to write a workflow like this:

Upon the initial saving of a Contact record, inspect specific properties and if they are blank then fill them in with the desired initial default value for that property.

 

I'll just have to educate my salesmen as to which properties they can leave blank when creating a record.

What do you think?

Reply
0 Upvotes
Occasional Contributor

OK - Here is our our solution (for now) - 

1) For those properties with defaults I have prefixed an "*" to the displayed property name so that my salesmen can know which properties they can skip because a workflow  will fill it in for them later.

2) For each property that requires a default I've created one workflow. The workflow sets that property to the default value IF that property's current value is blank.

Problem - I can still fill in a Contact record and click on "Create Contact" and when that Contact record is saved & displayed, the properties that should have a default value do not. If I wait a minute and refresh the display then they do have the default values. 

How can I make the workflow do its work as soon as the record is saved so that my salesmen will see the defaults when the record is first displayed after its creation?


Reply
0 Upvotes
HubSpot Moderator

Hey @KSM,

 

Do you mind sharing with me the workflow name and can I confirm the HubSpot portal in question is 524xxxx? While I believe there would be a processing time of about 1-2 mins or so, I'd still like to see if the workflow has any delay action set in place/if we can shorten the workflow to speed things up.

Reply
0 Upvotes
Occasional Contributor

We had to create nearly 60 workflows - one for each property. Here is one of them:

https://app.hubspot.com/workflows/5249886/platform/flow/23495595/edit

Reply
0 Upvotes
HubSpot Moderator

Hey @KSM,

 

Looking at the workflow, it doesn't look like there's additional delay added and the set property value action is the first action in place when a contact is enrolled into the workflow. I do believe that there's a processing time and based on the workflow you created, I'd say it's probably the most optimized workflow. 

Reply
0 Upvotes