May 26, 2020 5:52 PM
I'm having trouble keeping the line items ordered on deals.
Some of our deals have such a large number of line items that we'd like to keep them ordered in a way as to help our users. Originally I thought that If I controlled the association time I'd be able to associate them in the order desired and solve the problem this way, but even creating them in the order I want, with intervals of several second just to be sure they aren't getting associated out of turn, I still didn't get the result I want.
Anyone knows how to handle this? I can't find anything like display_order for the line items.
Jan 20, 2021 9:12 PM
Line items can be re-ordered in the UI, by clicking and dragging a line item to a different place in the ordering. I'd like to have a way to determine what the display order is, because changing the display order does not change the order in which the results are returned from the Get associations for CRM object API.
Is there any way to do this?
May 28, 2020 2:24 AM
As mentioned on a similar dev forum thread: HubSpot Community - How to get the value of the order the line items appear on a Hubspot deal?, I did the following test:
On my end, I created a deal and added five products like this:
This is product one
This is product two
This is product three
This is product four
This is product five
Next, I used this endpoint: Get associations for CRM object and I was return the following results:
240363021 (the line item id)
240363022 (the line item id)
240363024 (the line item id)
240363025 (the line item id)
240363026 (the line item id)
Plucking in those line item id into this endpoint: Get line item by ID, I was able to see that the results of the product in the line items is showing the same as what I'm seeing on the UI.
Are you seeing mismatch of display order between the UI and the endpoint? Could you share with me, your portal ID, an example deal and the steps you took?
Jun 5, 2020 5:18 AM
My Portal ID: 3957645
My problem is slightly different.
I'm creating the line items via API, and it doesn't seem to matter how much I space the craetion requests, the line item ids will not be necessarily sequential.
Take the test deal 2268144437.
I created the line items, always waiting the succesful creation of one before creating the next. The Line item Ids I got came, however, in the following order:
As you can see the IDs for the created line items are not exactly sequential, so, even though I can control the creation order I fail to control the display order. Can you help me with this?
Oct 12, 2021 7:00 AM
Hi @WendyGoh , Do you have any suggestions for this? We create deals and line items through API and need to reorganize 5 line items in thousands of deals before we continue the process. This is time-consuming. We can't figure out what defines the line item ID sequence and it seems just random. It should be possible to make a prioritization upon a product ID. @Thomastechweb