Skip to Content
FeaturesCustomers

Customers

Customers represent the end-user accounts on your platform. Foir tracks customer identity, profile data, activity, and segment membership to power personalization and experiments.

Overview

A customer is an end-user account — someone who visits your site, logs in, and interacts with your content. Foir maintains customer records with:

  • Identity: email, authentication status, account creation date
  • Profile: custom schema-driven profile data you define
  • Activity: content resolution history, segment memberships, experiment assignments
  • Status: active, inactive, or suspended

Customers are central to personalization. Segment rules evaluate against customer attributes and behavior, experiments assign customers to variant groups, and targeting rules can check authentication status.

In the Admin

Managing Customers

  1. Go to Customers in the admin dashboard
  2. Browse the customer list with columns for email, status, last login, and creation date
  3. Click a customer to view their detail page

Customer Detail

The customer detail page shows:

  • Account information: email, status, email verification, creation date, last login
  • Segment memberships: which segments the customer belongs to and when they entered
  • Experiment assignments: active experiments and assigned variants
  • Activity log: recent content resolution events, including markets, devices, and locales used
  • Profile data: custom profile fields you have configured

Customer Profiles

Profiles let you store custom data on each customer using a schema you define.

Defining the Profile Schema

  1. Go to Settings > Customer Profiles
  2. Define fields for your schema (e.g., firstName, companyName, tier)
  3. Each field has a key, display name, and type
  4. Save the schema

Setting Profile Data

  1. Open a customer’s detail page
  2. Navigate to the Profile tab
  3. Fill in or update the profile fields
  4. Save

Profile data is available in segment rules and can be used to drive personalization.

Via the CLI

Customer Management

# List all customers foir customers list # Get a customer by ID or email foir customers get <id> foir customers get customer@example.com # Create a customer foir customers create --data '{ "email": "newcustomer@example.com", "password": "securepassword123" }' # Delete a customer foir customers delete <id>

Customer Profiles

# View the current profile schema foir customer-profiles schema # Update the profile schema (define custom fields) foir customer-profiles update-schema --data '[ { "key": "firstName", "name": "First Name", "type": "text" }, { "key": "companyName", "name": "Company", "type": "text" }, { "key": "tier", "name": "Customer Tier", "type": "select", "options": ["free", "pro", "enterprise"] } ]' # Get a customer's profile data foir customer-profiles get <customerId> # Set profile data for a customer foir customer-profiles set <customerId> --data '{ "firstName": "Jane", "companyName": "Acme Corp", "tier": "enterprise" }'

Via the API

Querying Customers

query GetCustomer { customerByEmail(email: "jane@example.com") { id email status emailVerified lastLoginAt createdAt } }

Customer Profile Data

query GetProfile { customerProfile(customerId: "cust-123") { customerId data updatedAt } }

Customer-Scoped Records

Content records can be scoped to individual customers, allowing you to store per-customer content such as saved preferences, personalized landing pages, or customer-specific configurations. Records scoped to a customer are only returned when that customer is authenticated.

Best Practices

  • Define a profile schema early — decide what custom data you need on customers before launch.
  • Use email as a natural identifier — the CLI supports looking up customers by email directly.
  • Monitor segment membership — check the customer detail page to verify customers land in the expected segments.
  • Respect opt-outs — if customers opt out of segments, their preferences are honored regardless of rule evaluation.
  • Clean up inactive accounts — use the status field to manage customer lifecycle.
Last updated on