Skip to Content
Data StudioSegments

Segments

Segments let you define user segments using a visual rule builder. Vendo generates a targeted user list from your BigQuery data and syncs it to ad platforms (Customer Match, Custom Audiences) and messaging tools (OneSignal, Klaviyo, Customer.io).

Creating a Segment

Audiences are created from Data → Audiences:

  1. Open Data → Audiences
  2. Click New from rules (or New from identity state to build an audience from identity-resolution state)
  3. Choose the source table — the BigQuery table containing your user data
  4. Define identity fields — map columns to PII types (email, phone, etc.)
  5. Add rules to filter which users are included
  6. Save the audience

Source Table

Select any BigQuery table that contains user-level data. Common choices:

TableUse Case
customersShopify customer profiles
ordersUsers who made purchases (join with customer data)
customer_segmentsOutput from a Python segmentation model
customer_ltvOutput from a SQL model with LTV scores

Identity Fields

Identity fields map your table columns to standard PII types. Destinations use these for user matching:

PII TypeDescriptionExample Column
EmailCustomer email addressemail
PhonePhone numberphone
First NameFirst namefirst_name
Last NameLast namelast_name

Values are hashed (SHA-256) before being sent to ad platforms that require it (Google Ads, Meta Ads, etc.).

Rules

Rules filter which users from the source table are included in the segment. Each rule has three parts:

PartDescriptionExample
FieldColumn name from the source tableorder_count
OperatorComparison operator>=
ValueTarget value3

Supported Operators

OperatorDescription
=Equals
!=Not equals
>Greater than
>=Greater than or equal
<Less than
<=Less than or equal
inValue is in list
not_inValue is not in list
is_nullValue is null
is_not_nullValue is not null
containsString contains substring
not_containsString does not contain substring

Combining Rules

Multiple rules are combined with AND logic — all rules must match for a user to be included.

Example: High-value repeat customers

RuleFieldOperatorValue
1order_count>=3
2total_spent>100
3marketing_state=opted_in

Syncing to Destinations

Segments can be synced to these destination types:

DestinationSync Type
Google AdsCustomer Match lists
Meta AdsCustom Audiences
TikTok AdsCustom Audiences
Snap AdsCustomer List audiences
Microsoft AdsCustomer Match lists
OneSignalSegments
KlaviyoLists
Customer.ioSegments

From the segment detail page, click Sync to Destination to set up the connection.

How It Works

  1. Vendo translates your rules into a BigQuery SQL query
  2. The query runs against your source table and returns matching users
  3. Identity fields are extracted and hashed where required
  4. The user list is sent to the destination via its API
  5. On each sync, the list is refreshed — users who no longer match are removed

Best Practices

  • Start broad, then narrow — begin with fewer rules and add more as you validate
  • Use modeled tables — build a SQL or Python model first, then create a segment on its output for cleaner segmentation
  • Monitor segment size — very small segments may not be useful for ad targeting
  • Keep identity fields consistent — use the same email/phone format across sources
Last updated on