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:
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').|
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.