This guide provides Affelios-specific best practices for building high-performance integrations. These recommendations are optimized for industries like iGaming and Trading where real-time customer creation and efficient transaction processing are critical.
Instant Customer Creation
Create Customers at Registration/Purchase
Immediate Customer Creation
Create customers in Affelios immediately when users register or make their first purchase to ensure proper attribution and tracking.
Why Instant Creation Matters
Why Instant Creation Matters
Attribution Benefits:
- Ensures all user actions are properly attributed to affiliates
- Prevents loss of conversion data during user journey
- Enables real-time commission calculations
- Provides immediate tracking link validation
- Seamless integration without user awareness
- No delays in affiliate tracking
- Immediate access to affiliate benefits
Batched Transaction Processing
Optimize for High-Volume Industries
Batched Operations for High-Volume Industries
Use batched transaction processing for industries where customers make multiple transactions in short timeframes. For low-volume industries like e-commerce, instant transaction processing per customer is preferred.
When to Use Batching
When to Use Batching
High-Volume Industries (Use Batching):
- iGaming: Multiple bets, spins, or games per session
- Market Trading: Multiple trades, deposits, withdrawals
- High-frequency applications: Where customers make many transactions quickly
- E-commerce: Single purchases per customer
- Subscription services: Monthly/annual billing
- Low-frequency applications: Where customers make few transactions
- Reduces API call overhead significantly
- Cuts down on processing costs
- Makes Affelios even more cost-effective
- Better resource utilization
- Improves processing efficiency
- Reduces network overhead
- Optimizes data transfer
Transaction Grouping Strategy
Transaction Grouping Strategy
Time Window Grouping:Group all transactions for each customer within a specific time window that you choose. This approach balances cost efficiency with real-time processing needs.Time Window Options:Implementation Considerations:
- 1 Hour: Near real-time processing, higher costs
- 4 Hours: Good balance of efficiency and responsiveness
- 12 Hours: Cost-optimized for most use cases
- 24 Hours: Maximum cost savings, delayed processing
- Closer to real-time processing
- Higher API call frequency
- Better for time-sensitive applications
- Slightly higher processing costs
- Maximum cost savings through batching
- Lower API call frequency
- Better for high-volume, less time-sensitive operations
- Optimal for cost-conscious implementations
Affelios Recommendation: For industries or scenarios with high transaction volume (such as iGaming or trading), Affelios recommends using a 24-hour batching window to maximize cost efficiency and system performance.
- Monitor transaction volume per customer
- Adjust time windows based on peak usage periods
- Consider different windows for different transaction types
- Implement fallback mechanisms for critical transactions
Performance Optimization
Time Window Grouping Strategy
Optimal Transaction Grouping
Group transactions that occurred within your chosen time window to maximize cost efficiency and system performance.
Time Window Grouping Strategy
Time Window Grouping Strategy
Grouping Rules:
- Only group transactions that occurred within the same time window
- Each customer’s transactions are grouped separately
- Transactions outside the window are processed in separate batches
- Maintain chronological order within each batch
- 1 Hour: Group transactions from 00:00-00:59, 01:00-01:59, etc.
- 4 Hours: Group transactions from 00:00-03:59, 04:00-07:59, etc.
- 12 Hours: Group transactions from 00:00-11:59, 12:00-23:59
- 24 Hours: Group all transactions from 00:00-23:59 (daily batches)
- Collect all transactions for each customer within the time window
- Store transactions with timestamps for proper grouping
- Process batches at the end of each time window
- Handle edge cases where transactions span window boundaries
- Process all transactions for a customer within the same time window together
- Send as a single API call to Affelios
- Maintain transaction order and integrity
- Handle failed batches by retrying the entire group
Performance Benefits
Performance Benefits
Cost Optimization:
- Minimal API calls
- Maximum batching efficiency
- Reduced processing overhead
- Lower total costs
- Predictable processing patterns
- Reduced API call frequency
- Better resource utilization
- Improved system stability
Next Steps
Now that you understand the best practices for integrating with the Affelios API, you can build more robust and maintainable applications.
- API Testing - Learn about testing your API integrations
- Error Handling - Learn about error handling and troubleshooting
- API Authentication - Learn about authentication methods
- API Reference - Explore available endpoints
- Integration Examples - See practical integration examples