Many businesses have customers who are invoiced outside their subscription billing system. With a custom data source, you can add these customers and their subscription billing data into ChartMogul through either our UI or via API integration. If you built your own subscription billing in-house, or want to build your own integration for any reason, then you would also use a custom data source.
This article focuses on how to add your customers and subscription billing data in your custom data source using a CSV (comma-separated values) file.
1. Formatting your CSV file(s)
In the custom data source, customers and their billing information are separated into different tabs, as shown in the image below.
The columns and the data you need to include for each tab is explained in this article - https://help.chartmogul.com/hc/en-us/articles/360012512260.
A custom data source expects your CSV file data to be in a specific format. To import billing data using CSV upload prepare files for each data set - customers, invoices, invoice line items, transactions and cancellations. Please note that these should be separate CSV files with all the required fields. A sample file for each of these tabs can be seen below.
- Customers - sample CSV file
- Invoices - sample CSV file
- Invoice line items - sample CSV file
- Transactions - sample CSV file
- Cancellations - sample CSV file
Currently, we do not support uploading of plans via a CSV file. Plans need to be added using the data platform UI.
Note: The column names shown in the UI may be different from those in the CSV file. However, we recommend using the same naming as in the sample files above.
2. Uploading your file(s)
To upload a CSV file, navigate to the desired tab inside the custom data source. Click on the Upload CSV button and upload the file in the modal window. For example, to upload a customer file navigate to the Customers tab and click on the Upload CSV button.
Tip: Please make sure to add plans (using the data platform UI) before uploading invoices, invoice line items, transactions or cancellations CSV files.
To upload a different type of data, navigate to a different tab. For example, to upload a transaction file navigate to the "Transactions" tab and then click on 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 be reflected 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 in your CSV file.
3. Editing uploaded data
If there is a failure in processing the information or if there are any issues with data entered, you can change the data in the UI. If you want to edit data, navigate to that tab and click on the edit icon in the row. Click on the green tick to submit your changes.
Alternatively, you can upload a new CSV file with 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.