We use cookies to make HubSpot's community a better place. Cookies help to provide a more personalized experience and relevant advertising for you, and web analytics for us. To learn more, and to see a full list of cookies we use, check out our Cookie Policy (baked goods not included).
Mar 11, 2022 9:47 AM
Hello,
I created a deal-based workflow that triggers whenever the contact associated with it changed its owner.
For some reason, I can't copy the "contact owner" to the "deal owner" property.
I'm using a deal-based workflow is because I want to update the deals that aren't in the "closed" deal stage.
When I tried the contact-based workflow it updates all the deal owners associated with this contact regardless of what stage the deal is in.
Can anyone help guide me? Thank you!
Solved! Go to Solution.
Mar 11, 2022 9:54 AM - edited Mar 11, 2022 9:59 AM
Hi @ggiza,
That's correct and expected behavior. Contact-based workflows will by default update all deals associated with the enrolled contact.
There is a new beta feature which lets you label deals with an association label. The label specifies the relationship between contact and deal. This then allows you in a contact-based workflows to choose the label of the deals to be updated. However, it's not possible yet to set a label that dynamically updates deal based on its Deal stage. This is simply not possible out of the box yet.*
I expect that sometime soon we'll be able to set association labels via workflow. This would then allow us to automatically apply an "open" label deals in a deal-based workflow. In turn, this label could then be referenced in a contact-based workflow, as explained above, updating all deals associated with the contact which have the "open" label.
Best regards!
* This can be solved with custom code action solution in HubSpot Operations Hub Professional. It would require some development and the Operations Hub Professional license.
Karsten Köhler |
![]() | Did my post help answer your query? Help the community by marking it as a solution. |
Apr 15, 2022 6:25 PM
Hi @ggiza,
I can help to flesh out the coded action/API route a bit more.This solution would likely have to be implemented with the help of a developer. It's truly a magnicent tool, but I'm a bit biased. The general steps would include:
1. Leave your enrollment triggers as is, so that each time the Contact owner changes, a Deal is enrolled.
2. Setup your coded action to return the dealstage and pipeline properties by default. These can then be accessed by using event.inputFields["propertyName"] within the coded action node.
3. Use the Associations API read endpoint to find all IDs of Contacts associated to the enrolled Deal.
4. Map over those Contact IDs to make a request to the Contacts read endpoint, ensuring to include the dealstage and pipeline properties as parameters. https://developers.hubspot.com/docs/api/crm/contacts
Note - If there are instances where multiple Contacts are associated with a Deal, you may want to build some kind of logic that would help you identify the appropriate Contact. I'd be happy to expand on this if you'd like.
5. Make a request once again to the Contacts API, this time to the update endpoint, using the value returned in 4 to overwrite the value of the hubspot_owner_id of the enrolled Deal.
In the event you or someone else with a similar problem decided to go the coded action route, the above should be able to serve as a general guideline.
Mar 28, 2022 6:09 PM - edited Mar 28, 2022 6:11 PM
Here's a workaround that should do the trick, though I haven't tested it to be sure:
Mar 11, 2022 9:54 AM - edited Mar 11, 2022 9:59 AM
Hi @ggiza,
That's correct and expected behavior. Contact-based workflows will by default update all deals associated with the enrolled contact.
There is a new beta feature which lets you label deals with an association label. The label specifies the relationship between contact and deal. This then allows you in a contact-based workflows to choose the label of the deals to be updated. However, it's not possible yet to set a label that dynamically updates deal based on its Deal stage. This is simply not possible out of the box yet.*
I expect that sometime soon we'll be able to set association labels via workflow. This would then allow us to automatically apply an "open" label deals in a deal-based workflow. In turn, this label could then be referenced in a contact-based workflow, as explained above, updating all deals associated with the contact which have the "open" label.
Best regards!
* This can be solved with custom code action solution in HubSpot Operations Hub Professional. It would require some development and the Operations Hub Professional license.
Karsten Köhler |
![]() | Did my post help answer your query? Help the community by marking it as a solution. |
Mar 11, 2022 10:04 AM
Hey Karsten,
Thanks for the quick response here!
Other than the custom code action solution you suggested, is there a way for me to do that via API?
Like get all deals associated with this contact and only update those that are in the "open" deal stages?
Thank you!
Mar 29, 2022 12:30 AM
Hi @ggiza,
Yes, this can be achieved via the HubSpot CRM API: https://developers.hubspot.com/docs/api/crm/deals
Best regards!
Karsten Köhler |
![]() | Did my post help answer your query? Help the community by marking it as a solution. |