Importing billing data using CSV

Many businesses have customers who are invoiced outside their billing system. With a Custom Data Source in Data Platform, you can add these customers and their billing data into ChartMogul so they contribute to all your key metrics. 

This article focuses on how to add billing data using CSV (comma-separated values) files. You can also add billing data manually in Data Platform or using the Import API.


  1. Formatting your CSV file(s)
  2. Uploading your file(s)
  3. Editing uploaded data

1. Formatting your CSV file(s)

In Data Platform, customers and their billing information are separated into the following tabs: Customers, Invoices, Invoice Line Items, Transactions, Cancellations, Subscriptions, and Plans.


The data in your CSV file must be in a specific format. To import billing data using CSV you will need to prepare separate files for each data set: customers, plans, invoices, invoice line items, transactions, and cancellations. 

A sample file for each can be downloaded below. Alternatively, download all sample files as a zip. 

  1. Customers - sample CSV file
  2. Plans - sample CSV file
  3. Invoices - sample CSV file
  4. Invoice line items - sample CSV file
  5. Transactions - sample CSV file
  6. Cancellations - sample CSV file

The column names shown in Data Platform may be different from those in the CSV file. However, it is recommend to use the same column names as in the sample files.

The CSV file should either be in ASCII or UTF-8 Unicode file format. 


2. Uploading your file(s)

CSV files need to be uploaded to a Custom Data Source. To create a new Custom Data Source, go to Data Platform > Data Sources > ADD A DATA SOURCE

Navigate to the required tab in the Custom Data Source. Click IMPORT CSV and upload the corresponding file in the modal window. 




Tip: Please make sure to add plans before uploading invoices, invoice line items, transactions, and cancellations CSV files.

To upload a different type of data, navigate to a different tab. For example, to upload a transaction file navigate to Transactions and then click on the Upload CSV button. A different modal window is shown in this case with an option to upload transactions CSV file.




After the file is uploaded and processed, the data will appear in the Custom Data Source. By default, the data is filtered to the CSV file that was last uploaded. Use the dropdown shown in the image below to filter by a different CSV file or to remove the filter. 



Note: CSV file processing can take some time, depending on the number of rows. 


3. Editing uploaded data

If there is a failure in processing the information or if there are any issues with data entered, you can update the data directly in Data Platform. To edit data, click the Edit icon in the row you want to update. Click the green tick to submit your changes.

Alternatively, you can upload a new CSV file with the correct data. If there is an existing record for a row in the CSV file, then that record will be replaced with the latest data. If there are additional rows in the CSV file, then they will be added as new data. 

Was this article helpful?