Importing Opportunity Records

This article will demonstrate how to properly map fields when importing Opportunity records in order to meet the following criteria:

  1. The imported record should be mapped to an existing account.
  2. The imported record should be mapped to an existing contact.
  3. The opportunity record should be linked to opportunity product(s)

For items 1 and 2, the relations field from Pipeliner needs to be mapped:

Associate the opportunity to an existing account

First, map “ACCOUNT_RELATIONS” with a field from your import file that contains the Account name.  Once it is mapped, click on the “Edit” button to the right of the field mapping.  The “Field Mapping Settings” dialog should show up, click “Edit Expression”.

Once you get the “Expression Builder” dialog, make sure that you have selected the option “SQL Statement” and set the Data Source option to “Pipeliner Database”.

The expression will be a query which will try to find an account with a matching organization name.  The expression typically used is

Select id from accounts where organization = ‘@@accountname’

This is assuming that you have  a field from your import file named ‘accountname’ which contains the account name.

Click “OK” when done.

If you see multiple instances of “Pipeliner Database”, Click Here.


Associate an opportunity to an existing contact record

This is similar to associating to an existing account.  The Contact_Relations field needs to be mapped to an expression that queries the contacts object to get the Id of the related contact.

The expression :

select id from contacts where first_name= ‘@@firstname’ and surname = ‘@@surname’ and is_deleted = 0

The expression above assumes that you have an import field named firstname and surname.  The condition is_deleted = 0 expression makes sure that you don’t get a match from a deleted record.


Associate an opportunity to one or more products

One way is by selecting the “Products” pipeliner field and then clicking on the product name from the lookup value.  If you need to associate multiple products, simply hold down the CTRL key and click on each product that you need to map.  Once satisfied with the selection, click “Map”.

Another way would be to provide the product names from your import file.  In this case, simply map the “Products” field against your import field.  If you need to set the opportunity to be related to multiple products, simply have the product names separated by a comma.

*The product names should exactly match the product names which are in Pipeliner, otherwise, the mismatched product name will not be associated with the opportunity record.

endusersoftware has written 27 articles