Crownpeak
  • Product Discovery Developer Guide
  • ๐Ÿ›’Item catalog management
    • What is the Items API?
    • How to work with Items
      • Item Schema
        • Attributes
        • Nested Item Schemas
        • Using the Item Schema API
        • DefaultLocale API
        • Onboarding on/migrating to Fredhopper
        • List of Reserved Attributes
      • Category Tree
        • Using the Category Tree API
        • Onboarding on XO
      • Item Catalog
        • Using the Catalog API
      • Items
        • Using the streaming Items API
        • Using the batch Items API
    • Step by Step guide
      • Step by step guide for Fredhopper customers
    • Feedback
      • Using the Feedback API
    • Authorization to APIs
    • Troubleshooting API errors
  • ๐ŸŽฏXO Recommendations
    • Introduction
    • Using the Recommendations API
    • Setting up the Chrome extension
    • Micro-segmentation
    • XO Legacy APIs
  • ๐Ÿ”ŽXO Search
    • Introduction
    • Getting started
    • API Reference
      • Search API
      • Autocomplete API (Beta)
      • Product Suggest API
    • API Parameters
      • Search
      • Pagination
      • Faceting
      • Sorting
      • Grouping
      • Filtering
      • Disable features
      • Response mask
      • Context
    • Configuration limitation
  • ๐ŸงชA/B testing
    • Fredhopper A/B testing
      • Integration steps for a non-caching solution
      • Integration steps for a caching solution
        • Java SDK Integration
          • Setup
          • Retrieve running A/B tests - Java SDK
          • Filter and request variant - Java SDK
          • Extending the SDK
        • Manual A/B tests integration
          • Retrieve running A/B tests
          • Filter out irrelevant A/B tests
          • Assign variants to user
          • Request variant for page
        • Limitations and Best Practices
  • ๐Ÿ“šResources
    • Glossary
    • Best Practices
      • Tracker Best Practices
      • Items API Best Practices
      • Fredhopper Data Configuration Best Practices
      • Fredhopper Query Response Best Practices
      • Fredhopper Merchandising Studio Best Practices
    • Privacy Notice
  • Archived Pages
    • FHR Tracking plan
    • XO Tracking plan
    • The Tracking API and JS Library
      • What to Track
        • Generic Actions
          • View
          • Click
          • Add to Cart
          • Remove from Cart
          • Purchase
        • Custom Actions
      • Initializing the JavaScript Library
      • REST API Technical Documentation
Powered by GitBook
On this page
  1. A/B testing
  2. Fredhopper A/B testing
  3. Integration steps for a caching solution
  4. Java SDK Integration

Extending the SDK

The SDK is designed to be easily extendable by providing custom implementations of the RunningAbTestsFetcher and AbTestsCache interfaces. Once provided to the AbTesting object through the builder, these will be called by the AbTesting object in the flow.

Warning! Custom implementations should only be if you absolutely need them. Attraqt can not offer support with integration of custom implementations.

The interface for RunningAbTestsFetcher can be imported as:

com.attraqt.sdk.fhr.abtesting.retrieval

And for AbTestsCache this can be imported as:

com.attraqt.sdk.fhr.abtesting.caching

Both rely on the model for RunningAbTests provided in the following location:

com.attraqt.sdk.fhr.abtesting.model;

Please ensure that the A/B tests server URL is not hit as part of any custom AbTestsCache implementation. RunningAbTestsFetcher implementations should take responsibility for fetching the AB tests, whereas AbTestsCache implementations should only be responsible for caching the A/B tests provided to it, rather than doing any calls to the server.

Warning! When doing a custom implementation, please make sure to respect the minimum refresh time of 5 minutes, as otherwise we'd be forced to implement a throttling mechanism to avoid unnecessary load on our services.

Once the new object has been created, pass it to the AbTestingBuilder through the respective method (i.e. abTestsCache or runningAbTestsFetcher).

PreviousFilter and request variant - Java SDKNextManual A/B tests integration

Last updated 3 years ago

๐Ÿงช