Bulk Importing and Exporting B2B Companies
The bulk import and export feature lets you create or update multiple B2B companies at once using a spreadsheet, rather than entering their information individually. For example, when migrating to SHOPLINE from another system, you can export thousands of company records from your previous system, organize them using the import template, and import them in a single file. This creates the companies, their main contacts, and company locations at the same time.
This guide explains how to prepare for an import, fill out the import template, bulk import new companies, check import results, bulk update existing companies, and export company data.
Preparing to Bulk Import B2B Companies
Before importing B2B companies in bulk, make sure the following requirements are met:
- Permissions: Your staff account must have permission to access companies. Without this permission, the Import and Export buttons won't appear on the Companies page.
- File format: Only .xlsx and .csv files are supported.
- File size: Each file must not exceed 10 MB.
- Number of rows: You can import up to 5,000 rows at a time. Each row represents one company.
- Company limit: A store can have up to 5,000 companies. If the total number of companies after the import exceeds this limit, any companies exceeding the limit will fail to import.
Bulk Importing New B2B Companies
To create B2B companies in bulk using a spreadsheet:
-
From your SHOPLINE admin panel, go to Customers > Companies, and click Import in the upper-right corner.
-
In the Import companies pop-up, click company import template to download the template.
- Fill out the company information according to the template and save the file. For details, see the "Filling Out the B2B Company Import Template" section.
- Return to the Import companies pop-up. Click the Upload a file (or drag and drop) area to select your file, or drag the file directly into the area.
- Click Import from Excel.
The system first checks the file format, size, number of rows, and column headers. If the file doesn't meet the requirements, an error message appears in the pop-up. Follow the instructions to correct the file and upload it again.
Once the file passes validation, the import runs in the background. You can close the pop-up and continue with other tasks.
Filling Out the B2B Company Import Template
The first row of the import template contains the field names. Don't modify or delete it. Starting from the second row, enter one company's information per row. All fields except the company name can be left blank as needed, subject to the conditional requirements listed below.
| Field | Required | Description |
| Company Name | Required | The company name. Company names must be unique within a store. |
| Contact Email | Optional | The main contact's email address. It must be in a valid email format. |
| Contact Phone | Optional | The main contact's mobile number. Include the international dialing code, for example, +12120134567 or 0012120134567. |
| Contact First Name | Optional | The main contact's first name. |
| Contact Last Name | Optional | The main contact's last name. |
| Accepts Email Marketing | Required if an email is entered | Whether the contact accepts email marketing. Enter yes or no. |
| Accepts SMS Marketing | Required if a phone number is entered | Whether the contact accepts SMS marketing. Enter yes or no. |
| Company Location Name | Optional | The name of the company location, for example, "Main Warehouse." If left blank, the company name is used as the location name. |
| Shipping Address1 / Shipping Address2 | Optional | The first and second lines of the shipping address. Use the second line for additional details, such as the floor or unit number. |
| Shipping City | Optional | The city of the shipping address. |
| Shipping Province / Shipping Province Code | Optional | The name and code of the province or state of the shipping address, for example, Ontario and ON. |
| Shipping Country / Shipping Country Code | Optional | The name and two-letter code of the country or region of the shipping address, for example, Canada and CA. |
| Shipping District | Optional | The district of the shipping address. |
| Shipping ZIP | Optional | The postal code of the shipping address. |
| Shipping Phone | Optional | The shipping contact phone number for this location. |
| Billing Address1 to Billing Phone | Optional | The billing details. Complete each field using the same format as the corresponding shipping address field. |
| TAX ID | Optional | The tax ID of the company location, for example, a VAT number. |
|
Notes:
|
How B2B Companies and Contacts Are Processed During Bulk Import
During the import, the system processes each row according to the following rules:
- Duplicate company names: If a company with the same name already exists in your store, the row fails to import. If multiple rows in the same file have the same company name, only the first row is imported, while the remaining duplicate rows fail.
- Company locations: The system creates one location for each company using the location name, shipping address, billing address, and tax ID provided in that row. If the location name is left blank, the company name is used by default.
-
Main contacts: The system searches for existing customers in your store using the contact's email address or phone number and handles them as follows:
- Customer doesn't exist: The system creates a new customer and assigns them as the company's main contact.
- Customer exists and isn't associated with any company: The system assigns the existing customer as the company's main contact.
- Customer is already associated with another company: The system leaves the customer's existing company association unchanged. The new company and location are still created, but no main contact is assigned.
- Failed rows: A row that fails to import doesn't affect other rows. Successfully imported companies are retained.
| Example: An import file contains three rows with the company names Acme, Acme, and Beta, and a company named Beta already exists in your store. Only the first Acme row is imported successfully. The second Acme row and the Beta row fail because their company names already exist. |
Checking B2B Company Import Progress and Results
Importing companies may take some time. While an import is in progress, a banner appears at the top of the Companies page. Once the import is complete, the banner disappears after you refresh the page.
You can check the import progress and results in the following ways:
-
Bulk processing progress: Click Bulk processing in the banner to view the import status and download the import results or failed records.
- Email notification: Once the import is complete, the system sends a notification email to the staff account that initiated the import. The download link in the email is valid for 48 hours. After it expires, you can download the file from Bulk processing progress.
The failed records file contains the original data you uploaded, with an additional Error Message column explaining why each row failed. You can correct the failed rows directly in this file, delete the Error Message column, and import the file again.
The following table lists common error messages, their causes, and how to resolve them.
| Error Message | Cause | How to Fix |
| The company name cannot be empty | The company name is missing. | Enter the company name. |
| The company name exceeds the maximum length; please shorten it to {x} characters | The company name exceeds the character limit. | Shorten the company name as prompted. |
| The company already exists | A company with the same name already exists in your store, or the file contains duplicate company names. | Use a unique company name. To update an existing company, export its data, edit the exported file, and import it again. |
| Invalid email format | The contact's email format is incorrect. | Check the email address for formatting errors, such as a missing @ symbol. |
| Invalid mobile number format. Please use the international area code followed by the number | The contact's mobile number isn't in international format. | Add the international dialing code before the phone number, such as +1 or 001 for the US and Canada. |
| Email marketing preference is a required field. | A contact email is entered, but Accepts Email Marketing is blank. | Enter yes or no. |
| SMS marketing preference is a required field. | A contact phone number is entered, but Accepts SMS Marketing is blank. | Enter yes or no. |
| Invalid country code; please use a valid two-letter country code, such as US | The country code is invalid. | Use a valid two-letter country code, such as US or CA. |
| Invalid province code; please use a valid two-letter code, such as ON | The province or state code is invalid. | Use a valid province or state code, such as ON. |
| A single store can have a maximum of 5,000 companies; imports exceeding this limit will fail. | Your store has reached the limit of 5,000 companies. | Delete companies you no longer use, then import the remaining companies. |
Completing Company Setup After Bulk Importing B2B Companies
A bulk import creates the company, its main contact, and one company location. To allow B2B customers to place orders for the imported companies, complete the following setup:
- Go to Customers > Companies, and click an imported company to open its details page.
- Add the main contact to the company location. During the import, contacts are added to the company but aren't automatically assigned to its location. Customers must be assigned to a location before they can place orders for it. For details, see the "Editing a Company's Location Detail" section in "Creating and Managing B2B Company Profiles."
-
Check the company's ordering status. The Status column on the Companies page shows whether the company is set to Allow Ordering or Disallow Ordering.
- Configure any additional company location settings not included in the import template, such as catalogs, payment terms, and checkout settings.
| Note: For detailed instructions on these settings, see "Creating and Managing B2B Company Profiles." |
Bulk Updating Existing B2B Companies
To update existing companies in bulk, first export their data, modify the exported file, and then import it again. The exported file includes Company ID and Location ID, which the system uses to identify the companies and locations to update.
Rules and Limitations for Bulk Updating B2B Companies
When updating existing B2B companies in bulk, keep the following rules and limitations in mind:
- Company ID detection: If the file contains a Company ID column, the system treats the entire file as an update operation. Rows without a company ID are skipped, and no new companies are created.
- Blank fields: If a field is left blank in the import file, the system retains the existing data for that field rather than clearing it.
- Location update limit: If a company has multiple locations, bulk updates only support the location created during the initial import. Any additional locations must be updated manually.
- Invalid company ID: If a company ID doesn't exist in your store, the corresponding row fails to import with the error message Company ID does not exist.
Steps for Bulk Updating B2B Companies
To update companies in bulk:
-
Go to Customers > Companies, select the companies you want to update, and click Export.
- In the Export companies pop-up, select the export range and click Export companies. Once the export is complete, go to Bulk processing progress to download the file.
- Edit the company information in the exported file. Don't modify or delete the Company ID and Location ID columns.
- Click Import, upload the edited file in the Import companies pop-up, and then click Import from Excel.
Exporting B2B Companies
You can export all companies, filtered results, or selected companies to a spreadsheet for backup, review, or bulk updates.
To export companies:
- Go to Customers > Companies. If you only want to export specific companies, narrow down the selection using either of the following methods:
- Search for companies by name or location, or switch to the Allow Ordering or Disallow Ordering tab.
- Select the companies you want to export. You can select companies on the current page or use the select-all option to select all companies. Selecting companies across multiple pages isn't supported.
- Click Export in the upper-right corner.
- In the Export range section of the Export companies pop-up, select All companies, All filtered results, or the selected companies.
-
To customize the exported fields, select Custom export fields, then select or deselect fields under Export fields.
- If your companies have metafields, you can also include them in the export.
- Company ID and Location ID are required fields and can't be deselected.
- Click Reset to default settings to restore the default field selection.
- Click Export companies.
Once the export starts, you can go to Bulk processing progress to check its status and download the file. For large exports, the system also sends the file to your staff account's email address.
FAQs About Bulk Importing and Exporting B2B Companies
Q1: Will closing the page or losing my network connection during an import affect the process?
No. Import tasks run in the background, so closing the page won't interrupt the process. If an import is interrupted due to network issues or other errors, successfully imported companies are retained. You can go to Bulk processing progress to download the failed records, correct them, and import the failed rows again.
Q2: Can I associate a contact who already belongs to another company with a new company through an import?
No. If a contact is already associated with another company, the system skips that contact and leaves their existing company association unchanged. The new company and location are still created.
Q3: Can I create multiple locations for one company through an import?
No. Each row represents one company, and the system creates only one location per company during an import. To add more locations, you must create them manually on the company's details page.