Skip to main content
All CollectionsIntegrationsData Sync Integrations
Integrating Census with Candu: Setup Guide
Integrating Census with Candu: Setup Guide

This guide will walk you through setting up an integration between Census (a reverse ETL platform) and Candu using Census's HTTP Request destination feature.

Jonathan Anderson avatar
Written by Jonathan Anderson
Updated over a week ago

Prerequisites

Before you begin, you'll need:

  • A Census account with access to your data source

  • A Candu account with API access

  • Your Candu API key (found under Settings > Workspaces)

This Census to Candu guide uses the Census' HTTP request docs.
To follow this guide, see this google doc with sample data.

Step 1: Add Your Data Source to Census

Before setting up the integration, you'll need to add a data source to Census:

  1. Log into your Census account and navigate to the Sources page

  2. Click "New Source" and select your data source from the list

    • For this example, we'll use Google Sheets

  3. Follow the connection steps for your selected source

  4. Share your Google Sheet with the service account email provided by Census

Step 2: Create an HTTP Request Destination in Census

  1. Log into your Census account and navigate to the Destinations page

  2. Click "New Destination" and select "HTTP Request" from the menu

  3. Name your destination (e.g., "Candu Integration")

  4. Enter the Base URL for the Candu API: https://api.candu.ai/api/

Step 3: Add Your Candu API Key

  1. Retrieve your Candu API key from Settings > Workspaces in your Candu account

  2. In the Census destination setup, click "Add Header"

  3. Name the header Authorization

  4. For the value, enter YOUR_API_KEY with your actual Candu API key)

  5. Check the box indicating it's a secret

  6. Click "Connect" to continue

Step 4: Create a New Sync

  1. Navigate to the Syncs page in Census and click "New Sync"

  2. Select your data source (e.g., Redshift, Snowflake, BigQuery, etc.)

  3. Select the HTTP Request destination you just created

  4. For the endpoint, enter eventWebhook

  5. Choose your trigger method (typically "rows_added/rows_updated")

  6. Specify the number of records in each request: One record per request

Step 5: Create your Payload Template

Configure your payload template:

  1. Select a sync key (typically your unique user identifier)

  2. Choose "POST" as the HTTP method

  3. Select "JSON" as the payload type

  4. Choose "Template" for the JSON subtype

Define the JSON payload:

Use the following template for the payload, adjusting field names as needed to match your source data:

{
"type": "identify",
"userId": "{{ record['UserID'] }}",
"traits": {
"email": "{{ record['Email'] }}",
"role": "{{ record['Role'] }}",
"OrgID": "{{ record['OrgID'] }}",
"HRIS Integration": "{{ record['HRIS Integration'] }}",
"isEditor": {{ record['Editor'] }}
}
}

Step 6: Set your Rate Limit

Candu supports 2,000 requests per 10 seconds.

  1. Set batch size to 1.

  2. Set the Rate Limit to 200 per second

Step 7: Save and Run Your Sync

  1. Click "Save" to create your sync

  2. Run the sync to test the connection

Verification

You can verify that user data is being sent correctly by:

  1. Log into your Candu account

  2. Navigate to Users

  3. Find a user that should have been synced

  4. Drill down to see whether the traits (role, OrgID, etc.) match what you sent

Troubleshooting

If your sync isn't working as expected:

  1. Check the API Inspector tab in Census to see the request and response details

  2. Verify your API key is correct and hasn't expired

  3. Ensure your payload template matches the expected format

  4. Check that field names in your template match the column names in your source data

Rate Limits and Best Practices

Consider scheduling syncs during off-peak hours for large data sets

(Optional) Sync Group Traits to Candu

Groups can be synced to Candu, typically two types of call are used

Sync Group Traits

Set up a new Sync following steps 4-7 above.

Use eventWebhook as the target once again but with a Group payload as follows:

{ 
"type": "group",
"groupId": "{{ record['OrgID'] }}",
"traits": {
"name": "{{ record['Org Name'] }}",
"last_update": "{{ record['Last Updated'] }}"
}
}

The traits above should be customized with your own data.

Sync Group Membership

Set up a new Sync following steps 4-7 above.

Use eventWebhook as the target once again. The payload template is as follows:

{ 
"type": "group",
"userId": "{{ record['UserID'] }}",
"groupId": "{{ record['OrgID'] }}"
}


For additional help, contact support@candu.ai

Did this answer your question?