Migrating Contacts Integration from Email Classic to Staffbase Email

Learn how to migrate from the Contact API used in Employee Email (Classic) to the [New] CSV Import API for Staffbase Email.

Staffbase Email
Employee Email (Classic)

The (New) CSV Import API provides methods to upload, configure, and perform CSV imports to manage Studio users and contacts on Staffbase Email. Unlike the Contact API, it uses a different approach to handling contact data. If you are migrating from the Employee Email to the Staffbase Email, you need to adjust your existing import feed accordingly.

  • Create an API token with administrative access via the Staffbase Studio.

The Staffbase platform API authentication works differently than API keys generated in the Employee Email (Classic) platform. Therefore any old Employee Email (Classic) API keys are not compatible with Staffbase Email.

  • The API requires data in CSV format. Convert your existing JSON contact data into a CSV file, following these requirements:
    • Each system and custom field must be represented as a column header.
    • Each row must contain contact data that matches the order of the headers.

For more information on CSV examples, refer CSV File Examples.

{
"contacts": [
{
"firstName": "Contact",
"lastName": "One",
"email": "contact.one@email.com",
"location": "Vancouver",
"department": "Sales",
"jobTitle": "SDR",
"customFields": {
"team": "Team A",
"costcenter": "12345"
}
},
{
"firstName": "Contact",
"lastName": "Two",
"email": "contact.two@email.com",
"location": "Vancouver",
"department": "Sales",
"jobTitle": "VP",
"customFields": {
"team": "Team B",
"costcenter": "12345"
}
},
{
"firstName": "Contact",
"lastName": "Three",
"email": "contact.three@email.com",
"location": "Vancouver",
"department": "Product",
"jobTitle": "Engineer",
"customFields": {
"team": "Team B",
"costcenter": "12345"
}
}
]
}
firstName,lastName,email,location,department,jobTitle,team,costcenter
Contact,One,contact.one@email.com,Vancouver,Sales,SDR,Team A,12345
Contact,Two,contact.two@email.com,Vancouver,Sales,VP,Team B,12345
Contact,Three,contact.three@email.com,Vancouver,Product,Engineer,Team B,12345

To learn how the CSV file should be formatted and encoded, refer Setting up the CSV File.

  • Before importing contacts, ensure all custom fields in your CSV file are set up in Staffbase Studio. Check the customFields object nested in the contacts object in your current JSON data and add the necessary fields in the Studio. Learn more.

Once your data is prepared and your custom fields are configured, follow the Get Started With CSV Import to start the import. When importing via CSV, set "type": "CONTACT" for contacts and "type": "USER" for users.