Rubik is a open-source solution that enables Merchant Center users to improve their offers. It can improve reproved offers or actual ones, with best Merchant Center guidelines. (https://support.google.com/merchants/answer/6101131?hl=en)
Merchant Center offers can be reproved by a number of factors, Rubik aims to find those factors and fix it. The errors that Rubik aims to solve:
- Offers reproved by Image
- Offers reproved by GTIN
Rubik will select reproved offers and re-inserting them on Merchant Center automatically with different images from the same offer
In this demo, Rubik replace the main reproved image with a better image using Vision AI:
Rubik will clean the offer GTIN, this could lead to another error (Required GTIN) but in most cases that offer will be approved.
- Copy this Spreadsheet: Rubik - Spreadsheet Version
- Read this Documentation: Rubik - Spreadsheet Version Docs
- Merchant Center Admin Acess (Account Access -> Users)
- If you have any questions, please reach out in Discussions tab
- Content API - Enabled on GCP (Required) - See: https://developers.google.com/shopping-content/guides/quickstart
- Machine with Docker and Python3+ (Required)
- Merchant Center Admin Acess (Account Access -> Users), your user need to be MCA admin and with validated status
- OAuth Desktop Credentials on GCP, with CLIENT_ID and CLIENT_SECRET (Required)
- Go to API & Services > OAuth Consent Screen > Mark it as Internal, there is no need to fill other fields
- Then go to API & Services > Credentials > Create Credentials > OAuth Client ID
- Application Type: Desktop
- Name: rubik-desktop (can be anything)
- Google Big Query - Enabled (Required)
- Rubik will read from your dataset. You need to have Bigquery's Merchant Center data transfer running: https://cloud.google.com/bigquery/docs/merchant-center-transfer
- Google Cloud Storage - Bucket created (Required)
- Google Cloud Vision AI - Enabled on your GCP project (Required if you want to use Vision AI) (https://cloud.google.com/vision)
Assuming that you have 100 offers with each offer having 6 images and the main image (first) is reproved.
-
The rubik_view.sql will find those 100 offers and will rotate the first image of each offer with the second one, so the second one will be the main image
-
If you don't want to use vision ai it will send all offers with the second offer being the main image. However, if you want to use vision AI it will score all images and choose the best one (from 2 to 6)
-
The output should be a offer updated with a different image, use the custom_label to see if that image will be approved and displayed into Google Ads.
1 - Prepare the CSV file (follow the sample.CSV) or Bigquery table (follow the sql/rubik_view.sql)
2 - Generate your tokens, the following code should output your Access Token and Secret Access Token to use Merchant Center API:
git clone https://github.com/google/rubik
cd rubik
python3 generate_token.py --client_id <GCP_CLIENT_ID> --client_secret <GCP_CLIENT_SECRET>
3 - Fill rubik.yaml file with your values. If CSV file is informed, it will execute only the CSV file.
4 - Run:
python3.7 main.py rubik.yaml
1 - Use the following, don't forget to check if rubik.yaml and your gcp-rubik-project is configured:
docker build --no-cache . -t rubik:latest
docker run --rm rubik:latest
- Better model for Vision AI
- Rubik for Kubernetes (daily execution deploy)
- Version with service account
Please use the Discussions tab, we will respond :)