# Connect Customer.io

Send a `survey_completed` event when a respondent finishes a published survey. Enable profile updates to use their answers as attributes for segmentation.

## Connect your workspace

1. In Customer.io, open **Settings → API Credentials**. Use a private API key for the workspace, or its Site ID and Tracking API key pair. Check whether the workspace is in the US or EU.
2. In Shopoll, open **Integrations → Customer.io**. Choose that region and credential type, then enter the credentials.
3. Leave **Update the person’s profile with survey answers** selected to update profiles as well as sending events. Clear it to send events only.
4. Select **Connect Customer.io**. Choose **Test connection** to confirm that the saved credentials can reach the selected workspace.

To rotate a credential, enter its replacement and save. To point Shopoll at another workspace, disconnect the existing one first. Disconnecting removes pending events for that connection.

## What arrives in Customer.io

Shopoll uses an opaque participant ID to associate the event with a person. The event contains the survey title and an `answers` object keyed by question handle. For example, a question with the handle `discoveryChannel` appears as `discovery_channel` in the event and `survey_discovery_channel` on the profile. Write-in text accompanies the selected answer.

Profile updates can include the participant link, available email and an international phone number from a linked Shopify order or a survey answer. If the participant supplies an email, Shopoll only uses the order phone when the order email matches. The sync leaves marketing subscription preferences unchanged. Anonymous surveys, imported answers and draft previews are excluded. The connection starts with new completions.

## Check delivery

Open **Customer.io** in the Shopoll directory to see the sync counts. After a completion, look for **Last delivery accepted** and open the person’s activity in Customer.io to inspect the event. An event keeps its original identifier when retried. For a failed event, correct the setting or key and choose **Retry failed events**.
