Discussion Thread | Operations Hub Show & Tell (Q2 2022)
Great showcase guys!
On the formatting data side of things, there are some use cases where we need to generate new values instead of working with what is available. Currently, custom code actions are an overly complicated way to do the following:
Remove all but the first character of a string, to retrieve the initial of a name.
Take the 3rd from last character of the record ID, for use in deciding control groups and segmentation.
Add a RNG
I'm also starting to see the need from teams to evenly distribute leads and record ownership based on who has the least records assigned to them. Ex: Agent 1 has 20 tickets, Agent 2 has 5 tickets. Assign the next 15 to Agent 2 or until they are even. The limits found in Hubspot workflows is that Hubspot user data can't be surfaced anywhere, turning users into a Hubspot object would be a great way to surface this data.
A recent task I'm onto is creating automated Credit IDs for customers who are due to receive credit. The credit ID must be unique and must be 6 characters long, e.g. A12345, B67890.
I wonder If I can generate a number using RNG, then use a custom code action to check if a duplicate exists against another record, if it does, repeat.
This came about with a CS team recently moving away from zendesk, where they used the 5-digit ticket ID that was generated. Adding Z to the start completed the 6-character requirement for a credit ID. In Hubspot this is not possible as ticket IDs are 9+ characters, hence why I need to generate this shorter UID for tickets.
---------------
EDIT: I also just noticed that it errors if I was to do something like this randomNumber(00001,99999). Ideally, I'd want to generate a number with a set number of characters.
The error is because the validation here is essentially interpreting "00001" as an incorrectly entered "1." To force a 5 digit result, enter randomNumber(10000,99999) instead. Hope that helps : )
Following up another one of your ideas above where you mention keeping only the first letter of a name, we've now added the ability to trim values using "Left" and "Right" formulas. Here's an example where you could take a long account number, and use just the last 4 digits:
Jun 28, 20228:51 AM - edited Jun 28, 20228:51 AM
HubSpot Product Team
Discussion Thread | Operations Hub Show & Tell (Q2 2022)
Hi Steve,
Thanks for your feedback and ideas for formatting data, this is super helpful for us as we explore adding more formulas and functionality. We have an idea for an RNG (random number generator) and are currently doing development work to bring something like this to the Format Data action. I'll follow up here when there's more information to share.