Skip to main content

Overview

To give your customers the best possible marketing experience, Reach needs access to their data. This is achieved in two parts:
  1. Defining Schemas - Tell us how your data is structured
  2. Sending Data - Historical import + ongoing real-time/batch sync

Phase 3: Data Sync Setup

The Two-Step Process

1

Schema Definition

Reach creates flexible schemas matching your existing data structure—you don’t transform data to fit our requirements.
2

Data Transmission

Historical batch import followed by ongoing real-time or scheduled syncs.

Schema Creation Process

Reach’s flexible schema system adapts to your data model instead of forcing you to adapt to ours.

Step 1: You Provide Sample Data

Send Reach example JSON objects of your key business records as they exist in your system:
Example Customer Record
{
  "id": "cust_12345",
  "email": "[email protected]",
  "phone": "+14155551234",
  "first_name": "John",
  "last_name": "Doe",
  "created_at": "2024-01-15T10:30:00Z",
  "city": "San Francisco",
  "state": "CA",
  "total_lifetime_value": 5280.50,
  "tags": ["vip", "email_subscribed"]
}
Example Transaction Record
{
  "id": "txn_67890",
  "customer_id": "cust_12345",
  "amount": 150.00,
  "created_at": "2024-03-20T14:22:00Z",
  "status": "completed",
  "items": [
    {
      "name": "Service A",
      "price": 100.00
    },
    {
      "name": "Service B",
      "price": 50.00
    }
  ]
}
Send real examples from your database—not idealized versions. Include all fields, even optional ones.
We define schemas that accept your exact structure and assign each a category:Schema Categories:
  • contacts_schema: Customer/contact records
  • transactions_schema: Transaction/billing records
  • locations_schema: Location/address records
  • Custom schemas as needed for your business model
No data transformation required—we accept your format as-is.
We identify which fields serve key purposes for attribution and segmentation:Customer Schema Mappings:
  • Which field is the email? → email
  • Which field is the phone? → phone
  • Which field is the customer ID? → id
  • Which field is the creation date? → created_at
Transaction Schema Mappings:
  • Which field is the transaction amount? → amount or total
  • Which field is the transaction date? → created_at or completed_at
  • Which field links to customer? → customer_id
  • Which field indicates status? → status
These mappings power attribution logic, segmentation, and merge fields in communications.
Reach provisions endpoints that accept your format:
POST /api/resources/contacts
POST /api/resources/transactions
POST /api/resources/locations
Each endpoint accepts your JSON structure directly—no reformatting needed.

What Data You’ll Send

Minimum Required Data

All Industries Require

Required Fields:
  • Email address (primary identifier)
  • Unique customer ID from your system
Recommended Fields:
  • Phone number (enables SMS, improves attribution)
  • First and last name
  • Creation date/timestamp
  • Address (city, state, zip for geographic targeting)
Optional but Valuable:
  • Custom attributes for segmentation (tags, categories, preferences)
  • Lifetime value or spend metrics
  • Customer status (active, inactive, churned)
  • Opt-in/opt-out status for email and SMS
Complete Example
{
  "externalId": "customer_789",
  "email": "[email protected]",
  "phone": "+14155559876",
  "firstName": "Jane",
  "lastName": "Smith",
  "createdAt": "2023-06-10T08:15:00Z",
  "address": {
    "street": "456 Oak Ave",
    "city": "Portland",
    "state": "OR",
    "zip": "97201"
  },
  "tags": ["premium_member", "email_subscribed"],
  "lifetimeValue": 3200.00,
  "optInEmail": true,
  "optInSms": false
}

Key Decision: What Counts as a Transaction?

Work with Reach to define your “conversion event”—the moment that matters for attribution:

Booking-Based

When: Customer schedules/reservesPros:
  • Shows impact quickly
  • Captures intent early
Cons:
  • Not actual revenue yet
  • May include cancellations

Payment-Based

When: Customer paysPros:
  • Actual revenue
  • Most accurate attribution
Cons:
  • Longer attribution window
  • Delayed insights

Invoice-Based

When: Invoice is issuedPros:
  • Describes the sale
  • Works for B2B/net-terms
Cons:
  • May not reflect actual payment
  • Requires status updates
You can send updates as transactions progress through stages (booked → paid → fulfilled). This gives both early visibility and eventual accuracy.

How You’ll Send Data

Choose the method (or combination) that fits your infrastructure:

Event-by-Event Sync

Send customer and transaction records to Reach API as events occur in your system.Best for: Partners who want instant analytics and need real-time segmentationHow it works:
// When a new customer is created in your system
await fetch('https://api.embedreach.com/api/resources/contacts', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${PARTNER_API_KEY}`,
    'X-Tenant-Id': tenantExternalId,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(customerData),
});
Pros:
  • Immediate attribution
  • Real-time campaign targeting
  • Fresh data for segmentation
Cons:
  • Requires event hooks in your system
  • More API calls (rate limiting considerations)

Hybrid Approaches

Many partners use combinations:
  • Database access for initial historical load → Real-time API for ongoing syncs
  • Real-time API for transactions → Batch API for customer updates
  • Batch API for regular syncs → Database access for one-time historical backfill
The key is consistent data flow—whether event-by-event or in regular batches. Choose what fits your infrastructure and commit to keeping Reach’s data in sync with yours.

Phase 4: Ongoing Data Sync

Once schemas are defined and your sync method is chosen, implement the data flow:

Your Responsibilities

1

Implement your chosen sync method

Set up real-time hooks, batch jobs, or database views based on your decision.
2

Start sending data to Reach

Begin with historical backfill, then ongoing syncs for new/updated records.
3

Keep data flowing

Ensure customers and transactions sync as they’re created/updated in your system.
4

Send status updates

Update transactions when they change status (refunded, canceled, modified).

Reach’s Responsibilities

  • Create custom schemas matching your data
  • Map fields to attribution logic
  • Provision custom API endpoints
  • Handle schema evolution as your needs change
  • Query database on schedule (if using database access method)

Important Notes

Keep Reach’s Data in SyncWhether you’re sending real-time, batches, or using database access, ensure we have current information about:
  • Customer updates (address changes, opt-in status, etc.)
  • Transaction status changes (completed → refunded, pending → paid)
  • Refunds or cancellations
  • New customers and transactions as they’re created
Using External IDsWhen using Reach APIs, you can always use the resource externalId. This maps to YOUR internal ID so you never need to know or store Reach’s resource IDs. This makes integration much simpler.

Data Sync Checklist

Sample data sent to Reach - Real examples of customers, transactions, locations
Schemas defined - Reach has created schemas matching your structure
Sync method chosen - Real-time API, Batch API, Database Access, or hybrid
Endpoints or access provisioned - You have what you need to send data
Historical import complete - Existing data backfilled
Ongoing sync implemented - New/updated records flow automatically

Next Steps