Prerequisites
- Access to the source code of your Fire TV app.
- A Fire TV device that supports this integration. Check with your Amazon contact for a list of device types currently supported.
- Your app must participate in the Catalog Ingestion process, so Fire TV recognizes the content IDs.
- Your app must share entitlements for each customer, so Fire TV shows the entitled provider as part of our content discovery experience. For more information, reach out to your Amazon contact.
- Your app must complete the Content Launcher integration.
Integration steps
Step 1. Include the package dependencies in your app
Add thekepler-content-personalization and headless-task-manager as well as amzn/kepler-epg-provider dependencies in your package.json file.
- The
kepler-content-personalizationpackage provides APIs for sending your content personalization data to the system. - The
amzn/kepler-epg-providerpackage would provide the dependencies used forchannelDescriptorinPlaybackEventdata model. - The
headless-task-managerpackage provides APIs to register your data-pull background service with the system. More details are given below.
Step 2. Update your manifest file
Update your manifest.toml file to include Content Personalization support. Below is an example for a sample app:Step 3. Make a sample API call
Begin with a sample/mock event generated at the app launch. To construct the event and send it, use the following code:Step 4. Validate the integration
Trigger the sample event code you constructed to run inside your app. After you run the code successfully, view the logs to validate the SDK has been linked to your app and is processing the message. You can validate the steps by searching your app logs:Step 5. Make API calls as part of in-app functionality
For each data type, review the data type’s When to Send section to understand where in your code to make calls to Vega Content Personalization. Find the relevant parts of your code that run when customers take each action and add an API call. Each data type has different triggers.- For Watch Activity, see Watch Activity: When to Send.
- For Watchlist, see Watchlist: When to Send.
reportNewCustomerListEntry API with the relevant information. First locate the code in your app that adds items to the watchlist, and then make the API call as part of your logic.
Step 6. Implement your data pull service for background or off-device data
To allow Amazon to pull data from your app, implement the service as described below. The service contains everything needed to setup and connect, only requiring you to implement the functions to send data to a receiver object. This object allows you to share data in chunks, as needed. This prevents loading large lists into memory.-
Create a service.js file with the same path where package.json is located with the following content. This tells the system about the entry points for your
content.dataRefresh.providerservice. -
Create your Headless Service Interface file under src/headless/HeadlessServiceInterface.ts with the following content:
-
Create your data pull service under src/headless/HeadlessService.ts with the following content:
Implementation details
Make changes to your catalog integration when directed by your Amazon contact
To make use of the entitlement and activity data, Fire TV needs the following data from your existing Fire TV catalog integration. Fire TV’s public catalog integration documentation will be updated to include these elements in the future, but here is a preview of what’s needed concerning the Vega Content Personalization integration. Your Amazon contact will inform you of when to begin these catalog changes.- TVOD (Purchases and Rentals) - Add new purchase and rental offers to applicable titles. They will look identical to subscription offers, but without a Subscription ID.
- International - For expansion into other countries, Fire TV is moving from per-country catalogs to Fire TV’s global catalog format. The above mentioned catalog changes enable an easier transition if included and launched as part of your global catalog. However, Fire TV still supports per-country catalogs.
Amazon content ID
Vega Content Personalization supports content identification across different namespaces. All content IDs must be passed with an associated namespace in order for Amazon to identify the content item. Amazon supports the following namespace:Amazon profile ID
All data types allow you to share an associated profile ID. Since there are different profile types, specify the namespace. Amazon currently supports the following profile ID namespace:Reporting updates
The SDK contains functionality to share information using three types of operations:New(example:reportNewCustomerListEntry)- Represents an incremental update to add a new entry to the dataset.Removed(example:reportRemovedCustomerListEntry) - Represents a decremental update to remove an entry from the dataset.Refreshed(example:reportRefreshedCustomerList) - Indicates that there have been changes to the dataset due to off-device action, and a new refreshed version of the list needs to be fetched using the data pull service.
New and Removed are useful when the customer interacts with content in the app, and it performs adds or removes. The Refreshed update is useful when there are significant changes to the list due to customer sign-in, off-device activity, or if you suspect the list is out of sync for another reason.

