About This Topic
We built a mechanism to retrieve point balance from the POS system (Smaregi) in real-time for customers logged into the online store.
By enabling customers to check points earned at stores online, we achieve an omnichannel experience.
Why Real-Time Retrieval is Important
Problems with Periodic Batch Sync
| Problem | Specific Impact |
|---|---|
| Data freshness | Points used at store just now not reflected |
| Customer confusion | Inquiries like 'Points weren't deducted' |
| Reduced trust | Can't trust online display |
| Operational burden | Need to handle batch failures |
Benefits of Real-Time Retrieval
- Always display latest point balance
- Reduced customer inquiries
- Accurate display even "right after store use"
Overall Architecture
Access my page after login
Authenticated -> Continue / Not logged in -> Login screen
API call to your server
Example: gid://shopify/Customer/12345 -> 12345
Search POS system with member number
Get current points, expiration, etc.
Return to frontend and display point balance on screen
Three Key Points for Implementation
Three important elements are needed to realize this mechanism.
1. Complete Point Retrieval Flow
Detailed explanation of the flow from opening my page to displaying points.
-> Complete Point Retrieval Flow
2. Shopify ID and POS Member Number Mapping
How to use Shopify customer ID as POS member number to link online and offline customers.
3. API Authentication and Security
Proper authentication is required since point balance is personal information. Explanation of security design.
-> API Authentication and Security
Customer Screen Image
Displayed Information
| Item | Display Example |
|---|---|
| Customer name | Mr. Taro Yamada |
| Current point balance | 1,250 pt |
| Expiration | December 31, 2025 |
| Action | Use Points button |
Recent Point History
| Date | Content | Points |
|---|---|---|
| 01/15 | Store purchase | +100pt |
| 01/10 | Online purchase | +50pt |
| 01/05 | Coupon exchange | -500pt |
Performance Considerations
Response Time Goals
| Process | Duration |
|---|---|
| Auth verification | ~100ms |
| POS API call | ~500-800ms |
| Data formatting/display | ~100ms |
| Total goal | Under 1 second |
Long wait times degrade UX, so loading display improves perceived performance.
Cache Considerations
Benefits of This Mechanism
For Customers
- Can check latest point balance anytime
- Accurate display even right after store purchase
- No stress from "points seem wrong"
For Operations
- Reduced inquiries about points
- No complaints from data inconsistency
- Improved customer satisfaction with omnichannel experience