How to simplify importing Opportunity Products in Salesforce using Managed Import

Importing Opportunity Products


After reading this article, you’ll be able to:

  • Identify the advantages of using “Managed Import” to import Opportunity Products.
  • Create an object and field mapping in SimpleImport for Opportunity Products.
  • Add and configure the Managed Import component to an Opportunity Record Page.
  • Test Managed Import.

Why use Managed Import to import Opportunity Products?

We here at ProvenWorks understand that Products added to an Opportunity are often managed in external systems, so importing this data into Salesforce is crucial. But with our 10 years+ experience of dealing with importing data into Salesforce, we also understand that importing can come with its own headaches… That’s where Managed Import comes in.

Managed Import, part of SimpleImport Premium, can drastically optimize importing Opportunity Products to Opportunities within your Salesforce organization by allowing you (and your users) to upload the file on an Opportunity record page itself. Managed Import then does all the hard work for you by inserting all the Products from your file directly to the viewed Opportunity – there’s no need to map fields every time, or source record IDs. This not only saves you time, it also prevents user error.

It requires a one-time setup that then allows users to rinse and repeat, time and time again, saving on average over two minutes for every file imported.

Like the sound of Managed Import? Get in contact with us and we’d love to show you around SimpleImport. If you’ve already got SimpleImport, keep reading!

Create an object and field mapping

The following steps assume that you have active Products with Price Book Entries. Also, the Opportunities we will use in this example will already have a Price Book selected.

Before the component can be placed onto any Lightning page, it requires a pre-defined mapping which contains reference to the object and fields that the user will be importing into. Using SimpleImport Premium, this process is made effortless.

As we’ll be importing Opportunity Line Items, let’s take a look at this object in more detail. This will help us create a mapping.

The object has four mandatory fields so these must be configured in our mapping. Here’s a handy description of what data should be fed into these fields:

  • Opportunity – the Opportunity record that the product will be associated with.
  • Product – the Product that will be added. This can be an ID, or Product Name if they are unique in your Org.
  • Quantity – the quantity of the Product being added to the Opportunity.
  • Sales Price – the price of the Product, per item.

Note: Total Price on the Opportunity Line Item record is a calculation of Quantity x Sales Price and is processed automatically during upsert.

Now we know what fields are required, let’s create a template file which we will use to create a mapping. To create a mapping, the file must contain field names in row 1 and at least one row of import data in row 2.

Create a template file

  1. Create a new spreadsheet file and populate row 1 with each of the four mandatory fields noted above.
  2. In the first cell underneath Opportunity, add the {!Record.Id} tag.
  3. In the first cell underneath Product, add either the Product Name or ID. This product must be Active and have a Price Book associated with it.
  4. In the first cell underneath Quantity, enter a value.
  5. In the first cell underneath Sales Price, enter a value.
  6. Save the file to your computer.

Generate a mapping

Now that we have a template file, we need to configure the file within SimpleImport and generate a mapping.

  1. From the App Launcher, find and select SimpleImport.
  2. Upload the created template file by using either the drag & drop functionality or click to upload.
  3. Once the file has uploaded, select the Import to Salesforce button.
  4. In the Object Selection master picklist, choose Opportunity Product (OpportunityLineItem).
  5. Click Continue.
  6. Select Insert and Continue to the mapping page..

The field mapping page now allows us to choose the destination fields on the Opportunity Line Item object. Selecting the edit icon on each row under the Object fields section will open the field finder. Each field in the field finder will be structured in the following way:

Field Name | External ID Field (if applicable) | Object

  1. For Opportunity, map Opportunity ID (OpportunityId) | Opportunity ID (Id) | OpportunityLineItem.
  2. For Product, map Product ID (ProductId2) | Product Name (Name) | OpportunityLineItem.
  3. For Quantity, map Quantity (Quantity) | OpportunityLineItem.
  4. For Sales Price, map Sales Price (UnitPrice) | OpportunityLineItem.
  5. Now that the mapping is correctly configured, use the Save Mapping button and name the mapping.

Note: If you are using a Product ID to reference products in your import, use Product ID (ProductId2) | Product ID (Id) | OpportunityLineItem instead.

With the mapping saved, we must now activate it and locate the ID for use with the Managed Import component. Use the Preferences button at the top of the page and scroll down to the Mapping List section to locate the mapping you saved.

Make note of the Mapping ID found in the second column as this will be used in a moment.

Add the Managed Import component to your page

With a mapping now activated, we want to place the Managed Import component onto the Opportunity Record Page so that our users can import their products whilst looking at the Opportunity.

In Salesforce, navigate to Setup and select Lightning App Builder from the setup menu.

If you already have a custom Lightning Page for your Opportunity, select Edit next to it. Alternatively, select New and follow the steps through to create a new record page. This org already has one created so we will edit Opportunity Record Page.

From the Components menu on the left of the screen, search Managed Import and drag it onto your layout. You will initially see that ‘Managed Import is invalid’ but this will change with later configuration.

If you can’t see Managed Import from the list, check that you have My Domain enabled and deployed to your users.

Once the component has been placed, click on it. The design parameters menu will appear on the right of the screen. In the Mapping ID field, enter the Mapping ID captured in the previous section.

You can edit the button and title text to meet your requirements and a text area is provided to add any comments to the component.

Now, remember when we used the {!Record.Id} tag in our file? We want to tick the ‘Pass current record ID into this import’ box which enables passing the current page’s record ID to the job which is then used in the {!Record.Id} tags in the file. This is how we associate the products with the Opportunity record that the user is currently viewing. It removes the requirement for the user to copy a record ID into the file every time they want to add related records to an existing opportunity. In short, this will save users time and prevent user error!

Find out more about using the record ID tag here.

Press Save and Activate to confirm your changes to the page layout and now it’s ready go!

Testing out the Managed Import component

If you’re this far, well done! We’ll now need to test the component to make sure it works as expected.

Go to an Opportunity record where you want to import the Opportunity Line Items. If you don’t see the component, you may be required to clear your browser’s cache before it becomes visible.

Click the button in the component to open up the Managed Import modal.

Use the Upload File button or drag the file for importing into the modal.

Managed Import will now go to work processing the file and extracting the data to insert it into your organisation. You can follow the progress via the path available at the top of the window.

Once the path hits Finished, you should see the summary in the component such as Inserted 5 Opportunity Product.

To review the successful rows, use the drop down action and select Download success file.

If errors are generated during the import operation due to validation rules or Salesforce exceptions, use the drop down action to reveal a Download error file option. This will produce a CSV highlighting the failed rows. A new column will be provided stating the Salesforce exception which resulted in the failed attempt. Once these errors have been rectified in your Salesforce environment, you can try again.

For the final check, close the Managed Import modal and review Products in the Related section on the Opportunity. You will see the inserted products and sale price of any Opportunity Line Item file that was imported.

And that’s it! You can use the component over and over on each of your Opportunities without any need to remap any fields. When you’re ready to deploy the component to your users, be sure to check out our How to: deploy SimpleImport and Managed Import to users in your organization.

Still have questions?

Contact us via email and our team will be more than happy to answer any queries:

Book a free demo

How we used IndustryComplete for Salesforce during the COVID-19 pandemic to optimize our business strategy

We eat our own dog food. Here’s a customer success story with a twist… because it’s our own story!

We eat our own dog food. Here’s a customer success story with a twist… because it’s our own story!

The COVID-19 pandemic has hit many industries hard. According to the UK Office for National Statistics, some of the worst affected industries such as accommodation, retail and food services shrank by as much as 90% in the opening months of the financial year 2021 (FY21).

Although the technology sector was less acutely impacted by the pandemic than many other industries, at ProvenWorks we have clients across the most adversely impacted sectors. It was important that we tailored our approach in FY21 in order to meet our customers’ needs. By using IndustryComplete for Salesforce, we were able to do just that!

In fact, we made FY21 our most successful year to date.

So what happened? And how did IndustryComplete help our business not just survive but thrive during COVID-19?

ProvenWorks before COVID-19

Before the pandemic, we based our renewals targets and forecasts on gut feel rather than data. We managed with this heuristic approach, despite our forecasts not always being as accurate as they potentially could be.

When notifying our customers about their upcoming renewals, we gave all of our clients the same notice before their licenses were due to expire, regardless of the industry in which the client operated.

The pandemic creates global business uncertainty

When the business world was shaken up by COVID-19 in early Spring 2020, many of our clients, particularly in sectors such as hospitality and retail, were understandably struggling with cash flow.

Suddenly, gut feel predictions based on clients’ previous purchasing behaviour were no longer sufficient to accurately forecast renewals revenue. Also, our blanket notice period before a customer’s license expiry date may have become inadequate for clients to gain purchasing approval due to procurement constraints.

As a consequence, we experienced fresh challenges in managing our own cash flow, quantifying the necessary investment in lead generation in order to hit sales targets, and assessing the time that renewal opportunities would take to close.

An industry data-enabled solution

We realized that the solution to overcoming these obstacles was right there — Salesforce industry data!

1. Our existing industry data was ready to work with

By ‘eating our own dog food’ and harnessing the power of IndustryComplete in our Salesforce org, we have always ensured that we have accurate and standardized industry values across our accounts.

Thanks to IndustryComplete, adding industry data to our accounts has been quick and painless. We have customised our org using the IndustryComplete component so that only those industries that contain specific keywords appear on the industry search. This way, when a member of our ProvenWorks sales team identifies a hot new lead and creates an account in our Salesforce org, they can be certain that they’ve selected the right industry value in no time at all.

2. We could quickly adjust and add additional industry values

What’s more, we have capitalized on IndustryComplete’s new feature of allocating a primary industry value to those accounts which operate in multiple sectors. This feature has been so useful during the pandemic as businesses are forced to diversify to survive. For example, we were able to re-prioritize the industry value for a firm that used to earn the majority of its revenue in the Retail industry, but now earns the bulk of its revenue in the Electronics industry. This account now appears with an industry value of ‘Electronics’ on our renewals reports.

3. We could predict renewals income based on exact industry distribution

We used our account industry data to more accurately forecast our customers’ likelihood of renewal and therefore our own guaranteed renewal income. Our greater understanding of our cash inflow meant that we could fine tune our budget across the business, including budgeting for acquiring new customers.

4. We could better support clients in struggling industries

We were able to alter our renewals approach for our clients in struggling industries, understanding that their purchasing processes may have been impacted by the pandemic. By giving these customers longer notice before their licenses expired, we were able to keep our renewal rate high and maintain our commitment to customer success.

Moving forward with IndustryComplete

As optimism starts to emerge in the business world once again, we plan to further utilize industry values in our reporting and analysis. Whether it be through investigating retention rates by industry, analysing sectors with opportunities for sales growth or identifying industries in which to launch targeted marketing campaigns, IndustryComplete has enabled us to shape our business strategy more concretely around industry data.

I’ve got a question about IndustryComplete?

Get in touch with us via email here! Our team is more than happy to answer any queries:

A little bonus…

If you made it this far… congratulations! Why not stick around for one more minute, enjoy your coffee and find out a little bit more about IndustryComplete? Watch our video.

5 ways our new Managed Import UI makes importing into Salesforce even easier

We’ve given SimpleImport’s Managed Import Lightning component a new look with a redesigned user interface.

We’ve given SimpleImport’s Managed Import Lightning component a new look with a redesigned user interface

We’ve given SimpleImport’s Managed Import Lightning component a new look with a redesigned user interface. The new Managed Import component is easier to use than ever before with the ability to import your records in just two clicks via any configured Lightning Page or Community Cloud Digital Experience.

Let’s take a look at the new Managed Import component in action.

1. Designed for quick user adoption

Built on the Salesforce Lightning Design System, the new interface results in quicker user adoption as the solution is presented with hand-picked elements, carefully placed to feel natural to the end user.

2. Track your import progress

Introducing automated Path Progression! The live path updates so that import progress bars and dynamic results present exact information as the import is taking place. Say goodbye to the endless looping loading wheel and remove the guesswork of how long your import job has left

3. No more hyperlinks!

We’ve added dedicated actions for downloading result files and reverting an import. Import mistakes can now be reverted through the press of a button. No more hyperlinks – goodbye 2000s!

4. Responsive sizing

Whether you’re big or small, we’ve got your back (for clarity, we’re talking about your screen size). The responsive design now means the component looks great in any shape and size!

5. Perfect for Salesforce Digital Experiences

Did you know our Managed Import component supports Digital Experiences (formerly known as Communities)? The new user interface is streamlined, sleek and succinct which means this user-friendly interface is ideal for all of your partner-facing import needs!

How do I update my Managed Import component?

All you have to do to enjoy our new Managed Import interface is update SimpleImport to the latest version. Install the latest version of SimpleImport or try it for yourself here.

I want to try out Managed Import for myself!

Great news! Managed Import is a feature of SimpleImport Premium. Try it today for free on the AppExchange.

I’ve got a question about Managed Import?

Feel free to contact us via email, our team is more than happy to answer any queries:

Improve efficiency by importing related records with Record ID Merge: Managed Import for Salesforce

What’s a “Record ID Tag” in Managed Import for Salesforce?

If you’re already familiar with Mail Merge functionality in mass emailing services, then you may already grasp what a Record ID Tag is, and if not, then don’t worry, we’ll cover it all here!

The Record ID Tag lets you create a file for import that contains a dynamic reference to a Salesforce Record ID. This is automatically fed to the import job by our Managed Import component at the point of use.

For example, the component can be placed onto an Account’s record page and can pass through the current Account’s ID. This allows you to import related Contacts without the need to copy the Account’s record ID into the file

Why is the Record ID Tag so good?

Managed Import’s main focus is to save you time on repetitive tasks. A very common repeat task is inserting related records. This can be importing Contacts to existing Accounts, or importing Opportunity Line Items into existing Opportunities.

In a time before the Record ID Tag functionality, users would have to specify an ID for the related record in the file. An example can be seen below.

Each time you configure a file to do this, you have to ask yourself:

  • Do my users know how to get a correct ID?
  • Am I sure they’ve entered the right ID?
  • How much time are they spending fetching the IDs?

But now with Record ID Tags, all these questions are answered. The ID column’s cells simply need to contain {!Record.Id} and Managed Import does all the hard work!

Where can I use the Record ID Tag?

The Record ID Tag has two options available and is configured when adding the component to your desired destination:

  1. Pass custom record ID into this import – specify an 18 character record ID into the text field provided. The job will then use this value in the {!Record.Id} cells. This can be useful if using the component in a Salesforce Screen Flow but is available wherever the component is placed.
  2. Pass current record ID into this import – this requires the Managed Import component to be placed onto a Lightning Record Page. When viewing the record in Salesforce, the ID will then be passed to the job automatically!

Can I convert my existing mapping to use the Record ID Tag?

Yes! Firstly – ensure your SimpleImport package is up-to-date with the latest version from the AppExchange – this will guarantee you have these settings available for use.

Update your existing file that is being distributed to your users by replacing the ID column with {!Record.Id}. If the column is empty for your users to fill in, populate this column for them. Do not change the column header as this will invalidate your mapping!

Edit your existing Managed Import component to use either of the settings described in “Where can I use the Record ID Tag?” and save!

Can I only add related records with the Record ID Tag?

No – you also have the ability to update the record you are currently viewing or a record specified in the custom record ID field.

How do I try the Record ID Tag for myself?

The Record ID Tag is part of our Managed Import component which is a feature of SimpleImport on the Salesforce AppExchange. Try it today for free!

For Community and Experience use cases, check out our dedicated Managed Import for Communities listing!

Provide an Address Status to the Nonprofit Success Pack (NPSP) Address Object and display it on related Household Accounts and Contacts

This article covers how to add an “Address Status” field to the NPSP Address object and display it on Household Accounts and Contacts.

By treating the Address object as the “true source” of address information, this is where the custom field belongs. Creating formula fields provides your Org with the functionality it needs to view the custom field data when looking at the Contact or Account record.

This specific use case covers displaying the Address Status field provided with the AddressTools Premium managed package but the following steps can be followed to implement other custom fields added to the Address object.

Adding a Custom Fields to the Addresses Object

As this guide covers the Address Status field provided with AddressTools, we need to add a new field to the Address object.

Create a new field on the Addresses object:

  • Type: Picklist
  • Name: Address Status
  • API Name: AddressStatus (this can be customized to your requirement)
  • Values: Not checked, Not matched, Parsed but not found, Ambiguous, Corrected, Verified.
  • Restrict picklist to the values defined in the value set: False.

If you are following this guide for configuration with AddressTools, see this article to complete an AddressTools implementation on the Address object.

In AddressTools context, any Address Status other than Corrected or Verified are considered “bad addresses” and need reviewing before sending mail.

Creating a Formula on the Contact to Display the Address Status for the Current Address

For Contacts, the Nonprofit Success Pack provides a “Current Address” lookup field which refers to a matching Address record. We will use this lookup to display the Address Status.

Create a new lookup on the Contact object:

  • Type: Formula
  • Name: Address Status Formula
  • Formula Return Type: Text
  • Select Next to enter the formula.

Enter the following formula:

  • TEXT(npsp__Current_Address__r.AddressStatus__c)

Note: ensure the field API name matches what was created in the previous section and TEXT() is only used for picklist fields.

  • Select Next to Establish field-level security.
  • Select Next to Add reference field to Page Layouts
  • Select Save.

Creating a Lookup Field on the Account to Reference the Default Address

For Household Accounts, the Billing Address refers to the Address record where the Default Address equals True. This identifies the address record to fetch the Address Status from.

The Household Account does not have a lookup field as found in the Contact object, so we need to create a custom one.

Create a new field on the Account object:

  • Type: Lookup Relationship
  • Related To: Address
  • Field Label: Default Address
  • Field Name: DefaultAddress (this can be customized to your requirement)
  • Select Next to Establish field-level security.
  • Select Next to Add reference field to Page Layouts.
  • Select Next and uncheck Add Related List.
  • Select Save.

With the lookup field created, it needs to be automatically populated with the default address.

Populate the Lookup Field on the Account to Reference the Default Address

Create a new Process Builder by going Setup | Process Automation | Process Builder | New.

  • Process Name: Update Parent Account with Default Address
  • API Name: autofill
  • The process starts when: A record changes
  • Select Save.

Choose Object:

  • Object: Address
  • Start the process: when a record is created or edited
  • Select Save.

Add Criteria:

  • Criteria Name: When Address Is Default
  • Criteria for Executing Actions: Conditions are met

Set Conditions:

  • Field: Default Address
  • Operator: Equals
  • Type: Boolean
  • Value: True
  • Select Save.

Add Action:

  • Action Type: Update Records
  • Action Name: Update Parent Account – Record Type: Select a record related to the npsp__Address__c – Type to filter list…: Account
  • Choose
  • Criteria for Updating Records: No criteria—just update the records!

Set new field values for the records you update:

  • Field: Address
  • Type: Field Reference
  • Value: npsp__Address__c > Record ID
  • Save.
  • Active the process builder.

Note: A mass update will have to be run on the Address object to update existing records. You can use a data loading solution such as SimpleImport Premium to complete this job.

Creating a Formula on the Account to Reference the Address Status for the Current Address.

Create a new lookup on the Account object:

  • Type: Formula
  • Name: Address Status Formula
  • Formula Return Type: Text
  • Select Next to enter the formula.

Enter the following formula:

  • TEXT(DefaultAddress__r.AddressStatus__c)

Note: ensure the field API name matches what was created in the previous section and TEXT() is only used for picklist fields.

  • Select Next to Establish field-level security.
  • Select Next to Add reference field to Page Layouts
  • Press Save.


Your Organization will now have a field on both the Contact and Account referencing the Address Status value stored on the Address record. By leveraging Automated Address Verification in AddressTools, this address status will update automatically removing any requirement for end-user interaction.

Like the sound of AddressTools?

AddressTools is our 5* app for Salesforce which takes the worry out of bad address data by keeping all of your addresses validated, verified, corrected, and standardized. Like the sound of it? Try it for yourself on the AppExchange!

To find out more about how AddressTools Premium can improve the Nonprofit Success Pack, please do get in touch!