When we first released our Enrichment API and Segmentation features we received a lot of requests for a feature to add customer attributes via a CSV import. Using our new app for Google Sheets you can import your customer attributes directly from a Google Sheet.
In this article we will learn how to install the ChartMogul Google Sheets app, how to add your ChartMogul API keys to the app, how to format your data for import, and how to import your data.
Using our new Google Sheets app you can import your customer attributes from a Google sheet. Follow these instructions to import your customer attributes.
Install the Google Sheets app
Open a Google Sheet and select Add-ons from the menu. Select "Get Add-ons...", and then search for ChartMogul in the Google Sheets Add-ons store.
Alternatively, go directly to the ChartMogul Google Sheets app, and click "Install".
Input your ChartMogul API keys
In your formatted Google Sheet, select "ChartMogul" > "Open app" and then enter your API keys.
Navigate to https://app.chartmogul.com/#admin/api. Copy and paste both your ChartMogul API Token and Secret Key into the app's input fields. Finally, click "Save keys".
Format your data
To import your customer attributes, the Google Sheets app requires your data to be in a very specific format.
Here's an interactive example:
The template has 4 columns:
Column A, Email or External ID should include the email address or external ID for the customer in ChartMogul.
Column B, Attribute is the name of the attribute you want to create or the existing field you want to add to. There are 'Lead created at', 'Free trial started at' and 'Tag' fields by default in all customer accounts. New attributes will be created under 'Custom Attributes' in the customer's profile.
Column C, Value is what you would like the custom attribute to be. For example, the NPS score or the name of the Sales rep.
Column D, Type is the type of attribute you want to add, the type will determine what filtering options are available. You can see a list of the different types below.
All fields are required.
|Email or External ID||Your customer's email or external ID in ChartMogul.|
The name of the customer's attribute.
For example, "Marketing campaign". Can be any combination of characters.
The values permitted depend on the Type in each row.
If the type for this row is "String", the value can be any combination of characters, for example "#123ABC".
If the type for this row is "Timestamp", the value can only be in the format: YYYY-MM-DD, for example 2015-01-24.
If the type for this row is "Integer", the value can only be a number, for example 1234, not A1 or #2.
If the type for this row is "Boolean", the value can only be "TRUE" or "FALSE" (without quotes).
|Type||Can be a "String" or "Tag" (all characters), an "Integer" (just numbers), a "Timestamp" or a "lead_created_at" or "free_trial_started_at" (date, e.g. 2015-01-24), or a "Boolean" ('true' or 'false').|
You can add 7 different types of attributes with Google Sheets:
String: a sequence of letters, numbers or symbols.
To filter: Add filter > attribute name > is / is not / contains / does not contain / is not present
Good for: Account manager, Marketing campaign
Integer: a whole number.
To filter: Add filter > attribute name > equals / does not equal / is less than / is more than / is less than or equal to / is more than or equal to / is not present
Good for: NPS score, CSAT score, Number of emails opened, Number of site visits
Timestamp: a date and time.
To filter: Add filter > attribute name > is on / is after / is before / is on or after / is on or before / is between / is not present
Good for: First visit date, Date of support ticket, Date of upgrade from free plan
Boolean: a true or false condition.
To filter: Add filter > attribute name > is true / is false / is not present
Good for: Signed up for newsletter, Contacted support, Contacted regarding upsell
Tag: a sequence of letters, numbers or symbols listed under the tags section of a customer profile.
To filter: Add filter > Tags > has at least one of / has none of / has all of / is not present
Good for: Top account, At risk
Tags offer a simple string that can be added through the UI as well as Google Sheets. As tags are filtered through the tags section, having a long list of tags can be less useful than creating separate custom attributes.
lead_created_at: the date a customer became a lead.
To filter: Add filter > Lead created at > is on / is after / is before / is on or after / is on or before / is between / is not present
Customers with a lead created at date will contribute to the Leads chart.
free_trial_started_at: the date a customer became a lead.
To filter: Add filter > Free trial started at > is on / is after / is before / is on or after / is on or before / is between / is not present
Once your data has been formatted, and your API keys have been added to the app, select "Enrichment" in the ChartMogul Sheets menu. Click Send attributes to ChartMogul to import your attributes into ChartMogul.
The import can take some time, please note that closing the app or the Google Sheet will cancel the import.
Once your import completes you will be notified in the Google Sheets app.
Googles API will timeout after around 1000 lines. For sending large data sets, we recommend breaking down the uploads into groups of 1000.
You can add custom attribute filters to any of the charts, cohorts, maps and customer lists. For example, by adding an integer attribute for NPS (Net Promoter Score), you can identify all of your customers with a low score:
You can take it even further by filtering for multiple attributes. In this example we are looking for customers with a low NPS that have contacted support:
Tags are simple strings that can also be added via the ChartMogul UI. In this example, we are looking at the MRR generated by customers tagged with managed_accounts: