> ## Documentation Index
> Fetch the complete documentation index at: https://docs.digifist.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Contacts

> Customer profiles in Galantis — synced from Shopify, enriched with WhatsApp engagement history, and used across campaigns, automations, and the Inbox.

Contacts are the individual customer records in Galantis. Every contact is sourced from Shopify and kept current via webhook sync — when a customer's data changes in Shopify, the change propagates to Galantis within seconds. On top of the Shopify data, Galantis enriches each contact with WhatsApp-specific information: message history, conversation threads, automation activity, and consent status.

A contact's profile is the single source of truth for everything Galantis knows about that customer — it is what campaign targeting, automation conditions, segment rules, and Inbox context all draw from.

## What this covers

* All customer profile fields and their sources
* Related data available per contact
* How sync works and what triggers it
* The `exclude_from_galantis` flag
* Finding and reviewing a contact's profile

## Customer profile fields

<Tabs>
  <Tab title="Identity">
    | Field                 | Source  | Purpose                                                          |
    | --------------------- | ------- | ---------------------------------------------------------------- |
    | `shopify_customer_id` | Shopify | Links the Galantis contact record to the Shopify customer record |
    | `first_name`          | Shopify | Display name — used in template variable mapping                 |
    | `last_name`           | Shopify | Display name — used in template variable mapping                 |
    | `email`               | Shopify | Contact info — available as a template variable                  |

    These fields are synced from Shopify on customer creation and updated whenever the customer record changes in Shopify via the `customers/update` webhook.
  </Tab>

  <Tab title="WhatsApp Delivery">
    | Field                | Source  | Purpose                                               |
    | -------------------- | ------- | ----------------------------------------------------- |
    | `phone`              | Shopify | The WhatsApp number used for message delivery         |
    | `phone_country_code` | Shopify | ISO country code for the phone number                 |
    | `phone_calling_code` | Shopify | International dialing prefix (e.g., `+52` for Mexico) |

    All three phone fields must be present and valid for a message to be deliverable. A missing `phone_calling_code` is the most common cause of `CUSTOMER_IS_MISSING_CALLING_CODE` delivery failures. When this error appears in campaign analytics or automation activity logs, it indicates the customer's phone number in Shopify is missing the country calling code — this must be corrected in Shopify for the record to sync correctly into Galantis.

    <Warning>
      Phone number data is synced from Shopify as entered by the customer. Galantis does not normalize or validate phone number format beyond what Shopify provides. If customers in your store frequently enter numbers without country codes, review your Shopify checkout phone field configuration.
    </Warning>
  </Tab>

  <Tab title="Targeting & Consent">
    | Field             | Source             | Purpose                                                                            |
    | ----------------- | ------------------ | ---------------------------------------------------------------------------------- |
    | `tags`            | Shopify            | Lifecycle stages and custom tags — used in segment rules and automation conditions |
    | `marketing_state` | Shopify / Galantis | Consent status — determines eligibility for campaigns and automations              |
    | `country`         | Shopify            | Geo targeting — used in segment rules and country-based automation conditions      |
    | `locale`          | Shopify            | Language/locale — useful for language-based segment targeting                      |

    `marketing_state` is the most consequential field on a contact's profile. It is updated by Shopify consent webhooks and by Galantis when a customer replies STOP. See [Consent & Opt-outs](./consent-optouts) for the full state reference.

    `tags` are synced via the `customer_tags/added` and `customer_tags/removed` webhooks — tag changes in Shopify propagate to Galantis in near real time and immediately affect segment membership for any segment with tag-based rules.
  </Tab>

  <Tab title="Sync Metadata">
    | Field                   | Source   | Purpose                                              |
    | ----------------------- | -------- | ---------------------------------------------------- |
    | `synced_at`             | Galantis | Timestamp of the last successful sync from Shopify   |
    | `exclude_from_galantis` | Galantis | Excludes the customer from AI automation suggestions |

    `synced_at` is useful for diagnosing whether a recent Shopify change has propagated to Galantis. If a customer's profile in Galantis appears outdated, check `synced_at` against the time of the Shopify change.

    `exclude_from_galantis` is a Galantis-side flag that excludes the customer from AI-powered automation suggestions in the Galantis AI flow builder. It does not affect manual automation enrollment or campaign sends.
  </Tab>
</Tabs>

## Related data per contact

Beyond the profile fields, each contact's record surfaces related data from across the platform:

**Order history** (`orders`) — All Shopify orders associated with the customer, synced via the `orders/create` and `orders/updated` webhooks. Used in segment rules (total spent, order count, days since last order) and available as context in the Inbox conversation view.

**Back-in-Stock subscriptions** (`subscriptions`) — Any active or historical Back-in-Stock widget subscriptions the customer has submitted. Visible per contact to confirm subscription status for a specific variant.

**Message history** (`messages`) — All WhatsApp messages sent to and received from this customer across campaigns, automations, and Inbox conversations. Visible on the contact profile for full communication context.

**Conversation threads** (`conversations`) — All Inbox conversation threads for the customer, with their status (OPEN, PENDING, RESOLVED) and assigned agent.

**List and segment membership** — Which Customer Lists the contact belongs to and which Segments they currently match. Useful for confirming whether a customer should have been included or excluded from a recent campaign.

## How sync works

Galantis maintains customer data through two mechanisms:

**Initial import** — When the app is first installed, Galantis runs a full import of your existing Shopify customer base. This populates the contact database with all customers at the time of installation.

**Ongoing webhook sync** — After the initial import, Galantis receives Shopify webhooks for every customer event:

| Webhook                               | What it updates                             |
| ------------------------------------- | ------------------------------------------- |
| `customers/create`                    | Creates a new contact record                |
| `customers/update`                    | Updates profile fields, phone, tags, locale |
| `customers/delete`                    | Removes the contact record                  |
| `customers/marketing_consent_updated` | Updates `marketing_state`                   |
| `customer_tags/added`                 | Adds tags to the contact record             |
| `customer_tags/removed`               | Removes tags from the contact record        |

## Finding a contact's profile

Navigate to **Audience → Contacts** and search by name, email, or phone number. The contact profile page shows all fields, related data, and a summary of recent message and automation activity.

The contact profile is also surfaced contextually in the Inbox — when an agent opens a conversation, the customer's Shopify data, order history, and consent status are visible in the sidebar without leaving the thread.

## Best practices

* **Resolve `CUSTOMER_IS_MISSING_CALLING_CODE` errors at the source.** Fix the phone number format in Shopify — Galantis will sync the corrected data via webhook. Attempting to fix it in Galantis directly is not the right approach since the Shopify record will overwrite the change on the next sync.
* **Use `synced_at` to diagnose stale data.** If a customer's segment membership or consent status seems incorrect, check `synced_at` to determine when the last sync occurred and whether a recent Shopify change has had time to propagate.
* **Review tag sync timing for automation conditions.** Tag-based automation conditions (`CUSTOMER_TAG`) evaluate the customer's tags at the moment the condition node is reached — not at trigger time. A customer who gains or loses a tag while in a delayed flow will be evaluated against their tag state at condition evaluation, not at enrollment.

## Related guides

* [Segments](./segments) — Using contact fields as segment rule conditions
* [Consent & Opt-outs](./consent-optouts) — How `marketing_state` is set and enforced
* [Inbox — Assignment & Routing](/whatsapp/inbox/assignment-routing) — How contact context appears in Inbox conversations
* [Support — Message Delivery](/whatsapp/support/troubleshooting/message-delivery) — Resolving phone number format errors
