Wecheer Integration
Build powerful loyalty and engagement integrations with the Wecheer platform. Send events, sync profiles, and receive real-time data.
Integration Overview
Wecheer product offer a bi-directional integration framework that enables enterprise clients to seamlessly exchange real-time data and events with the Wecheer platform.
📤 Receiving Events from Wecheer
Wecheer becomes the source of real-time platform events delivered into client systems through Segment.
📥 Sending Events to Wecheer
Send user attributes or behavioral events into Wecheer via Segment or our standard public APIs, enabling Wecheer to reward and recognize user actions.
Integration via Segment
Wecheer uses Segment as its outbound event delivery middleware. When users interact with your campaign, Wecheer streams real-time events into your Segment workspace — from there you can route data to your CRM, CDP, analytics tools, and more.
Why Segment?
- Industry standard for event routing
- 450+ pre-built integrations
- Highly secure and SOC 2 compliant
- Zero additional cost for Wecheer clients
Integration Methods
📡 Segment Source
Recommended for most clients. Wecheer sends events directly into your Segment workspace, ready to route to any destination.
⚡ Segment Custom Function
For advanced use cases requiring event transformation or routing to systems not in the Segment catalog.
Event Categories
Wecheer emits three categories of events. See the Event Scheme section for full schemas.
Consumption Events
Scans, purchases, points earned, stamps received
User Events
Registration, profile updates, data sharing
Reward Events
Redemptions, catalog activity
Integration via Segment Source
The Segment Source integration is the recommended approach for most clients. Wecheer will be onboarded as a Source in your Segment workspace and will automatically forward all campaign events in real time.
How It Works
Setup Steps
The full step-by-step setup guide is published and maintained by our team in the official Segment catalog documentation.
View Setup Guide on Segment Docs ↗Note: Wecheer will provide your dedicated Source write key and assist with workspace setup. Contact your Wecheer account manager to initiate onboarding.
Common CRM & Marketing Destinations
Once Wecheer is connected as a Segment Source in your workspace, you can route events to any destination available in the Segment Catalog — with no additional development required on your side. Below are the most common platforms enterprise clients connect to.
| Platform | Category | Typical Use Case | Segment Docs |
|---|---|---|---|
| HubSpot | CRM / Marketing | Sync loyalty events into contact timelines, trigger HubSpot workflows on reward or redemption events | Setup Guide ↗ |
| Salesforce | CRM | Push Wecheer user and consumption events into Salesforce contacts and custom objects | Setup Guide ↗ |
| Braze | Marketing Automation | Trigger CRM campaigns (push, email, SMS) based on Wecheer reward or punchcard events | Setup Guide ↗ |
| Iterable | Marketing Automation | Drive email and push journeys from loyalty milestones | Setup Guide ↗ |
| Google BigQuery | Data Warehouse | Store all Wecheer events in your data warehouse for SQL analysis and BI reporting | Setup Guide ↗ |
| Snowflake | Data Warehouse | Load Wecheer event data alongside your existing Snowflake datasets | Setup Guide ↗ |
| Mixpanel | Product Analytics | Analyze engagement funnels and loyalty behavior alongside product usage data | Setup Guide ↗ |
| Amplitude | Product Analytics | Correlate Wecheer reward events with user retention and feature engagement | Setup Guide ↗ |
Example: Connecting HubSpot
HubSpot is available as a native destination in the Segment Catalog. Once Wecheer is set up as a Source in your workspace, connecting HubSpot takes only a few minutes and requires no code changes.
In your Segment workspace, go to Connections → Destinations → Add Destination and search for HubSpot. Select the Wecheer source as the data source.
Click Connect to HubSpot and log in with your HubSpot account credentials. Segment will store the OAuth connection securely.
Map Wecheer events (e.g. RewardReceived, PunchcardCompleted, UserCreated) to HubSpot contact properties or custom events. Use Segment's mapping UI — no code required.
Check your HubSpot contact timeline and custom event log to confirm events are arriving. Use Segment's Event Debugger to troubleshoot any mapping issues.
No engineering effort required: If your team already uses HubSpot and Segment is configured in your workspace, enabling Wecheer as a data source requires no additional code on your side — only Segment destination configuration.
Platform not listed? If your destination is not in the Segment Catalog, use the Custom Function integration to forward events to any proprietary API endpoint.
Integration via Segment Custom Function
Use a Segment Custom Function when you need to transform Wecheer events before forwarding them, or when your destination system is not available in the Segment catalog.
When to Use This Approach
- Your destination system is not in the Segment catalog
- You need to transform or enrich event payloads before forwarding
- You want to apply conditional routing logic (e.g. send only certain event types)
- You need to merge Wecheer data with data from other sources
How It Works
A Segment Function is a small JavaScript function that runs in Segment's cloud infrastructure. It receives incoming Wecheer events, applies your custom logic, and forwards the processed data to your endpoint.
Setup Steps
Step 1: Create a Segment Function
In your Segment workspace, go to Connections → Catalog → Functions and create a new Destination Function.
Step 2: Write Your Transformation
Implement your event handling logic in JavaScript. The function receives a Segment event object and can forward it to any HTTP endpoint.
async function onTrack(event, settings) {
const payload = {
eventName: event.event,
userId: event.userId,
timestamp: event.timestamp,
properties: event.properties
};
const response = await fetch(settings.destinationUrl, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${settings.apiToken}`
},
body: JSON.stringify(payload)
});
if (!response.ok) {
throw new Error(`Request failed: ${response.status}`);
}
}
Step 3: Connect to Wecheer Source
In Segment, connect your newly created Function as a Destination of the Wecheer Source. Configure any required settings (e.g. destination URL, API token).
Step 4: Test and Deploy
Use Segment's Function testing tools to send sample Wecheer events through your function and verify the output before going live.
Note: Segment Functions have execution time limits. For high-volume scenarios, consider batching or using Segment's native destinations where possible.
Integration Responsibilities
Getting your integration live is a team effort — and we've made our part as lightweight as possible. Here's a clear picture of what Wecheer handles, what you'll own, and how we'll have your back every step of the way.
Our goal: Most clients are live in days, not weeks. The clearer we are on who does what from the start, the faster your integration comes together — whichever path you choose.
Our Philosophy
We built our integration around a simple idea: your data environment is yours. Whether Wecheer is sending events into your tools or your platform is sending events into ours, you stay in full control — of your credentials, your data schema, and your business logic. No external party needs access to your internal systems.
Our role is to make the setup fast and the testing safe. We provide everything your team needs to move quickly — documentation, schemas, credentials, and a sandbox — so that by the time you go live, there are no surprises.
Send Events from Wecheer
This covers the outbound flow: Wecheer campaign events (reward earned, stamp received, user registered, etc.) flowing into your CRM, marketing platform, or data warehouse via Segment.
Via Segment Source Recommended
| Step | Handled by |
|---|---|
| Add Wecheer as a Source from the Segment Sources catalog | You |
Name the source and save the settings (e.g. Wecheer_Prod, Wecheer_Staging) | You |
| Copy the Write Key from the Wecheer source settings page in Segment | You |
| Log in to Wecheer and navigate to Advertiser Settings → Outbound Events → Segment, then paste the Write Key | You |
| Select the list of events to subscribe to and save the configuration | You |
| Provide the full event schema, field definitions & sample payloads | Wecheer ✦ |
| Support and troubleshoot any issues with event delivery | Wecheer ✦ |
HubSpot tip: If HubSpot isn't yet connected to your Segment workspace, it only takes a few minutes to add — no code required, just an OAuth login. Your Segment admin can do this directly from the Segment Catalog. We're happy to walk you through it on a call.
Via Segment Custom Function
| Step | Handled by |
|---|---|
| Provide the event schema, payload structure & integration guide | Wecheer ✦ |
| Write the JavaScript function logic in your Segment workspace | You |
| Configure your destination endpoint & API credentials in the function | You |
| Connect the function to the Wecheer Source | You (we'll guide you) |
| Test, validate & deploy to production | You |
Send Events to Wecheer
This covers the inbound flow: your platform sending purchase, scan, or engagement events into Wecheer via our API to trigger points, stamps, and rewards in real time.
Via API
| Step | Handled by |
|---|---|
| Provide API documentation, endpoint specs & event payload definitions | Wecheer ✦ |
| Provision your API credentials (Client ID & Secret) at the advertiser level | Wecheer ✦ |
| Provide a sandbox environment for safe pre-production testing | Wecheer ✦ |
| Configure the Wecheer campaign to accept and process your events | Wecheer ✦ |
| Implement the API calls from your system (authentication, payload construction, error handling) | You |
| Map your internal events to Wecheer's expected event format | You |
| Test your integration against the sandbox and validate event processing | You (we'll review results together) |
| Confirm production readiness & flip to live | Together |
About API credentials: Your Client ID and Secret are generated by Wecheer and configured at the advertiser level. We'll share these with your technical team at the start of the integration. Credentials can be rotated at any time — just reach out to your Wecheer account manager.
Need a Hand? We've Got You.
If your team is stretched thin or you'd rather have us handle the heavy lifting, Wecheer offers hands-on implementation support through our paid Professional Services offering.
Just let your Wecheer account manager know and we'll put together a proposal that fits your timeline and scope.
Pro tip for a fast launch: The single biggest factor in integration speed is having the right people aligned early on your side. Loop in your Segment admin, your CRM owner, and your backend developer from day one — and you'll be live before you know it.
At a Glance
✦ Wecheer takes care of
- Segment Source setup & workspace invitation
- Full event schema & documentation
- API credentials & sandbox environment
- Campaign configuration to receive your events
- Enabling your live production stream
- Ongoing technical support & Q&A
Your team brings
- Segment workspace access & invitation acceptance
- Destination setup & credentials (HubSpot, Salesforce, etc.)
- Event mapping to your internal schema
- Custom Function code, if using that path
- API implementation & sandbox testing
Event Scheme
Wecheer emits three categories of Segment events. All events follow the standard Segment track structure with Wecheer-specific properties.
Base Event Structure
{
"type": "track",
"event": "EventName",
"userId": "user-uuid-12345",
"timestamp": "2026-01-15T12:34:56.789Z",
"properties": { },
"context": { "source": "wecheer", "version": "1.0" }
}
Consumption Events
Events triggered by product scans, purchases, and reward-earning activities.
| Event | Description |
|---|---|
any_consumption | User scans QR code or receipt validated |
first_consumption | User's first consumption in campaign |
consumption_match_item | Receipt item matched campaign rules |
points_received | Points awarded to user |
PunchcardStampsReceived | Stamps earned on punchcard |
punchcard_step_completed | Punchcard milestone reached |
card_received | User received a campaign card |
CheercoinsUpdated | Coin balance changed |
Example: points_received
{
"type": "track",
"event": "points_received",
"userId": "user-uuid-12345",
"timestamp": "2026-01-15T12:34:56.789Z",
"properties": {
"eventId": "evt-uuid-12345",
"campaignId": "camp-12345",
"points": 150,
"reason": "product_scan",
"previousBalance": 1000,
"newBalance": 1150
}
}
User Events
Events related to user registration, profile updates, and data sharing.
| Event | Description |
|---|---|
user_created | New user registered |
user_updated | Profile information changed |
user_data_shared | User shared data with campaign |
UserChannelSubscriptionChanged | Communication preferences changed |
Example: user_created
{
"type": "track",
"event": "user_created",
"userId": "user-uuid-12345",
"properties": {
"email": "[email protected]",
"phone": "+1234567890",
"registrationSource": "campaign_link",
"campaignId": "camp-12345",
"marketingConsent": true
}
}
Reward Events
Events for reward catalog and redemption activities.
| Event | Description |
|---|---|
RewardCreated | New reward added to catalog |
CatalogRedeem | User redeemed reward from catalog |
Redeem Reward Started | Redemption process initiated |
Redeem Reward Failed | Redemption failed |
Example: CatalogRedeem
{
"type": "track",
"event": "CatalogRedeem",
"userId": "user-uuid-12345",
"properties": {
"redemptionId": "redeem-uuid-12345",
"rewardId": "reward-uuid-12345",
"rewardName": "Coffee Voucher",
"cost": { "points": 500 },
"voucherCode": "COFFEE-ABC123"
}
}
Integration via API (Webhook)
Coming Soon: Direct webhook delivery for outbound events is currently under development and will be available in a future release.
What to Expect
The Webhook integration will allow Wecheer to deliver outbound events directly to an HTTP endpoint of your choice — without requiring a Segment workspace. This is ideal for clients who prefer direct server-to-server communication or have specific infrastructure requirements that make Segment impractical.
Interested in the Webhook integration? Contact your Wecheer account manager to register your interest and be notified when it becomes available.
Integration via Segment Destination
Coming Soon: The Wecheer Segment Destination is currently under development and will be available in a future release.
What to Expect
The Segment Destination integration will allow you to send events to Wecheer directly from your existing Segment workspace — using your existing Segment tracking infrastructure. Instead of integrating with the Wecheer API directly, you will simply add Wecheer as a Destination in Segment and route the relevant events.
In the meantime, you can integrate with Wecheer using the Integration via API approach.
User Conditions for Receiving Rewards
Before a user can receive rewards through the Wecheer platform, the following conditions must be met.
1. Campaign Participation
The user must join a campaign to be eligible for rewards.
Note: For the testing campaign in the staging environment, use the following link: https://staging.wecheer.me/loyalty/sb/ee1a6e8d-04e844cc-b3f3597195717ba5
When the user opens this link and logs in, they will automatically join the campaign.
2. Unique Consumption
The consumption event must not have been previously processed. This is verified using the consumptionId, which must be unique for each consumption.
3. User Status
The user must not be blocked on the Wecheer side.
Consumption Endpoint
Used to process dynamic events based on configured SKUs from the platform, synthetically created to reflect user actions. For example, custom actions done by users in the client system that should trigger a reward.
Environment: Staging
URL: https://api.wecheer.me/staging-campaigns/api/advertiser-integration/v1/consumption
Supported Dynamic Events
* This list of events is for informational purposes only. Any event type can be added and expanded at the advertiser/campaign level.
** Event names may be changed in the future after final confirmation.
| Event Name | Final SKU Name | Comment | Rewards |
|---|---|---|---|
| Device Registered | glo_kz_deviceregist | Triggered when user registered device | 990 |
| Read Article | velo_pk_article_thr | Triggered when the user reads a specific article on the e-commerce website | 50 |
| Leave a Review | velo_pk_product_review | Triggered when the user leaves a review on the e-commerce website | 100 |
| Where did you use your velo quirky poll | velo_pk_poll_location | 100 | |
| Did you make it through the weird to the wonderful quirky poll | velo_pk_poll_experience | 100 | |
| Layered Awareness quirky poll | velo_pk_poll_strength | 100 |
Header Parameters
| Header Name | Header Value | Is Mandatory | Comment |
|---|---|---|---|
Authorization | Bearer token | Yes | Use token from response of Authorize Endpoint |
Content-Type | application/json-patch+json | Yes |
Request Details (Payload)
{
"consumptionId": "I198037776491223",
"consumptionDate": "20250425T12:34:00Z",
"identifiers": [
{
"key": "phoneNumber",
"value": "40720005123"
},
{
"key": "email",
"value": "[email protected]"
}
],
"consumptionLines": [
{
"sku": "velo_pk_poll_strength",
"quantity": 1
}
]
}
| Field Name | Field Type | Is Mandatory | Example | Description |
|---|---|---|---|---|
consumptionId | string | Yes | I198037776491223 | Id of the event in the client system. Must be unique. |
consumptionDate | string | Yes | 20250425T12:34:00Z | The datetime of the consumption in the client system. ISO 8601 format: YYYYMMDDTHH:MM:SSZ |
identifiers | Array of Identifier objects | Yes | Information about the user. We support a combination of phoneNumber and email. Phone number gives better results as it is unique in our system. At least one identifier is mandatory. | |
consumptionLines | Array of Consumption objects | Yes | Contains the details of the dynamic event with quantity. Multiple lines are supported at the same time. |
Identifier Object
| Field Name | Field Type | Is Mandatory | Example | Description |
|---|---|---|---|---|
key | string | Yes | email | Key of user identifier. We support 2 types of keys: phoneNumber, email |
value | string | Yes | [email protected] | The identifier's value (phone number or email) |
Consumption Object
| Field Name | Field Type | Is Mandatory | Example | Description |
|---|---|---|---|---|
sku | string | Yes | velo_pk_poll_strength | Use SKU name from the dynamic event configuration |
productName | string | No | Device Registration Reward | For Dynamic events is equal to SKU. Optional. |
quantity | number | Yes | 1 | For Dynamic events should be 1 |
Request Sample (Curl Command)
curl -X 'POST' \
'https://api.wecheer.me/staging-campaigns/api/advertiser-integration/v1/consumption' \
-H 'accept: text/plain' \
-H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...' \
-H 'Content-Type: application/json-patch+json' \
-d '{
"consumptionId": "I198037776491223",
"consumptionDate": "20250425T12:34:00Z",
"identifiers": [
{
"key": "phoneNumber",
"value": "40720005123"
},
{
"key": "email",
"value": "[email protected]"
}
],
"consumptionLines": [
{
"sku": "velo_pk_poll_strength",
"quantity": 1
}
]
}'
Status Codes
| Status | Description |
|---|---|
200 Ok | Event successfully published |
400 Bad Request | Request is invalid. Possible messages: Missing AdvertiserId or ApiKey / Request body cannot be null / ConsumptionId is required / Identifiers are required |
401 Unauthorized | Client not authorized |
404 Not Found | Account not found (user not registered) / User has no cards (user did not join campaign) |
409 Conflict | Event already registered. Possible message: Consumption already processed |
500 Internal Server Error | Internal server error |
Integration via API
Send events directly to Wecheer using the Inbound API. This is the primary integration method for triggering rewards, processing user actions, and syncing data from your systems to the Wecheer platform.
Available Endpoints
| Endpoint | Purpose |
|---|---|
| Authorization | Get access token for API calls |
| Consumption | Send consumption/action events |
| Profile Sync | Sync user profile data (Coming 2026) |
Quick Reference
API Endpoints
| Endpoint | Method | Purpose |
|---|---|---|
/api/advertiser/v1/authorize | POST | Get access token |
/api/advertiser-integration/v1/consumption | POST | Send consumption events |
Base URLs
| Environment | Authorization API | Consumption API |
|---|---|---|
| Staging | https://api.wecheer.me/staging-usermanagement | https://api.wecheer.me/staging-campaigns |
| Production | https://api.wecheer.me/usermanagement | https://api.wecheer.me/campaigns |
Use Cases
Profile Completion
User fills out profile → Welcome reward
Product Review
User submits review → Review points
Survey Completion
User answers survey → Survey reward
Content Engagement
User reads article or watches video → Engagement points
Status Codes & Errors
HTTP status codes and error responses from the Wecheer API.
HTTP Status Codes
| Code | Status | Description |
|---|---|---|
200 | OK | Request succeeded |
400 | Bad Request | Invalid request format |
401 | Unauthorized | Missing or invalid authentication |
404 | Not Found | Resource does not exist |
409 | Conflict | Resource conflict (duplicate) |
429 | Too Many Requests | Rate limit exceeded |
500 | Internal Server Error | Unexpected server error |
Common Error Codes
| Code | Description | Solution |
|---|---|---|
INVALID_CREDENTIALS | apiKey or apiSecret invalid | Verify credentials |
ACCOUNT_NOT_FOUND | User not registered | User must register first |
USER_HAS_NO_CARDS | User hasn't joined campaign | User must join campaign |
CONSUMPTION_EXISTS | consumptionId already used | Use unique IDs |
Error Response Format
{
"error": {
"code": "ERROR_CODE",
"message": "Human-readable error description",
"details": { }
}
}
Rate Limits
API throttling policies and best practices for handling limits.
Note: Specific rate limit values are configured per advertiser. Contact your Wecheer account manager for your exact limits.
Rate Limit Headers
X-RateLimit-Limit: 300
X-RateLimit-Remaining: 295
X-RateLimit-Reset: 1705320000
Handling Rate Limits
async function requestWithBackoff(fn, maxRetries = 5) {
for (let i = 0; i < maxRetries; i++) {
const response = await fn();
if (response.status === 429) {
const retryAfter = response.headers.get('Retry-After') || 60;
await sleep(retryAfter * 1000);
continue;
}
return response;
}
}
Security & Compliance
Enterprise-grade security practices and certifications.
Infrastructure Security
| Component | Security Features |
|---|---|
| Cloud Platform | AWS with serverless architecture |
| Network | WAF, VPC isolation, TLS 1.2+ |
| Data at Rest | AES-256 encryption |
| Data in Transit | TLS encryption |
SSL Ratings
| Server | SSL Grade |
|---|---|
| api.wecheer.me | A+ |
| app.wecheer.io | A+ |
Compliance
| Regulation | Status |
|---|---|
| GDPR | ✅ Compliant |
| PDPA | ✅ Compliant |
Fraud Prevention
- reCAPTCHA Enterprise
- Phone verification (SMS OTP)
- Velocity checks and rate limiting
- Pattern detection
- Duplicate detection
Glossary
Definitions of key terms used throughout the Wecheer platform.
| Term | Definition |
|---|---|
| Advertiser | The brand or company running campaigns on Wecheer |
| Campaign | A promotional program with defined rules, rewards, and duration |
| Card | A user's membership/participation record in a campaign |
| Cheercoins | Wecheer's universal currency across campaigns |
| Consumption | A validated action that earns rewards |
| Dynamic Event | A configurable action type represented by a SKU |
| Points | Campaign-specific currency earned through consumptions |
| Punchcard | Digital stamp card collecting stamps toward rewards |
| Redemption | Exchanging points/coins for a reward |
| SKU | Unique identifier for products or dynamic events |