Getting Started

Building Blocks

Subscription Features

Localization

Invoices

Credits

Billing Features

Taxes

Payment Methods

Direct Debit Payments

Configuring Gateways

Fraud Management

Hosted Pages

Attach Additional Data

Migration

Open Source Resources

Other Features

API Integration

Third Party Integrations

Bulk Operations 

You can import sizeable volumes of your subscription billing data into Chargebee using the Bulk Operations feature.

By uploading the required information in CSV format, you could import subscription information, customer information, and other billing information or update them.

You could also use this feature to import such information into Chargebee from another system.
You could also check operations performed till date by you and other users, and their respective status.

Overview 

Here's the procedure in a nutshell:

  1. Select the operation you want to perform
  2. Download the sample CSV file and replace the content with your data
  3. Upload the file after adding your data
  4. Chargebee will validate the CSV file. If errors are found, you will be notified about the same. Fix the errors and upload the data file again.
  5. Chargebee will initially process the first 3 valid records when performing a Bulk Operation in your LIVE site. This is so you could review the imported records before proceeding to import the remaining records.

Available Bulk Operations

You can perform bulk operations for the following Chargebee components:

  • Subscriptions
  • Customers
  • Invoices
  • Orders
  • Transactions
  • Plans
  • Addons
  • Coupons
  • Addresses
  • Comments

Perform an Operation 

To perform a Bulk Operation, go to Settings > Bulk Operations > Perform an Operation.
Select the operation that you'd like to perform.

"
Information

We recommend trying out major operations such as creating, importing or updating subscriptions in your Test Site before actually performing these operations in your Live Site.

Chargebee will require you to go through a set of steps to complete the selected operation:

Step 0: Prepare the data file

A sample CSV file is available to download and use:

"

This file will contain sample records that you can replace with your own records. Note that the data needs to be added to the sheet in the same format the sample data is in.

"
Note
  1. All date/time values filled should be in the yyyy-mm-dd hh:mm:ss format
  2. Chargebee uses the UTC timezone, so time specified in the sheet is considered as UTC.
  3. The column headers in the CSV should not be edited as the system will look for these fields during data validation (Step 3) and editing them will generate errors.
  4. When opening the sample CSV file using applications such as MS Excel or OpenOffice Calc, the column type used should be "Text". So ensure that the column data type remains "Text". Changing the column type could possibly affect data in columns with numbers such as dates, IDs, address, and phone numbers.

Once you've added all the information and the data file is ready, upload it.

Step 1: Upload CSV


Drag and drop your data file into the web interface or upload it:

"

Step 2: Configure your preferences

Specify your preferences on how Chargebee will perform certain actions when the Bulk Operation is underway:

  • Disable Webhooks: If you're an API user, you might be using Chargebee's webhooks to notify your system of any events that occur in your Chargebee account through the webhook URL.

During a Bulk Operation, events will be generated and if you want to keep your system in sync with Chargebee, you shouldn't disable the webhooks. But if you do not want the corresponding webhooks to be sent to your system, turn them off.

  • Disable Email Notifications: If you've enabled Email Notifications in Chargebee and you are performing an operation (such as creating new subscriptions) that could trigger one of the enabled email notifications, your customers might receive an email notification.
Note

We recommend that you check this option so your customers do not accidentally get an email.

  • Advanced Transformations: If your data file is in a format that is different from the format provided in Chargebee's sample CSV file and you would like to transform it to the recommended format with minimal effort, use this option. Contact support@chargebee.com  and we will provide you with the JSON code that you need to paste in Advanced Transformations textbox.
"


Once you have configured your preferences, click Continue to validate the uploaded CSV file.

Note

For operations such as creating new Subscriptions or Customers, if there are email addresses present, the addresses will be masked to avoid accidentally emailing customers. This is done only in your Test site. When the operation is performed in the live site, the correct email addresses will be used.

"

The validation time depends on the number of records that need to be processed. During validation, the most recently found errors will be listed as shown below:

"

You could go to a different tab and come back to this page later. Once the validation is complete, you will be notified via email. You can then come back and continue with the operation.

Step 3: Confirm Operation

Review the results of the validation:

A. If Chargebee does not find any errors, proceed with the operation. When doing this in your test site, you will have the option to wipe out all the existing Subscription data before performing the operation.

Note

Chargebee will carry out another check for errors in the file during the final step of the operation.

"

B. If there are errors in the data file, you could either choose to fix the errors and upload another data file or skip the rows with errors and continue with the operation.

Click How do I fix this? to view the last 10 errors.

"

This section will also provide you with the options to download the validated file and to upload a corrected file.

Validated File: The validated CSV file will have an additional column (cb_validation_errors) added at the end of the sheet. This will contain details of the errors for the rows with issues in them.

"

The error content will indicate the column name(s), value(s) present, and what the errors are.

Error Parameters

paramName - column header name
paramValue - value present in the cell
columnReferenceHeader - column label
errors - error message

Sample Error

[{"paramName":"subscription[plan_id]","paramValue":"gold_plan","columnReferenceHeader":"B","errors":["The gold_plan referenced in parameter subscription[plan_id] is not present "]}]

In this error, subscription[plan_id] is the column header name and the value in the cell is gold_plan and this is in column B. The second part of the error message says that the plan id specified is not present. To fix this, edit the cell and enter the correct plan id.

Similarly, check all the rows that have errors in them and correct them.


After you've corrected all the errors, save the file and upload it again. This will take you to Step 2 and you can resume the operation.

Step 4: Processing

This is the final step where the data file is validated again to ensure a smooth import and the operation is performed. The completion time depends on the number of records that need to be processed. You could go to a different tab and come back to this page later.

If you're performing a Bulk Operation in your TEST site, all the successfully validated records will be processed. However, if you're doing it in your LIVE site, only the first three valid records will be processed. This is to ensure that you can review the data once before the remaining records are processed.

Click the records to view the imported data. For example, if you have imported subscriptions, clicking the records would display the Subscription details page for that record. Once you're ready, check the option YES, I confirm that the records have been processed correctly and click Process remaining records.

"

Once the operation is complete, a success message will be displayed as shown:

"

You will also be notified via email.

If there are any errors during the operation, you will be able to download the data file with the list of rows processed and the ones with errors. There will be 2 additional columns (cb_validation_errors and cb_operation_status) at the end of the sheet, containing details of the rows having errors and details of rows that were completed/skipped. You could correct the rows that had errors and repeat the operation from Step 1.

Operations Log 

Go to Bulk Operations > Operations Log to view a log of all the operations performed along with the status:

"

Click a log entry to view more details. You will have the option to download the data file that was uploaded. If you have navigated to a different page in and the file has been validated, you will have an option here to resume the operation:

"

Contact support@chargebee.com  if you're unsure at any step of the operation.

Loading…