Let the platform do the work

Importing Line Items Related to Parent Opportunities, Quotes, or Purchases

Overview

Sugar's line item modules (e.g. Revenue Line Items, Quoted Line Items, and Purchased Line Items) represent the various elements of the sales cycle as they relate to their parent modules (e.g. Opportunities, Quotes, and Purchases). The import function allows you to insert multiple records into Sugar using a .csv file instead of creating them one-by-one. Because each line item row must include its parent record's ID as well as other potential field values, the parent module records must be imported first. This article uses the Revenue Line items and Opportunities modules to explain the steps needed to import these types of records. 

Use Case

As an example, we will walk through the process of importing new revenue line items and relating them to the appropriate parent opportunity record. Sugar's import wizard is a beneficial tool as it allows you to create and relate various revenue line items to multiple opportunity records at once.

The Revenue Line Items module allows you to track potential sales at the line-item level. Each revenue line item represents the prospective sale of a particular product and has its own sales stage, expected close date, amounts, etc. Opportunity records serve as the container for a group of revenue line items so that the amount (e.g. Likely, Best), Status, and Expected Close Date fields on the opportunity record are based on the related revenue line items. For more information regarding opportunities and revenue line items, please refer to the Opportunities with Revenue Line Items documentation.

Each opportunity record needs at least one related revenue line item record. Opportunities created via import must have revenue line items created which can also be accomplished via import. This article will cover how to import revenue line items into Sugar and simultaneously relate them to opportunity records.

For more information about enabling or disabling revenue line items please refer to the Opportunities Configuration documentation.

Prerequisites

  • Your instance must already have "Opportunities and Revenue Line Items" enabled via Admin > Opportunities. 
    Oppsrli
  • You should have opportunities ready to import or opportunities already existing in Sugar to which you wish to add revenue line items.

For more information on importing in Sugar, please refer to the Import documentation. 

Steps to Complete

The sections below cover how to import opportunity records, obtain the opportunity ID, prepare the revenue line item import file, and import the revenue line items. If you already have opportunity records in Sugar to which you wish to add revenue line items using import, please proceed to the Obtaining the Opportunity ID section of this article.

Importing Opportunities

  1. Select "Import Opportunities" from the Opportunities module tab menu.
    importopps
  2. In Step 1, click the Choose File button to open a file selection window. Select your opportunities import file, select the radio button labeled "Create new records only", then click "Next".
    Opportunities_Import_ChooseFile
    Note: You can download the import file template in order to get the appropriate header rows for all available fields in the Opportunities module, as well as sample data showing how the information in the file should be formatted.  
    Please keep in mind that the Amounts (Best, Likely, Worst), Expected Close Date, and Status fields are calculated values based on the related revenue line item(s), so any data entered for these fields on the import file will not populate in the opportunity's record view.
  3. To complete the import, please follow steps 5-22 on the Importing New Records section of the Import documentation. 

Once the import is completed, the new records will appear in the Opportunities list view.
newopps

Obtaining the Opportunity ID

You must obtain each opportunity's database ID in order to relate it to the new revenue line items. This ID will then need to be added to the revenue line items import file. You can gather the relevant opportunity IDs by exporting from a report or exporting from the Opportunities list view.

Exporting Via Report

  1. Select "Create Report" from the Reports module tab menu.
    report
  2. For the first step in the report wizard, click "Rows and Columns Report".
    Reports_RowsandColumnsType
  3. Next, select "Opportunities" as the target module.
  4. On the Define Filters page, click "# of Total Revenue Line Items" from the Available Fields list and select "Equals" as the operator. Then, set the value to "0" in order to retrieve all opportunity records with no related revenue line items. Click "Next" to continue.
    uploadfile?format=sugar-html-json&platfo
  5. On the Choose Display Columns page, click on "Opportunity Name" and "ID" from the Available Fields list to add them as columns on the report. Click "Next" to continue.
    Reports_ChooseDisplayColumns
  6. On the Report Details page, enter a name for the report and then click "Save and Run" to view the report results.
  7. Select "Export" from the Actions menu to generate a CSV file.
    Reports_Export

Exporting Via List View

  1. Navigate to the Opportunities list view by clicking the Opportunities module tab.
  2. Use the module search to find the Opportunity records you wish to export.
    Note: For more information on performing a search and creating search filters, please refer to the Search documentation. 
  3. Select the desired opportunity records by clicking the checkbox to the left of the record's row. Then click "Export" from the Actions menu to generate the CSV file.
    export  

When you open the new CSV file in Microsoft Excel or another spreadsheet application, you should see a column labeled "ID" which contains the database ID of each opportunity. These are necessary before moving forward to the next section.

Preparing the Import File

Once you have the opportunity ID numbers, you will need to create a new CSV file for importing the revenue line items. You can download the import file template from the import wizard via the Revenue Line Items module. Simply remove the sample rows and help text from the import template, then enter the appropriate data (e.g. name, amounts, expected close date, etc.) in the columns for each revenue line item record. You can remove any columns which you do not wish to import. For this example, we reduced the import file to only include the following fields: Revenue Line Item, Amounts (Best, Likely, Worst), Expected Close Date, Sales Stage, and Opportunity ID

Copy and paste the appropriate database ID from the exported opportunity file into the Opportunity ID column so that each revenue line item is related to the correct opportunity record. When the file is ready for import, save it to your local machine.
RLI_ImportFile2

Importing Revenue Line Items

Once you have prepared the revenue line item import file, including an opportunity ID for each row, you can now import the revenue line items into Sugar. They will automatically be related to the correct opportunity records based on the database IDs entered in the Opportunity ID column of the spreadsheet.

  1. Select "Import Revenue Line Items" from the Revenue Line Items module tab menu.
    importrli
  2. In Step 1, click the Choose File button to open the file selection window and select the import file you saved to your local machine. Then, select the radio button labeled "Create new records only" and click "Next".
    RLI_UploadFile
  3. In Step 2, confirm that the file is being read correctly and click "Next".
  4. In Step 3, map any necessary fields. Since we used the import file template for this example, the header row should automatically map to the correct fields in Sugar. Click "Next".
    RLI_ConfirmFieldMapping
    Note: All required fields are marked with an asterisk (*) in the Module Field column and must include valid data in order for the import to be successful.
  5. In Step 4, click "Import Now" to start the import process.
  6. Once the import is complete, the View Import Results summary will display the number of records that were created successfully, as well as any errors that were detected. Review the results on this page and resolve any errors as needed.
    Note: The related opportunity record will display in each revenue line item's Opportunity Name column. You can open the revenue line item and opportunity record views by clicking the record's name (e.g. King Software Inc - 130) on the summary page.
  7. Click "Exit" to complete the import process.
    RLI_ImportSummary1

Application

Once the revenue line items have been imported, navigate to the Opportunities module and open the record view for one of the related opportunity records (e.g. AtoZ Co Ltd- 300 Units). You will notice that the amounts (e.g. Best, Likely, and Worst), Expected Close Date, and Status fields are now populated based on the corresponding fields in the related revenue line item record.
opprec
Also, when you scroll down to the Revenue Line Items subpanel, you should now see the imported revenue line item(s) that were associated to the opportunity record during import. To view the revenue line item's record view, simply click the record's name in the subpanel.
rlisubpanel

 

HaiyinQ