Here is my scenario. I have some tickets which will come in with a company code in the subject line.
example: 411 some text [zipele]
I have the need to change the primary company association based on the text within the []. I have written custom code to pick out the appropriate text “zipele”, in this ezample. What I need assistance is with looking this company code up in the companies module (it will match a custom field on the company) and setting that company as the primary company associated with the ticket. I am very new to the custom code module, and know some javascript, so any assistance is appreciated.
Hi @DanaIrvine,
There might be a low-code approach which is slighly easier: Create and manage CRM record associations with workflows
(This beta can be found through menu in the top right corner of the HubSpot app > Product updates.)
This beta allows you to associate records based on matching values in text fields. That means that the challenge simply turns into making sure that the code is not part of a longer string but isolated.
(Since you seem to have Operations Hub Professional or Enterprise, you could use the Regex options in the format data workflow action to extract the company code, if needed: Format your data with workflows)
The implementation time for this is likely a lot shorter than a custom coded action, unless you’re a seasoned developer.
Have a look and let me know if you have any follow-up questions!
This sounds perfect, but that item is not available to be added to our environment. I tried in our sanbox and production environments.