Advanced Features
Luigi's Box Autocomplete integrates seamlessly with other services like Fixits, Banners, and Recommender.
Fixits (Redirects)
Autocomplete can automatically handle "Fixit" rules (redirects) that you define in the application.
- Mechanism: If a user's query exactly matches a Fixit rule, the API response will include a
suggested_url. - Action: Your frontend should check for this
suggested_urland redirect the user immediately, skipping the search results page.
Example Response:
{
"suggested_url": "http://www.e-shop.com/special_landing_site/HP?lb_redirected_from=harry+potter"
}
Banner Campaigns
You can display banner campaigns directly in the autocomplete dropdown (e.g., for specific brands or seasonal promotions).
- Data Source: Banners are managed in the Luigi's Box application.
- Response: The API returns a
campaignsarray containing banner image URLs for desktop and mobile, along with the target URL. - Documentation: See Banner Campaigns for setup instructions.
Example Response:
"campaigns": [
{
"id": 9,
"target_url": "https://www.e-shop.com/harry-potter",
"banners": {
"autocomplete_list": {
"desktop_url": "https://www.e-shop.com/harry-potter-1.jpg",
"mobile_url": "https://www.e-shop.com/harry-potter-2.jpg"
}
}
}
]
Query Rewrite
The API automatically applies Query Rewrite rules to improve relevant results. This happens transparently on the backend; no frontend action is required.
Recommender Integration
The Autocomplete API uses the Recommender service as its underlying engine for retrieving:
- Top Items: Popular items shown when the search field is empty.
- Personalized Content: Results tailored to the specific user (if
user_idis provided).