You can update a Recommendations dataset via the Data API, using SFTP, or through the Upload Data wizard in the Monetate platform. Note that integrating with the API enables more real-time use cases, such as removing out-of-stock products from the dataset.
When using the Upload Data wizard to update a Recommendations dataset, you can either drag and drop a file directly into the wizard, or you can input a URL to a dataset file that you store on Amazon S3. Regardless of which of these two upload options you select, the file that you use must be in the CSV or TSV format.
Uploading a File Directly
Follow these steps to update a Recommendations dataset by uploading a dataset file directly to the Monetate platform using the Upload Data wizard.
- Click DATASETS in the top navigation bar, and then, if necessary, select Product Data.
- Select Recommendations from View on the Datasets list page.
- Find the Recommendations dataset that you want to update, click the upload icon for its entry, and then select Data File Upload.
- Select the type of update you want to perform, and then click NEXT.
- Select Manual File Upload and then click NEXT.
- Drag and drop the file into the wizard.
- Click FINISH after the file is uploaded.
When you select the Recommendations view of the Datasets list page loads, PENDING
appears in the LAST UPDATED column for the dataset.
On the dataset's details page, PENDING
appears where the timeframe of the last update normally appears as well as in the UPLOAD DATE column of the Current Updates table.
If the file failed to upload or the platform encountered other errors, you see messages indicating the problem. See Failed Updates in this documentation for more information.
Uploading a File Using an Amazon S3 URL
Follow these steps to add rows to or update existing rows in a product catalog by uploading a dataset file using an Amazon S3 pre-signed URL.
- Generate the pre-signed URL for the file you want to upload.
- Click DATASETS in the top navigation bar, and then, if necessary, select Product Data.
- Select Recommendations from View on the Datasets list page.
- Find the Recommendations dataset that you want to update, click the upload icon for its entry, and then select Data File Upload.
- Select the type of update you want to perform, and then click NEXT.
- Select Upload File Using Pre-signed S3 URL, and then click NEXT.
- Paste the Amazon S3 URL into the field, and then click FINISH.
The Upload Data wizard closes and Monetate ingests the file. When you select the Recommendations view of the Datasets list page, a message briefly appears that informs you that the file was successfully uploaded from the Amazon S3 URL. Additionally, PENDING
appears in the LAST UPDATED column for the dataset.
On the dataset's details page, PENDING
appears where the timeframe of the last update normally appears as well as in the UPLOAD DATE column of the Current Updates table.
If the file failed to upload or the platform encountered other errors, you see messages indicating the problem. See Failed Updates in this documentation for more information.
Via SFTP
You can perform both full and partial updates to a Recommendations dataset using SFTP. In addition to CSV and TSV files, you can upload Gzip (.gz
) and ZIP (.zip
) files via SFTP.
Setting Up Automatic Updates
To set up automatic updates for a Recommendations dataset, add the following information to your SFTP client.
- Host —
sftp://sftp.monetate.net
- Port —
22
- Protocol —
SFTP
The username and password you can find within Monetate by selecting Sites from the settings cog in the platform.
From that same page you can create new SFTP credentials or change an existing SFTP user password. See Manage SFTP Users for more information.
File-Drop Directories and Naming Conventions
There are two file-drop directories:
/datasets/full
— Use this location for full file updates/datasets/partial
— Use this location for partial file updates
Follow this format when naming an update file: {datasetid}-examplefilename.csv
Replace {datasetid}
with the unique ID for the Recommendations dataset you're updating. You can find this information in the platform by following these steps:
- Click DATASETS in the top navigation bar, and then, if necessary, select Product Data.
- Select Recommendations from View on the Datasets list page.
- Find the Recommendations dataset that you want to update, click the upload icon for its entry, and then select SFTP Info.
- Scroll to the bottom of the page to find the dataset ID.
Once you upload a file to the platform's SFTP server, it automatically updates the dataset.
You can access the files on the Update History tab on the dataset's details page in the Monetate platform.
If a file is available for download, its filename appears in purple in the Update History table.
Failed Updates
If the platform encounters an error with the update, you see UPDATE FAILED
in multiple places within the platform:
- In the LAST UPDATED column for the dataset's entry on the Recommendations view of the Datasets list page
- In place of the last update's timeframe on the dataset's details page
In the UPLOAD DATE column of the Update History table, the exact date and time of the failed update appears in red.
Click that text to view the File Upload Error modal containing the reason(s) for the failure.
Refer to Dataset Specifications in the Recommendations dataset overview to ensure the update file conforms to the criteria for this type of dataset.