Creating Quotes With The Connector For SugarCRM

Creating Quotes With The Connector For SugarCRM

book

Article ID: KB0079029

calendar_today

Updated On:

Products Versions
TIBCO Cloud Integration - Connect ( Scribe ) 1.3

Description

When processing Quotes using the SugarCRM Connector there are several requirements that should be taken into consideration as you build your integration. SugarCRM Quotes are more complex than the standard Quote Header and Quote Line Item entities used by many other applications.

NOTE: Inserting Quotes into SugarCRM Version 7.8.2.2 or lower is not supported.
 

Required Entities

 
Note this list includes only those entities that must be populated for a Quote to be created. It does not include optional entities such as tax rates or shippers
 
  • Quotes – Basic quote information including the associated account, billing address, shipping address, and totals.
  • ProductBundles –Information for Groups that can optionally be used in the Quote Product area of the SugarCRM User Interface.  A “Default” Product Bundle is always created for a quote whether or not any additional Product Bundles (Groups) are created.
  • product_bundle_quote – Contains only the Quote_Id and ProductBundle_Id fields to link the Quote to the Product Bundle, and the position field to set the order in which the ProductBundle (Group) displays in the Sugar CRM UI/View Quotes page.
  • Products – Information about each line item associated with a quote, including quantities, pricing, costs, and discounts.
  • product_bundle_product - Contains only the Product_Id and the ProductBundle_Id fields linking the Product to the Product Bundle, and the position field to set the order in which the Quote Line Item displays within the assigned Group in the SugarCRM UI / View Quotes page.
  • ProductBundleNotes – Comment added in the Quote Product area in the SugarCRM User Interface.
  • product_bundle_note – Contains only the ProductBundleNotes_Id and the ProductBundle_Id fields linking the ProductBundleNote to the Product Bundle, and the position field to set the order in which the note displays within the assigned Group in the SugarCRM UI / View Quotes page.

 

Position Field

The Position field is used by several of the required entities listed above to control the position or display order of a record when shown in the SugarCRM UI on the View Quotes page. This field is a 0 based integer field. For each item in the Quote, assign a number to the position field, starting at 0, to display a set of items in Ascending order on the SugarCRM View Quotes page.
 
The Products and Notes records share the same number series within the ProductBundle Group that contains those records. For example, if Product A should display first in Group 1, set its position to 0. If you want a Note/Comment to display immediately following Product A in Group 1, set its position field to 1.
 
NOTE: The position field value can be set for records in SugarCRM 7.10, however, due to an issue in SugarCRM, the value does not control the display order in the SugarCRM UI at this time. Best practice is to set the value for the position field in anticipation of this issue being addressed in the future.  SugarCRM version 7.9.2 uses the value of the position field correctly.
 

Quotes Structure


Using the position field, you should be able to control the order of the related records that make up a Quote in Sugar CRM.  Below is an example of the structure of a Quote.
 
Quote A
                ProductBundle Green - Position 0
  • Product Fall: Position 0
  • Note Fall: Position 1
  • Product Spring: Position 2
  • Note Spring: Position 3
  • Product Summer: Position 4
  • Product Winter: Position 5
                ProductBundle Blue - Position 1
  • Product Europe: Position 0
  • Note Europe: Position 1
  • Product Asia: Position 2
  • Note Asia: Position 3
  • Product Africa: Position 4
 

Sample Design Flow For Creating A Quote

 
NOTE: The following example includes only those entities that must be populated to create a Quote.  The Map used to create a Quote may require additional operations, such as looking up Product or Account information.

kA30e000000fxjGCAQ_en_US_1_0
  1. Insert a basic Quotes Record.
  2. Insert a ProductBundles record.
NOTE: A “Default” Product Bundle must be created.  Set the “default_group” field in the ProductBundles entity to true for the Default Product Bundle.
  1. Insert a product_bundle_quote record linking the ProductBundles record to the Quote record.
  2. Repeat Steps 2 and 3 for as many ProductBundles records as needed for the Quote.
  3. Insert a Product record for a Product included on the Quote.
  4. Insert a product_bundle_product record linking the Product record to the associated ProductBundles record. Set the position field to control display order within the ProductBundle.
  5. Repeat steps 5 and 6 for all the Products included on the Quote.
  6. Insert a ProductBundleNotes record for any Comment included on the Quote.
  7. Insert a product_bundle_note record linking the ProductBundleNotes record to the associated ProductBundles record. Set the position field to control display order within the ProductBundle. Keep in mind that product_bundle_note and product_bundle_product records share the same series of position numbers starting at 0.
  8. Repeat Steps 8 and 9 for all the ProductBundleNotes included on the Quote.
NOTE: The Quote itself, all Products on the quote, and all notes/comments on the quote MUST be linked to a Product Bundle even if the quote is only going to have the “Default” Product Bundle.
 

 

Deleting ProductBundles Records

 
Do not use TIBCO Scribe Online to delete a ProductBundles record that has linked records, such as products or notes.  The products, notes, and other linked records should be associated with a different Product Bundle or deleted before deleting the Product Bundle.

For additional information on this Connector, see TIBCO Scribe Online Connector For SugarCRM in the TIBCO Scribe Online Help.


 

Issue/Introduction

Requirements for creating Quotes in SugarCRM using the TIBCO Scribe Online Connector For SugarCRM.