# Inbox sync

How Zernio matches inbox contacts to Salesforce Contacts and Leads and logs each day's conversation as one Task with the full transcript.

Once an org is connected, every message the profile's inbox receives or sends is synced. There is nothing to call: Zernio does it within seconds of each message.

## Match a Contact or Lead

For each message, Zernio finds the Salesforce record for the sender's Zernio contact, in this order:

1. A Contact or an unconverted Lead with the same phone number in a standard phone field (Phone, Mobile, Home or Other), read from the contact's WhatsApp, SMS, RCS or iMessage channel.
2. A Contact or an unconverted Lead with the same email address.
3. Otherwise, with `syncContacts` on, a new Lead, or a Contact when `createAs` is `contact`, with the contact's name, email and phone as `MobilePhone`. A new Lead's `Company` is `[not provided]`.

The match is remembered, so later messages go to the same record. A matched record is linked as it is: Zernio never overwrites its fields.

## Log a conversation

With `logMessages` on, each record gets one Task per channel per day (UTC), and every message that day is added to it:

| Task field | Value |
|------------|-------|
| `Subject` | The channel and the day, for example `WhatsApp conversation · 2026-11-17` |
| `Description` | The transcript: one line per message with its UTC time, an arrow for its direction and its text, then links to attachments |
| `WhoId` | The Contact or Lead |
| `Status` | `Completed` |
| `TaskSubtype` | `Task` |

A day's transcript reads like this:

```text
14:02 ← Hi, do you still have places on the June course?
14:03 → We do. Shall I send you the dates? · ✓ read 14:05
```

`←` is a message received, `→` one sent, with its [delivery status](/platforms/salesforce/delivery-status) at the end. The Task uses standard fields only, so logging needs no custom fields.

## How it behaves

- Messages sync for conversations linked to a Zernio contact; others are skipped.
- With `syncContacts` off and no match, the message is skipped rather than creating a record.
- A day that outgrows the 32,000-character `Description` continues in a new Task, `(part 2)` in its subject.
- Writes are batched, up to 200 records per call, and paced to the org's API limits. Past 80% of the org's daily API requests Zernio slows down, and past 95% it waits, leaving the rest to your other integrations.
- If the record was deleted or merged since, Zernio finds or creates the record again and logs the message there.
- Only messages from after the connection sync. Earlier conversations are not backfilled.

## Related

- [Settings](/platforms/salesforce/settings)
- [Delivery status](/platforms/salesforce/delivery-status)
- [List contacts](/contacts/list-contacts)