This page describes how to create a custom recommendations app.
Console
To use the Google Cloud console to create a custom recommendations app, follow these steps:
-
In the Google Cloud console, go to the AI Applicationspage.
-
On the Appspage, click Create app.
-
On the Create Apppage, under Recommendations engine, click Create.
-
In the Your app namefield, enter a name for your app. Your app ID appears under the engine name.
-
Optional: Click Editto edit your app ID.
-
Click Continue.
-
To connect to a data store, on the Data Storespage, select a data store that contains structured data or choose to create a data store. Do one of the following:
-
Select an existing data store, if one is available. A data store can be attached to only one app, and it can't be removed from the app later.
-
Create a new structured data store and ingest data into it. Do this by clicking Create data storeand following the steps in the Create a new data storepane that opens. Then select your new data store. For more information about creating a data store, see Create a custom recommendations data store .
-
-
Optional: To see a list of unavailable data stores, click Learn why.
A table is displayed with a list of data stores and the reason why they are unavailable. Here are some of the reasons why a data store might be unavailable:
- Your data store type allows connection to only one app and the data store is already connected.
- Your data store and your app are in different regions.
- Your data store and your app are of different types. For example, you cannot connect a media data store to a custom recommendations app.
- Your data store has basic website search, whereas a custom recommendations app requires a data store with advanced website indexing.
-
Click Create.
REST
Before you use the command line to create an app, you must have an existing data store. If you don't have a data store, create one following the steps in Create a custom recommendations data store .
To use the command line to create a recommendations app, follow these steps:
-
Find your data store ID. If you already have your data store ID, skip to the next step.
-
In the Google Cloud console, go to the AI Applicationspage and in the navigation menu, click Data Stores.
-
Click the name of your data store.
-
On the Datapage for your data store, get the data store ID.
-
-
Create an app and connect it to a structured data store. A data store can be attached to only one app and can't be removed from the app later.
curl -X POST \ -H "Authorization: Bearer $( gcloud auth print-access-token ) " \ -H "Content-Type: application/json" \ -H "X-Goog-User-Project: PROJECT_ID " \ "https://discoveryengine.googleapis.com/v1alpha/projects/ PROJECT_ID /locations/global/collections/default_collection/engines?engineId= APP_ID " \ -d '{ "displayName": " APP_DISPLAY_NAME ", "dataStoreIds": [" DATA_STORE_ID "], "solutionType": ["SOLUTION_TYPE_RECOMMENDATION"], "similarDocumentsConfig": {} }'Replace the following:
-
PROJECT_ID: the ID of your Google Cloud project. -
APP_ID: the ID of the recommendations app that you want to create. -
APP_DISPLAY_NAME: the display name of the recommendations app that you want to create. -
DATA_STORE_ID: the ID of an existing recommendations data store that you want to add to the recommendations app.
-
What's next
- To preview how your recommendations appear, see Get recommendations .

