How to import my user data?How to import data to Crisp using CSV?Importing existing contactsHow to import data using Crisp API?How to import data to Crisp using native integrations?How to im
Articles on: My Contacts
If you want to use existing data from your own database or import data from a previous provider to Crisp, Crisp offers import options for your contacts: CSV files, APIs, Javascript SDK, native integrations and tools such as Zapier, n8n or Make.
1. Retrieve your data
As Crisp uses CSV to import your data, you need to gather your data in a CSV file.
No matter how the data is formatted. Crisp will allow you to map the data to the Crisp format
2. Go to the Crisp Contacts Tab
- Connect to app.crisp.chat
- Go to the Contacts tab
- On the upper right corner, click on import contact profiles.
3. Upload the CSV and Map the Data
If your CSV doesn't have a header (the first row with variables names such as email, name, IP, company), check the option "Skip header"
Also, please ensure your CSV separator is correct. By default, Crisp is using a comma.
Required data and data formats:
- Email is required
- First name and Last name (or Full name) are strongly recommended. While you can import a list with only emails, this means your contacts names will be extracted from the email addresses.
- Segments must be separated by a pipe (
|), a comma (,) or a space (` `) separator.
- Country must be a country code, not a country name (e.g.
USfor United States).
- City must be the full city name.
- Dates (Creation date and Last Active date) can be either a string in ISO 8601 format (e.g.
2020-08-14T14:09:10-02:00), or a UNIX timestamp (seconds or milliseconds) (e.g.1694070416or1694070416000)
4. Add custom data
Crisp provides predefined attributes like the Email, Username, Segments, Company information, etc.
It's also possible to use your own data in Crisp, such as a user ID, or internal variables.
By default, Crisp auto-detects the columns that correspond to custom data. If a column is named
data.my_key
, then it will be automatically added as a custom data named
my_key
.
In addition to the auto-detection, you can also manually map custom data.
First, click on that button:
Then you need to fill your custom data key. Here are some valid examples:
- ✅ user_id
- ✅ lifetime_value
- ✅ ltv
- ✅ AppVersionCode
Here are some invalid examples
- ❌ Company Name
- ❌ $ltv
- ❌ is_subscribed?
You need to avoid spaces and special chars, except _ and -
Then Create your custom key and assign the custom key.
5. Proceed
Your data import might take time. If you are importing hundreds of profiles, it should be live in a few seconds.
If you are importing 20,000+ profiles, it might take a few minutes. Just make a coffee then
We recommend doing an initial import of 1-2 contacts first, as a test. This is to make sure that all your data is mapped how you expect, and that you didn't forget to map a column.
If you import a profile a second time (i.e. a profile with the same email address already exists), it will behave as such:
- existing custom data with new values will be updated (to explicitly delete an existing custom data, leave its value empty)
- new custom data will be added to existing ones
- new segments will be added to existing ones (it's not possible to explicitly delete segments)
- employment information will be merged
- company information will be merged
- any other information (nickname, avatar, etc.) will be overwritten
The API routes from Crisp that allow for contact import (user profile) are:
- Add New People Profile:
POST /v1/website/{website_id}/people/profile
- Update People Data:
POST /v1/website/{website_id}/people/data/{people_id}
Procedure for Contact Import
- Add New People Profile
- Endpoint:
POST /v1/website/{website_id}/people/profile
— API reference available in our dev hub
- Request Body:
undefined { "email": "camille@crisp.chat", "company": { "name": "Crisp" }, "person": { "locales": [ "en-GB", "fr-FR" ], "profiles": [], "geolocation": { "country": "FR", "region": "CVL", "city": "Nantes" }, "nickname": "Camille", "timezone": -120, "avatar": "https://crisp-sandbox.netlify.app/images/avatars/harkos.png" }, "segments": [ "crispy", "lead" ] }
- Update People Data
- Endpoint:
POST /v1/website/{website_id}/people/data/{people_id}
— API reference available in our dev hub
- Request Body:
undefined { "data": { "subscription": "Unlimited", "newsletter": "marketing", "order_id": "TX00075643ZA" } }
Steps
- Authentication: Ensure you have authenticated your requests with the appropriate tokens.
- Create Request Body: Format the contact data as specified in the request body examples.
- Send Request: Use an HTTP client to send the POST request to the appropriate endpoint with your website ID.
For detailed documentation, visit the Crisp API Reference.
It's very simple, you just have to install the native integrations and enable the feature "syncronize contacts" from the native integration itself. For reference, Crisp integrates itself with Pipedrive, Hubspot, Zoho, Salesforce, Shopify, WooCommerce, or Prestashop for example.
Zapier provides several Zaps to integrate Crisp with various applications, allowing for the import and management of user profiles. Here are some Zaps that facilitate the import of user profiles to Crisp:
Microsoft Dynamics 365 CRM to Crisp:
- Create or update Crisp contacts for new Microsoft Dynamics 365 CRM leads.
- Update Crisp contacts when Microsoft Dynamics 365 CRM contacts are modified.
- These Zaps are useful for synchronizing lead and contact information between Microsoft Dynamics 365 CRM and Crisp.
Google Sheets to Crisp:
- Create multiple rows in Google Sheets for new contacts in Crisp.
- Update Google Sheets rows whenever Crisp conversation data changes.
- These Zaps help manage contact information in Google Sheets and keep it synchronized with Crisp.
Notion to Crisp
New Contact in Notion: This trigger can be used to create new contacts in Crisp whenever a new contact is added in Notion.
Importing or updating data using Crisp JS SDK can be pretty useful in the following use-case
- new user had signed through a web application
- user has modified his email through a web application
- user has modified his first name, last name or company information
The Crisp Web SDK ($crisp) provides several methods for importing or updating user profiles. Here are the relevant methods and their usage:
- Change User Email
undefined $crisp.push(["set", "user:email", [email]]); // Example: $crisp.push(["set", "user:email", ["john.doe@crisp.chat"]]);
- Change User Phone
undefined $crisp.push(["set", "user:phone", [phone]]); // Example: $crisp.push(["set", "user:phone", ["+14152370800"]]);
- Change User Nickname
undefined $crisp.push(["set", "user:nickname", [nickname]]); // Example: $crisp.push(["set", "user:nickname", ["John Doe"]]);
- Change User Avatar
undefined $crisp.push(["set", "user:avatar", [avatar]]); // Example: $crisp.push(["set", "user:avatar", ["https://example.com/avatar.jpg"]]);
- Change User Company
undefined $crisp.push(["set", "user:company", [name, { url, description, employment, geolocation }]]); // Example: $crisp.push(["set", "user:company", ["Crisp", { url: "https://crisp.chat/", description: "Crisp company", employment: ["CTO", "Engineer"], geolocation: ["FR", "Nantes"] }]]);
Procedure to Import or Update User Profiles
- Initialize the Crisp Web SDK: Ensure the Crisp SDK is included and initialized in your webpage.
- Set User Information: Use the
$crisp.pushmethod with the appropriate function to set or update user details.
- Verify Changes: Ensure that the user profile changes are reflected in the Crisp dashboard.
For detailed usage and examples, refer to the Crisp Web SDK documentation.
Updated on: 11/06/2024
Updated on: 19/07/2024
Thank you!