<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to get the value of the order the line items appear on a Hubspot deal? in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/How-to-get-the-value-of-the-order-the-line-items-appear-on-a/m-p/295815#M27731</link>
    <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Our customers at Paycove use Hubspot products to create invoices, quotes, and other documents. After our users add line items to a deal in Hubspot, they want the line items to appear in the same order in Paycove.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We're currently pulling in the line items for a deal using the CRM Associations endpoint (code 19). However, "display_order" of the deal is not an available field, only the "hs_quote_display_order". This is problematic because most of our customers don't create quotes on Hubspot, but use Paycove to create invoices / quotes. I've tried sorting the line items by the HS created datetime, but it appears that this does not respect the order the line items appear on the deal either.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example: line item order in Hubspot:&amp;nbsp;&lt;A href="https://d.pr/free/i/dsBHVK" target="_blank" rel="noopener"&gt;https://d.pr/free/i/dsBHVK&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Line item order returned through CRM Assocations endpoint:&amp;nbsp;&lt;A href="https://d.pr/free/i/5kmSm5" target="_blank" rel="noopener"&gt;https://d.pr/free/i/5kmSm5&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions on this?&lt;/P&gt;</description>
    <pubDate>Wed, 09 Oct 2019 17:56:09 GMT</pubDate>
    <dc:creator>paycove_rich</dc:creator>
    <dc:date>2019-10-09T17:56:09Z</dc:date>
    <item>
      <title>How to get the value of the order the line items appear on a Hubspot deal?</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/How-to-get-the-value-of-the-order-the-line-items-appear-on-a/m-p/295815#M27731</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Our customers at Paycove use Hubspot products to create invoices, quotes, and other documents. After our users add line items to a deal in Hubspot, they want the line items to appear in the same order in Paycove.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We're currently pulling in the line items for a deal using the CRM Associations endpoint (code 19). However, "display_order" of the deal is not an available field, only the "hs_quote_display_order". This is problematic because most of our customers don't create quotes on Hubspot, but use Paycove to create invoices / quotes. I've tried sorting the line items by the HS created datetime, but it appears that this does not respect the order the line items appear on the deal either.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example: line item order in Hubspot:&amp;nbsp;&lt;A href="https://d.pr/free/i/dsBHVK" target="_blank" rel="noopener"&gt;https://d.pr/free/i/dsBHVK&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Line item order returned through CRM Assocations endpoint:&amp;nbsp;&lt;A href="https://d.pr/free/i/5kmSm5" target="_blank" rel="noopener"&gt;https://d.pr/free/i/5kmSm5&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions on this?&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2019 17:56:09 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/How-to-get-the-value-of-the-order-the-line-items-appear-on-a/m-p/295815#M27731</guid>
      <dc:creator>paycove_rich</dc:creator>
      <dc:date>2019-10-09T17:56:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the value of the order the line items appear on a Hubspot deal?</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/How-to-get-the-value-of-the-order-the-line-items-appear-on-a/m-p/296137#M27785</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/66668"&gt;@paycove_rich&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope all is well with you &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;On my end, I created a deal and added five products like this:&lt;/P&gt;
&lt;P&gt;This is product one&lt;/P&gt;
&lt;P&gt;This is product two&lt;/P&gt;
&lt;P&gt;This is product three&lt;/P&gt;
&lt;P&gt;This is product four&lt;/P&gt;
&lt;P&gt;This is product five&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Next, I used this endpoint:&amp;nbsp;&lt;A href="https://developers.hubspot.com/docs/methods/crm-associations/get-associations" target="_blank"&gt;Get associations for CRM object&lt;/A&gt;&amp;nbsp;and I was return the following results:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;240363021 (the line item id)&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;240363022 (the line item id)&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;240363024 (the line item id)&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;240363025 (the line item id)&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;240363026&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN&gt; (the line item id)&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Plucking in those line item id into this endpoint:&amp;nbsp;&lt;A href="https://developers.hubspot.com/docs/methods/line-items/get_line_item_by_id" target="_blank"&gt;Get line item by ID&lt;/A&gt;, 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.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;In this case, would you mind sharing with me an example deal where you're seeing a mismatch of the display order from the UI and the endpoint?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Oct 2019 02:45:51 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/How-to-get-the-value-of-the-order-the-line-items-appear-on-a/m-p/296137#M27785</guid>
      <dc:creator>WendyGoh</dc:creator>
      <dc:date>2019-10-11T02:45:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the value of the order the line items appear on a Hubspot deal?</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/How-to-get-the-value-of-the-order-the-line-items-appear-on-a/m-p/296141#M27787</link>
      <description>&lt;P&gt;Hey Wendy!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ok great! Your answer helped me realize that I can sort on the line item id that your API provides -- thank you!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For explanation, the issue is here:&amp;nbsp;&lt;A href="https://d.pr/free/i/htai1t" target="_blank"&gt;https://d.pr/free/i/htai1t&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;When our app consumes the response from your api, it seems like it's storing them in our database in a random order. I'm not sure if this is on Hubspot's end or ours. Furthermore, we can't sort on the created time because they all have the same time. However, it looks like the line items will be in the order they list on the display.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'll try sorting on the line item id and see if that works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;-Rich&lt;/P&gt;</description>
      <pubDate>Fri, 11 Oct 2019 03:21:04 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/How-to-get-the-value-of-the-order-the-line-items-appear-on-a/m-p/296141#M27787</guid>
      <dc:creator>wooglin</dc:creator>
      <dc:date>2019-10-11T03:21:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the value of the order the line items appear on a Hubspot deal?</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/How-to-get-the-value-of-the-order-the-line-items-appear-on-a/m-p/296162#M27795</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/16715"&gt;@wooglin&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Awesome! Glad that it helps and do let me know if this works!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Oct 2019 06:02:37 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/How-to-get-the-value-of-the-order-the-line-items-appear-on-a/m-p/296162#M27795</guid>
      <dc:creator>WendyGoh</dc:creator>
      <dc:date>2019-10-11T06:02:37Z</dc:date>
    </item>
  </channel>
</rss>

