Note: Available to Marketing, Sales, Service and Content Hubs both Professional and Enterprise and Professional Ops Hub.
There’s lots of situations where you want to update a specific associated record, but HubSpot generally can only update associated records based on association labels, the most recently created, or most recently updated records.
There’s therefore no straightforward way to do things such as “if [property] on this deal matches [property] on a contact, update the deal”.
Though we can’t match properties specifically, HubSpot does allow you to do some basic maths with number properties, and we can use this to match records together, and update a specific record (rather than all deals, for instance).
Let's dive in!
In this scenario, we want a deal to move to the next stage of the pipeline when a payment is recorded. Payments will show on associated deals, and can create a new deal (if one doesn’t already exist) - but in this case, there could be multiple deals in similar stages of the same pipeline, and we need to know which one should move!
a. A numbers property for “unique payment ID” on a Contact
b. A numbers property for “unique payment ID” on a Deal
c. A numbers property for “Contact’s unique payment ID” on a Deal
This can be any number, as long as none of the contact's other deals will have the same one. In our case we’re going to use the record ID, but this isn’t a number property, and so we set up a workflow to copy the deal’s record ID to the “unique payment ID” property whenever a deal is created.
The email contains a personalisation token for the Deal’s “unique payment ID”, which will be used in the payment link in the next step.
Note - make sure re-enrolment is on for this workflow.
Create a new calculated property on the deal where the formula is “unique payment ID” minus “contact’s unique payment ID”. If you’ve set everything up correctly, this calculation will show 0 when the deal’s “unique payment ID” matches the “contact’s unique payment ID” property.
The trigger should be “Contact’s Unique Payment ID” is known. Note - make sure re-enrolment is on for this workflow as well.
Add a branch action to the workflow which checks if your calculation property equals 0 or not. For our workflow, a deal should move to the “paid” pipeline stage if it matches, but for any deals that don’t match, the “contact’s unique payment ID” property is cleared, as this payment wasn’t related to them.
We’ve also added a 5 minute delay before the branch, to give the calculation property time to update.
Work smarter not harder.