> ## Documentation Index
> Fetch the complete documentation index at: https://docs.affelios.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Playbook Integration

> Complete guide for integrating your Affelios affiliate program with Playbook Sportsbook and Casino platform

<Info>
  This comprehensive guide walks through the process of integrating your Affelios program with the Playbook online sportsbook and casino platform. The integration enables automatic data synchronization and seamless affiliate tracking for your gambling business.
</Info>

## Prerequisites

Before starting the integration process, ensure you have the following:

* **Active Affelios subscription** - Any plan (Flex, Pro, or Enterprise)
* **Live Brand on Playbook** - Your brand must be operating on the Playbook Sportsbook and Casino platform
* **HTTP CSV Endpoints** - Registration and Transaction endpoints provided by Playbook
* **Whitelisted IP Addresses** - Playbook must whitelist required Affelios IP addresses for your brand
* **Admin Access** - Full administrative privileges to your Affelios account

<Warning>
  The integration process requires coordination with Playbook support to whitelist Affelios IP addresses. Contact us via Intercom or email [support@affelios.com](mailto:support@affelios.com) to obtain the required IP addresses before proceeding.
</Warning>

***

## Integration Benefits

<Card title="Key Features" icon="star">
  The Affelios-Playbook integration provides powerful features to streamline your affiliate program management and boost performance in the gambling industry.
</Card>

<AccordionGroup>
  <Accordion title="Automated Data Import">
    **Seamless Data Management:**

    * Daily automatic import of player registrations and transactions
    * Real-time commission calculations based on actual gaming revenue
    * Automated deduction handling for payment fees and taxes
    * No manual data entry required
  </Accordion>

  <Accordion title="Multi-Product Tracking">
    **Comprehensive Revenue Tracking:**

    * Separate tracking for Sports, Casino, Live Casino, and Virtual Sports
    * Individual product revenue and wagering tracking
    * Detailed commission breakdowns by product type
    * Flexible commission plans per product category
  </Accordion>

  <Accordion title="Advanced Attribution">
    **Precise Player Attribution:**

    * 30-day cookie tracking with btag parameter
    * Automatic ClickKey generation for proper attribution
    * Player registration and transaction linking
    * Anonymous transaction prevention
  </Accordion>
</AccordionGroup>

***

## Step-by-Step Integration Guide

### Step 1: Create a Brand in Affelios

<Steps>
  <Step title="Access Brand Creation">
    Navigate to your Affelios dashboard and go to the **"Brands"** section in the left-hand navigation menu.
  </Step>

  <Step title="Create New Brand">
    Click **"Create Brand"** and fill in the required information for your Playbook casino website.
  </Step>

  <Step title="Configure Brand Settings">
    Set up your brand with the proper tracking parameters and commission settings.
  </Step>
</Steps>

<Info>
  If you already have a brand set up, you can skip to Step 2. If you need help creating a brand, follow our [Brand Creation Guide](/knowledge-base/operators/setup-guide#create--configure-a-brand).
</Info>

#### Brand Configuration Example

For a brand called **"BetTest.com"**, use these settings:

<Card title="Brand Step 1 - Basic Information" icon="gear">
  | **Field**        | **Example**                                                                 | **Description**                                              |
  | ---------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------ |
  | Name             | Bet Test                                                                    | Display name shown to affiliates and in reports              |
  | Industry         | Gambling                                                                    | Used to categorize and filter brands                         |
  | External ID      | bettest                                                                     | Unique value used externally (best practice)                 |
  | Landing Page URL | [https://bettest.com?btag=\[ClickKey](https://bettest.com?btag=\[ClickKey)] | Playbook supports 30-day cookie tracking with btag parameter |
</Card>

<Card title="Brand Step 2 - Advanced Settings" icon="settings">
  | **Field**                    | **Example** | **Description**                                  |
  | ---------------------------- | ----------- | ------------------------------------------------ |
  | Auto-Approve Commissions     | Enabled     | Recommended to avoid data delays                 |
  | Allow Anonymous Transactions | Disabled    | **Important:** Keep disabled for Playbook brands |
  | Deposit Fees                 | 3%          | Payment fees deducted from Net Revenue           |
  | Tax Rate Deduction           | 21%         | Point of Consumption Taxes                       |
  | Net Revenue Deduction        | 15%         | Platform and Game Costs                          |
</Card>

### Step 2: Configure Playbook Integration Settings

<Steps>
  <Step title="Access Integration Settings">
    Navigate to the **"Brands"** page and click the three dots next to your brand, then select **"Integration Settings"**.
  </Step>

  <Step title="Select CSV HTTP Integration">
    Choose **"Csv Http"** from the available integration methods for Playbook.
  </Step>

  <Step title="Configure HTTP Connection">
    Enter the CSV endpoint details provided by your Playbook account manager.
  </Step>
</Steps>

<Warning>
  You must obtain the CSV endpoint details from your Playbook account manager before proceeding. Contact them if you don't have these details.
</Warning>

### Step 3: Set Up HTTP Connection Settings

<Card title="HTTP Connection Configuration" icon="link">
  Configure the connection settings using the details provided by Playbook:

  | **Field**                      | **Example**                                                  | **Description**                                  |
  | ------------------------------ | ------------------------------------------------------------ | ------------------------------------------------ |
  | Protocol                       | HTTPS                                                        | Enable HTTPS for secure data transfer            |
  | HTTP Hostname                  | documents-api.prod.bettest-multi.tup-cloud.com               | Hostname containing your unique brand identifier |
  | Username (Basic Auth)          | -                                                            | Not required for Playbook                        |
  | Password (Basic Auth)          | -                                                            | Not required for Playbook                        |
  | Registration Filename Template | affiliate-documents/bettest/accounts/\[YEAR]-\[MONTH]-\[DAY] | Path to Registrations file with date tokens      |
  | Transactions Filename Template | affiliate-documents/bettest/sales/\[YEAR]-\[MONTH]-\[DAY]    | Path to Transactions file with date tokens       |
</Card>

<Info>
  The filename templates use automatic token replacement: \[YEAR] (e.g., 2030), \[MONTH] (e.g., 12), \[DAY] (e.g., 31). Affelios will request the previous day's data each morning.
</Info>

### Step 4: Configure Field Mapping

After establishing a valid connection, you'll need to map the CSV fields to Affelios fields.

#### Customer Field Mapping

<Card title="Registration Data Mapping" icon="user">
  Map the available fields from the Registrations CSV to Affelios fields:

  | **Affelios Field**   | **Description**                     | **External Field Example** |
  | -------------------- | ----------------------------------- | -------------------------- |
  | Registration Date    | The date the player registered      | ACCOUNT\_OPENING\_DATE     |
  | External Customer ID | The Playbook ID for the player      | PLAYER\_ID                 |
  | Click Key            | Unique value generated by Affelios  | BTAG                       |
  | Customer Username    | Anonymized username from Playbook   | USERNAME                   |
  | Country Code         | 2-letter country code of the player | PLAYER\_COUNTRY            |
</Card>

#### Transaction Field Mapping

Playbook returns aggregated totals for Deposits, Wagering, and Revenue split by Product. You'll need to create multiple product maps:

<AccordionGroup>
  <Accordion title="Default Map (Deposits)">
    **Required for Deposit Tracking:**

    | **Affelios Field**   | **Description**             | **External Field Example** |
    | -------------------- | --------------------------- | -------------------------- |
    | External Customer Id | The Playbook Player ID      | PLAYER\_ID                 |
    | Transaction Date     | The Date of the transaction | TRANSACTION\_DATE          |
    | Deposits             | Sum total of Deposits       | DEPOSITS                   |

    *All other fields should be left blank for the Default Map.*
  </Accordion>

  <Accordion title="Sports Product Map">
    **Sports Betting Revenue:**

    | **Affelios Field**   | **Description**             | **External Field Example** |
    | -------------------- | --------------------------- | -------------------------- |
    | External Customer Id | The Playbook Player ID      | PLAYER\_ID                 |
    | Transaction Date     | The Date of the transaction | TRANSACTION\_DATE          |
    | Gross Revenue        | Sum total of Sports Revenue | SPORTSBOOK\_REVENUE        |
    | Wagering             | Sum total of Sports Stake   | SPORTSBOOK\_STAKE          |
  </Accordion>

  <Accordion title="Virtual Sports Product Map">
    **Virtual Sports Revenue:**

    | **Affelios Field**   | **Description**                     | **External Field Example** |
    | -------------------- | ----------------------------------- | -------------------------- |
    | External Customer Id | The Playbook Player ID              | PLAYER\_ID                 |
    | Transaction Date     | The Date of the transaction         | TRANSACTION\_DATE          |
    | Gross Revenue        | Sum total of Virtual Sports Revenue | VIRTUAL\_SPORTS\_revenue   |
    | Wagering             | Sum total of Virtual Sports Stake   | VIRTUAL\_SPORTS\_stake     |
  </Accordion>

  <Accordion title="Casino Product Map">
    **Casino Revenue:**

    | **Affelios Field**   | **Description**             | **External Field Example** |
    | -------------------- | --------------------------- | -------------------------- |
    | External Customer Id | The Playbook Player ID      | PLAYER\_ID                 |
    | Transaction Date     | The Date of the transaction | TRANSACTION\_DATE          |
    | Gross Revenue        | Sum total of Casino Revenue | CASINO\_revenue            |
    | Wagering             | Sum total of Casino Stake   | CASINO\_stake              |
  </Accordion>

  <Accordion title="Live Casino Product Map">
    **Live Casino Revenue:**

    | **Affelios Field**   | **Description**                  | **External Field Example** |
    | -------------------- | -------------------------------- | -------------------------- |
    | External Customer Id | The Playbook Player ID           | PLAYER\_ID                 |
    | Transaction Date     | The Date of the transaction      | TRANSACTION\_DATE          |
    | Gross Revenue        | Sum total of Live Casino Revenue | LIVE\_CASINO\_REVENUE      |
    | Wagering             | Sum total of Live Casino Stake   | LIVE\_CASINO\_stake        |
  </Accordion>
</AccordionGroup>

### Step 5: Enable Daily Import

<Steps>
  <Step title="Configure Import Settings">
    Toggle the import setting to **"Enabled"** and set the import time to **"03:00 AM"**.
  </Step>

  <Step title="Save Integration">
    Click **"Save Integration"** to complete the setup process.
  </Step>

  <Step title="Verify Connection">
    Affelios will automatically test the connection and validate the field mappings.
  </Step>
</Steps>

<Info>
  Affelios will now automatically request data from your Playbook endpoints each morning at 3 AM and import data into your affiliate program according to your integration settings.
</Info>

***

## Data Import Management

<Card title="Automatic Import Features" icon="rotate">
  Once enabled, data import happens automatically and keeps your affiliate program synchronized with Playbook data.
</Card>

### Import Process

<AccordionGroup>
  <Accordion title="Daily Data Retrieval">
    **Automated Process:**

    * Affelios requests previous day's data from Playbook each morning at 3 AM
    * Both registration and transaction data are imported
    * Data is processed and mapped according to your configuration
    * Commissions are calculated automatically
  </Accordion>

  <Accordion title="Data Validation">
    **Quality Assurance:**

    * Connection validation before each import
    * Field mapping verification
    * Data format validation
    * Error logging and reporting
  </Accordion>

  <Accordion title="Import Monitoring">
    **Track Performance:**

    * View import logs in Settings > Imports
    * Retry failed import attempts
    * Reimport historical data by date range
    * Monitor import success rates
  </Accordion>
</AccordionGroup>

### Managing Imports

<Steps>
  <Step title="Monitor Import Status">
    Check the import logs in your Affelios dashboard to ensure data is being imported successfully.
  </Step>

  <Step title="Review Data Quality">
    Verify that player registrations and transactions are being processed correctly.
  </Step>

  <Step title="Handle Import Errors">
    Use the retry functionality for any failed imports or contact support if issues persist.
  </Step>

  <Step title="Historical Data">
    Reimport historical data if needed using the date range selector in the imports section.
  </Step>
</Steps>

***

## Commission Management

<Card title="Automated Commission Processing" icon="dollar-sign">
  The Playbook integration automatically processes commissions based on your configured settings and product mappings.
</Card>

### Commission Calculation

<AccordionGroup>
  <Accordion title="Revenue-Based Commissions">
    **Gaming Revenue Tracking:**

    * Commissions calculated on Gross Gaming Revenue (GGR)
    * Separate tracking for each product category
    * Automatic deduction handling for fees and taxes
    * Real-time commission updates
  </Accordion>

  <Accordion title="Deduction Management">
    **Automated Deductions:**

    * Deposit fees (e.g., 3% payment processing fees)
    * Tax rate deductions (e.g., 21% Point of Consumption taxes)
    * Net revenue deductions (e.g., 15% platform costs)
    * Transparent deduction reporting
  </Accordion>

  <Accordion title="Product-Specific Rates">
    **Flexible Commission Plans:**

    * Different rates for Sports, Casino, Live Casino, Virtual Sports
    * Customizable commission structures per product
    * Tiered commission plans based on performance
    * Automatic commission approval (recommended)
  </Accordion>
</AccordionGroup>

***

## Troubleshooting

<Card title="Common Issues" icon="wrench">
  Here are solutions to common problems you might encounter during the Playbook integration process.
</Card>

<AccordionGroup>
  <Accordion title="Connection Issues">
    **Cannot Connect to Playbook:**

    * Verify that Playbook has whitelisted the required Affelios IP addresses
    * Check that your HTTP hostname is correct and contains your brand identifier
    * Ensure your Playbook account is active and accessible
    * Contact Playbook support to verify endpoint availability
  </Accordion>

  <Accordion title="Data Import Problems">
    **Data Not Importing:**

    * Check that your filename templates are correct
    * Verify that Playbook is generating the expected CSV files
    * Ensure your brand is properly configured in Playbook
    * Review import logs for specific error messages
  </Accordion>

  <Accordion title="Field Mapping Issues">
    **Incorrect Data Mapping:**

    * Verify that CSV field names match your mapping configuration
    * Check that all required fields are properly mapped
    * Ensure product maps are created for each revenue type
    * Test with a small sample of data first
  </Accordion>

  <Accordion title="Commission Calculation Problems">
    **Commissions Not Calculating:**

    * Verify that your commission plans are properly configured
    * Check that product mappings include revenue fields
    * Ensure auto-approve commissions is enabled
    * Review deduction settings and percentages
  </Accordion>
</AccordionGroup>

### Getting Help

<Steps>
  <Step title="Check Import Logs">
    Review the import logs in Settings > Imports for specific error messages and details.
  </Step>

  <Step title="Contact Playbook Support">
    Reach out to your Playbook account manager for endpoint or data-related issues.
  </Step>

  <Step title="Contact Affelios Support">
    Contact Affelios support via Intercom or email for integration-specific problems.
  </Step>

  <Step title="Provide Details">
    Include information about error messages, import logs, and steps you've already tried.
  </Step>
</Steps>

***

## Best Practices

<Card title="Optimization Tips" icon="lightbulb">
  Follow these best practices to ensure your Playbook integration runs smoothly and effectively.
</Card>

<AccordionGroup>
  <Accordion title="Data Management">
    **Keep Your Data Clean:**

    * Regularly monitor import logs for any issues
    * Ensure Playbook is generating consistent CSV formats
    * Verify that all required fields are being populated
    * Keep historical data for reporting and analysis
  </Accordion>

  <Accordion title="Commission Planning">
    **Optimize Your Commission Structure:**

    * Set competitive commission rates for the gambling industry
    * Consider different rates for different product categories
    * Monitor affiliate performance and adjust rates accordingly
    * Provide clear commission information to affiliates
  </Accordion>

  <Accordion title="Integration Monitoring">
    **Stay on Top of Performance:**

    * Set up alerts for failed imports
    * Regularly review commission calculations
    * Monitor data quality and consistency
    * Keep backup records of important transactions
  </Accordion>

  <Accordion title="Affiliate Support">
    **Support Your Affiliates:**

    * Provide clear information about your gambling products
    * Share performance insights and marketing tips
    * Respond promptly to affiliate questions
    * Recognize top-performing affiliates
  </Accordion>
</AccordionGroup>

***

## Next Steps

<Card title="Your Integration is Complete!" icon="circle-check">
  Congratulations! Your Playbook platform is now successfully integrated with Affelios. Your affiliates can begin marketing your gambling products immediately.
</Card>

### What Happens Next

<Steps>
  <Step title="Data Synchronization">
    Affelios will automatically import player registrations and transactions from Playbook each day.
  </Step>

  <Step title="Commission Processing">
    Commissions will be calculated and processed automatically based on your configured settings.
  </Step>

  <Step title="Affiliate Onboarding">
    Start inviting affiliates to join your program or promote it to attract new partners.
  </Step>

  <Step title="Performance Monitoring">
    Use the Affelios dashboard to monitor clicks, conversions, and commission payouts.
  </Step>

  <Step title="Program Optimization">
    Continuously optimize your program based on performance data and affiliate feedback.
  </Step>
</Steps>

### Additional Resources

<Card title="Further Reading" icon="book">
  * ⚙️ **Program setup:** <Link href="/knowledge-base/operators/setup-guide">Setup Guide</Link> - Complete program configuration and brand management
  * 💰 **Commission management:** <Link href="/knowledge-base/operators/create-manage-commission-plans">Commission Plans</Link> - Advanced commission strategies and configuration
  * 👥 **Affiliate onboarding:** <Link href="/knowledge-base/affiliates/onboarding">Affiliate Onboarding Guide</Link> - Guide for your new affiliates
  * 📊 **Analytics & reporting:** <Link href="/knowledge-base/reporting/reporting">Reporting & Analytics</Link> - Understanding your program performance
  * 🧩 **Other integrations:** <Link href="/integrations/no-code/shopify">Shopify Integration</Link> - Connect with e-commerce platforms
  * 👩‍💻 **API access:** <Link href="/developers/overview">Developer Overview</Link> - Advanced integration options and API documentation
</Card>

<Info>
  Need additional help? Our support team is available to assist with any questions or issues you might have with your Playbook integration. Contact us via Intercom or email [support@affelios.com](mailto:support@affelios.com).
</Info>
