Onboarding a new client problem

hello i am trying to create a workflow for my clients (fully automated using python sdk and gcp api) , for each client i create a new project, attach a billing to him, enable api’s and giving a service role i predefined roles for services (retail,storage) then create a new bucket, import a csv as a new catalog (trying to use vertex ai search for commerce) but when i do it i get this error which it means i need to approve terms of service manually inorder for the service to work, i want to do it fully automated, is there anyway to do it?

the error:

Status: 400
Response: {
“error”: {
“code”: 400,
“message”: “The resource project demo_project_x doesn’t have Cloud Retail enabled or it hasn’t accepted Retail data use terms. You can update those in Retail Admin Console, https://console.cloud.google.com/ai/retail/start.”,
“status”: “FAILED_PRECONDITION”
}
}

1 Like

Hey @Yuval_Ben_Yaakov ,

yes this is a pain that comes when making for each client a project, for each enabling the API’s. My issue with this approach is that, as much as this eases billing, you have a limited quota for the amount of projects you can make on GCloud (25 ig), and for you to reach this amount of clients it’d be a good idea to invest some time in making a backend tool that can be called at the beginning of your dialogflow cx session to manage on a db what you need to manage instead of many projects.

In a perfect setting, only having one agent for all your client is best, the agent getting the context loaded. Parameters can help here to make things easier, traceable with IDs.

What I know you can automate the enablement of any Google Cloud API with gcloud (hence programmatically), idk if it applies for the search commerce solution.