"for each" in Workflow

Hi,

I’m worndering how to create steps in a workflow that will check “for each” line item saved in my deal specific opertation.

for example if a deal include 3 line items, I want to check/update deal property for each of them, not the 1st one found…

any idea?

Hey @mzebib68 generally what HubSpot would use as “each” is re-enrollment, technically speaking what you’re looking to do is re-enroll a deal in the workflow each time a new line item is added, if I’m understanding correctly?
So for example “My Deal” gets “line item 1 added”.
“My deal” enters a deal workflow and something like “line item 1 value” gets added to the deal amount.
“My deal” gets “line item 2 added”, “My Deal” goes through the workflow again and gets “line item 2 value” added to the deal amount.
The issue I’m seeing here though is HubSpot doesn’t allow you to re-enroll a deal based on line item properties unfortunately.
The only workaround I can seem to figure out is by having a manual property to trigger the workflow.
For example you could create a custom deal property for “New Line Item Added” which is just a yes or no dropdown. When a user adds a new line-item they could set this property to “Yes” Which triggers the workflow to pull the deal in, and do the work. The last step in the workflow could then be to set the “New Line Item Added” property back to “no”, so any further users adding line-items will have to set it back to “yes”.
A bit of manual work in there, I’m not sure if it’ll suit your needs but it might just be a quick workaround for now!
Hope this helped a bit! Let me know if you have any questions!

Hi @TomM2 ,

The check has to done at saving as there is line items can be added/removed from the deal before the saving and I don’t see how to implement your proposed solution as there might be “already” several line items in the saved deal.