This script extracts products performances from a SA360 Shopping Campaign and sets a custom label to the products that meet a specific condition. Once run, the same spreadsheet could be linked as a supplemental feed in Merchant Center to add/update the custom_label field in order to be used as a filter parameter inside the SA360 Templates.
- Access to the SA360 account to download reports from.
- A Google Cloud Platform project to enable following APIs:
- Google Apps Script API
- SA360 API
The implementation of this solution is quite straightforward. You just have to follow these steps:
Create a copy of the following Google Spreadsheet.
It will automatically create a copy of the attached Apps Script with the functionality of the tool. This Apps Script will handle the SA360 API calls and will update the Spreadsheet to monitor products SA360 metrics and the application of the custom_label0 parameter.
Open the Apps Script to add your Google Cloud Project Number to the tool
Once you are in the Apps Script, go to the Settings tab and hit the Change Project button under the Google Cloud Platform (GCP) Project section
To find your Google Cloud Project Number, go to the Welcome Page of your GCP and find the information on the Project info section
In your Apps Script, go to the Triggers section and add a new trigger, as follows:
Return to the Google Spreadsheet and reload the web page
The new Product Custom Labeling Automation menu should appear on the top Google Sheet menu bar
On the Config sheet, sets following parameters:
- External Customer ID
- Control Value
- Condition
- Threshold 1
- Threshold 2 (optional - to be used only for "Is between" condition - otherwise leave it blank)
- Your desired custom label
Once everything's set, go on top Google Sheet menu bar, click on Product Custom Labeling Automation -> Get All Changes
NOTE: only on the first run, an authorization Google popup should appear. Once the authorization has been given, run Get All Changes again.
See CONTRIBUTING.md
for details.
Apache 2.0; see LICENSE
for details.
The script pulls performance campaign data from client's SA360 platform; it's equivalent to create a report directly on the SA360 UI. The data will rely on the spreadsheet and the user implementing this script will be responsible to share and/or distribute this data to any third parties. Google is not responsible of any unauthorized disclosure or use of this data. This project is not an official Google project. It is not supported by Google and Google specifically disclaims all warranties as to its quality, merchantability, or fitness for a particular purpose.