This guide explains the core concepts of Flock’s referral system. For implementation details, refer to our SDK documentation.
Understanding Flock Integration
Flock is a referral system that helps you create and manage referral campaigns. A successful integration involves two main components:
Client-Side Integration
Handle user-facing aspects of your referral program
Server-Side Integration
Manage reward fulfillment and authentication
Overview of a Referral Flow
Share
Referrer shares their unique referral code with friends
Sign Up
Invitee uses this code when signing up
Reward
When the invitee completes the required action (e.g., subscribes), eligible parties receive their rewards
Key Integration Components
1. Client-Side Integration
The client-side integration handles the user-facing aspects of your referral program:
- Register users with Flock using your internal user IDs
- Provide user details (email, name) to personalize the experience
- Required before displaying any referral interfaces
- Display a sharing interface for referrers to invite friends
- Support various sharing methods (email, SMS, social media)
- Web: Automatically capture and validate referral codes from the URL
- Mobile: Display a referral code input screen for manual code entry
- Once validated, create a referral record in Flock to capture the referral flow
2. Server-Side Integration
Authentication
- Secure API access using service keys
- Environment-based configuration (test/production)
Reward Triggers
- Trigger rewards when invitees complete required actions
- Support for various reward types (gift cards, credits, etc.)
- See Reward Triggers Guide