Rest API Quote Line Items

Hi,

I have  developed a simple C# program to extract Quotes from Sugar using the example

sugarondemand.com/rest/v11/Quotes/{0}

However  this returns the header data only.

Question  is:

What do I use to return the Quote Line Items?

Thank you

Parents
  • Hi Brendan,

    It seems the generic question is  how to deal with Sugar data while having a strong technical background, admin-level knowledge Sugar  but no time to learn how to develop for Sugar

    Actually, necessary data preparations could be configured in Sugar with Logic Builder configurator tool and exposed as the custom endpoint.

    That is very easy for a non-developer to make it, so let me show an example on QLI retrieval case in a low-code approach:

    There are 3 simple steps to achieve a result:
    1) to declare a custom endpoint as Service
    2) To implement Service in a Logic Builder flowchart 
    3) To install the flowchart via Module Loader

    I declared an endpoint with 2 parameters:


    Then I drew a flowchart in Logic Builder (https://logicbuilder.integroscrm.com) to retrieve just a few necessary QLI fields for the QuoteName.
    You may easily read it by following the white line.
    As you can see, you may configure any logic and define the structure for selecting necessary data:


    Then I've generated zip package in a click with Logic Builder and install it  to Sugar via Module Loader 

    Now, if you use Postman to make an authorized request (user jim password  jim)  you will get a ready-to-use response with necessary QLIs data:

    Response:

    This approach works for both Sugar Cloud and on-premise, from version 7.5 and up to the modern one.


    Best Regards,
    Dmytro Chupylka

    integroscrm.com
    We make work in Sugar CRM system faster, more convenient and efficient

  • Hi Dmytro,

    appreciate the detailed response. All im trying to do is connect to sugar and access the Quote and Quote Line Items.

    As detailed above, I can call a quote and this is returning the Quote, but no array / list of items.

    I would have assumed by default this function would return the items of a quote, but for some reason its not doing so.

    Regards

  • I just checked it myself and indeed when you get the quote like this: 

    yourinstance/.../<quoteid> you won't get the bundles / products that are connected. When you add the following query param view=record they are returned. The reason for this I don't know. 

    p.s. A tip from my side. If you work with a new system you don't know anything about and you know it's rest based please open the application itself i your browser and see what developer tools is telling you. 

  • Hi  Jeroen,

    Thanks for the tip. Yes passing  the view=record now shows the  bundles.
    Agree its strange why the standard api call doesnt show the line items.

    Appreciate your help

Reply Children
No Data