CRM

DCrinnion1
Contributor

Multiple Line Item - Contract End Dates

SOLVE

Hi All,

 

My 5th Post this week so sorry about this. Got another complex one.

 

Context:
I have tried to Create a Contract End Date (Deal Level) that automatically updates with Line Items Contract Start Date and then the term added together (With a Milisecond converter field). So at the moment when a Sales Rep puts a line item in they will put Contract Start Date and the term. My MS converter and Workflow will add that to the end date. 

 

Problem:

With my workflow it only works with One line item as it is a deal enrollment trigger that starts when a Deal has an associated line item with a start date = known and term = known. There are some deals now that have 2 line items i.e. 1 year with a discount and then 2 years normal price. My workflow is not adding the second line item as
1. the flow can't be re-enrolled due to the trigger.
2. the only available data is first created or last updated and if there were say 3 line items how would it do the second line item if the third was the last updated?

 

Apologies I know this is a lot.

 

Any help would be amazing and have attached workflow images.

Screenshot 2024-11-07 at 16.10.20.png

Screenshot 2024-11-07 at 16.11.04.png

Screenshot 2024-11-07 at 16.11.30.png

2 Accepted solutions
JWingate2
Solution
Guide | Elite Partner
Guide | Elite Partner

Multiple Line Item - Contract End Dates

SOLVE

hi @DCrinnion1 , 

 

Tell me if I am not understanding correctly, but I believe you want to be able to re-enroll when a new line item is added to the deal. So when the first line item is associated to the deal and start date + terms are known then enroll them, but when there is a 2nd line item added, re-enroll the deal again so it can update the contract start date and terms.

If that is what you are looking to do I would say istead of enrolling with "When filters are met" use the "When an Event Occurs" --> "Property Value Changes" --> "Number of associated Line Items" Then you can add the Tersm and Start date is known on the next step as your scroll down "And deals meets the following filter criteria"

I hope this is helpful and I am not talking out of the side of my face.

View solution in original post

danmoyle
Solution
Most Valuable Member | Diamond Partner
Most Valuable Member | Diamond Partner

Multiple Line Item - Contract End Dates

SOLVE

Hey there @DCrinnion1. I love that this was your 5th post - keep dropping these in as it helps us all become better at HubSpot! 

 

I think @JWingate2 has some great thoughts here and is following up with a possible answer based on your responses. I wanted to drop my thoughts in as well. 

 

While your situation is a bit unique and complex, you're facing a common challenge with HubSpot workflows and line items. As you're finding out, the current workflow setup has limitations when dealing with multiple line items per deal.

 

A couple of ideas to help solve this... 


1: Use a custom property. You could create a custom multi-line text property on the deal level to store line item information:

  • Create a custom property called "Associated Products" on the deal object.
  • Set up a workflow to update this property whenever a line item is added or modified.
  • Use this property to calculate the Contract End Date based on all line items.

 

2: Depending on your knowledge or resources, you could create a custom code solution using HubSpot's API. 

  • Create a custom app or use a serverless function to listen for line item changes.
  • When a change occurs, retrieve all line items for the deal.
  • Calculate the Contract End Date based on all line items.
  • Update the deal property with the new end date.

 

3: There's always a third-party integration option like Zapier to handle the logic. Set up a Zap to trigger when line items are added or modified, then retrieve all line items for the deal using HubSpot's API. Next you'd have it perform the necessary calculations. The last step would be to update the deal's Contract End Date property.

 

4: Finally, a more complex situation would be to have multiple workflows. I don't love this one (many workflows often lead to unnecessary complexities), but it's a possbility. 

Create separate workflows for each potential line item:

  • Set up individual workflows for the first, second, and third line items2.
  • Use conditions to check which line item is being processed.
  • Update the Contract End Date based on the specific line item being handled.

If it were me, I'd probably test out either the custom property approach or the custom code solution. These methods allow you to handle multiple line items and perform complex calculations without the limitations of standard HubSpot workflows. Whatever route you take, remember to test it thoroughly. 

 

Did my answer help? Please "mark as a solution" to help others find answers. Plus I really appreciate it!


Dan Moyle

HubSpot Advisor

LearningOps | Impulse Creative

emailAddress
dan@impulsecreative.com
website
https://impulsecreative.com/

View solution in original post

9 Replies 9
PollyPieCharts
Contributor

Multiple Line Item - Contract End Dates

SOLVE

Hi @DCrinnion1 , thanks a lot for sharing the challenge you're facing.

I am currently designing a contract management process for our team. Some aspects of what you describe are similar: We tend to have multiple line items on the same deal.

What's different is that these line items are different products. "Term (months)" could be the same or different for them, e.g. Product A = 12 months, Product B = 6 months, hence, the Start Date and End Date are individual per Line Item. The extra difficulty comes with T&C auto-renewal, which potentially creates the need for creating new deal records for renewal deals – something I saw here https://youtu.be/H8YR8j9M1GI?si=Mr6Q5rARXmtirMnn .

As I read through the post and its replies, I wondered about the end goal of the "Contract End Date" property. Is it to keep track of when the new line item should be added to the deal (2d year) by notifying deal owners with additional workflow or is it something else?

0 Upvotes
DCrinnion1
Contributor

Multiple Line Item - Contract End Dates

SOLVE

Hey!

 

So we've taken a slight change in what we are trying to do. Effectively the goal I was trying to achieve is being able to create line items for multiple years i.e. 1 year at 10 discount and then a line item for the 2 years at the full price. Then I would be able to push this information to the deal object, for example the ARR will show us that 10% discounted price, and then when the date of the next line item starts we push that full price in to ARR and so forth. 

 

Areas I was struggling with here was pushing the contract length in to the Deal object due to the Term being a text line rather than a number etc.

0 Upvotes
danmoyle
Solution
Most Valuable Member | Diamond Partner
Most Valuable Member | Diamond Partner

Multiple Line Item - Contract End Dates

SOLVE

Hey there @DCrinnion1. I love that this was your 5th post - keep dropping these in as it helps us all become better at HubSpot! 

 

I think @JWingate2 has some great thoughts here and is following up with a possible answer based on your responses. I wanted to drop my thoughts in as well. 

 

While your situation is a bit unique and complex, you're facing a common challenge with HubSpot workflows and line items. As you're finding out, the current workflow setup has limitations when dealing with multiple line items per deal.

 

A couple of ideas to help solve this... 


1: Use a custom property. You could create a custom multi-line text property on the deal level to store line item information:

  • Create a custom property called "Associated Products" on the deal object.
  • Set up a workflow to update this property whenever a line item is added or modified.
  • Use this property to calculate the Contract End Date based on all line items.

 

2: Depending on your knowledge or resources, you could create a custom code solution using HubSpot's API. 

  • Create a custom app or use a serverless function to listen for line item changes.
  • When a change occurs, retrieve all line items for the deal.
  • Calculate the Contract End Date based on all line items.
  • Update the deal property with the new end date.

 

3: There's always a third-party integration option like Zapier to handle the logic. Set up a Zap to trigger when line items are added or modified, then retrieve all line items for the deal using HubSpot's API. Next you'd have it perform the necessary calculations. The last step would be to update the deal's Contract End Date property.

 

4: Finally, a more complex situation would be to have multiple workflows. I don't love this one (many workflows often lead to unnecessary complexities), but it's a possbility. 

Create separate workflows for each potential line item:

  • Set up individual workflows for the first, second, and third line items2.
  • Use conditions to check which line item is being processed.
  • Update the Contract End Date based on the specific line item being handled.

If it were me, I'd probably test out either the custom property approach or the custom code solution. These methods allow you to handle multiple line items and perform complex calculations without the limitations of standard HubSpot workflows. Whatever route you take, remember to test it thoroughly. 

 

Did my answer help? Please "mark as a solution" to help others find answers. Plus I really appreciate it!


Dan Moyle

HubSpot Advisor

LearningOps | Impulse Creative

emailAddress
dan@impulsecreative.com
website
https://impulsecreative.com/
JWingate2
Solution
Guide | Elite Partner
Guide | Elite Partner

Multiple Line Item - Contract End Dates

SOLVE

hi @DCrinnion1 , 

 

Tell me if I am not understanding correctly, but I believe you want to be able to re-enroll when a new line item is added to the deal. So when the first line item is associated to the deal and start date + terms are known then enroll them, but when there is a 2nd line item added, re-enroll the deal again so it can update the contract start date and terms.

If that is what you are looking to do I would say istead of enrolling with "When filters are met" use the "When an Event Occurs" --> "Property Value Changes" --> "Number of associated Line Items" Then you can add the Tersm and Start date is known on the next step as your scroll down "And deals meets the following filter criteria"

I hope this is helpful and I am not talking out of the side of my face.

DCrinnion1
Contributor

Multiple Line Item - Contract End Dates

SOLVE

Hey!
Thank you so much for this!
So I have looked at this as a workflow trigger and these are the slight issues I am running in to:

1. When they create Line items they will be doing it all at once so that will just trigger the Deal workflow to trigger and will I even need it to re-enroll?

2. Firstly need to change the Edit record actions to Increase property value (which I have already done).
3. When a Term is inserted, I need to add a way in which the workflow combines both terms together so I know the full term of the contract. As when I use the branch method and there are 2 line items with 12 Months and 24 Months it will always go down the 12 Months branch as there is a line item with 12 Months.

 

Apologies I know Ive almost flipped the original question to something else but I was wondering if you could help with this?

JWingate2
Guide | Elite Partner
Guide | Elite Partner

Multiple Line Item - Contract End Dates

SOLVE

Hi @DCrinnion1

 

In order to help fully, id love to hear what the full process.

 

So as a rep is adding line items its done together not a line item today and potentially a line item 2 weeks from today. So we will have to figure out a way to parse these out through 1 update rather then a gradual update. 

 

Please let me know and what I am missing and any additional details that will help solve for you.

0 Upvotes
DCrinnion1
Contributor

Multiple Line Item - Contract End Dates

SOLVE

Hey!

 

So the full process is 

Deal Closes -> Rep inserts line items -  so we are aware of what products are involved on the deal. We only really offer one product though therefore all we really do is put in the product and that normally suffices as its the same product at the same price for 1/2/3 years.
However now we have had a discount on a first year and then the full price the next 2 years so this provides 2 issues
1. My workflow that was able to take the Contract Start Date and the Term of the Contract to add to the End date is not working as there is no way to add the seperate terms and add together to a number field.
2. The ARR is all over the place, as Line items can't understand when a product starts and the other one finishes even if you set the billing date to a year later.

JWingate2
Guide | Elite Partner
Guide | Elite Partner

Multiple Line Item - Contract End Dates

SOLVE

@DCrinnion1 , 

 

I wanted to apologize for me being away after you answering my question - my apple mail changed to AI and I didn't see the notification that you replied. 

Thank you @danmoyle for helping me out! I completely agree with what Dan says.

0 Upvotes
PamCotton
HubSpot Employee
HubSpot Employee

Multiple Line Item - Contract End Dates

SOLVE

Hey @DCrinnion1, thank you for sharing.

 

It looks like the issue stems from the workflow being triggered only once due to enrollment limitations, which can make it challenging to handle multiple line items. To address this, consider breaking down your workflow into separate triggers for each line item or exploring custom code actions to check for multiple line items and calculate the end date accordingly. This might allow you to capture all the data needed to calculate the correct end date based on the line item details. 

 

To our top experts @danmoyle and @TomM2 any recommendations for @DCrinnion1 matter?

 

Thank you,

Pam