Update a Recommendations Dataset

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.

You cannot add attributes, also called fields or columns, to a Recommendations dataset. This dataset type can only contain the lookup_key, id, and rank attributes. The platform discards any other attributes and causes the update to fail. To successfully update the dataset, remove the disallowed field(s) and then upload the revised file.

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.

  1. Click DATASETS in the top navigation bar, and then click Recommendations in the left-hand category listing on the All Datasets list page.

    Callout of the 'Recommendations' entry in the left-hand category listing on the 'All Datasets' list page

  2. Find the Recommendations dataset that you want to update, click the upload icon for its entry on the Recommendations list page, and then select Data File Upload.

    Callout of the upload icon and the 'Data File Upload' option for a dataset entry on the Recommendations list page

  3. Select the type of update you want to perform, and then click NEXT.

    Step 1 of the Update Data wizard, with 'Full Update' selected and a callout of the NEXT button

  4. Select Manual File Upload and then click NEXT.

    Step 2 of the Update Data wizard, with 'Manual File Upload' selected and a callout of the NEXT button

  5. Drag and drop the file into the wizard.

    Step 3 of the Update Data wizard, with a callout of the drag-and-drop field

  6. Click FINISH after the file is uploaded.

    Step 3 of the Update Data wizard, with the 'Upload Complete' message in the drag-and-drop field. The FINISH button is called out.

When the Recommendations datasets list page loads, PENDING appears in the LAST UPDATED column for the dataset.

Callout of the PENDING status in the LAST UPDATED column for the dataset on the Recommendations datasets list page

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.

A Recommendations dataset's details page, with a callout of the 'PENDING' status below the 'UPLOAD DATA' button and 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.

  1. Generate the pre-signed URL for the file you want to upload.

    Refer to Sharing objects using presigned URLs in the Amazon Simple Storage Service (S3) user documentation for more information about generating a URL for this purpose.

  2. Click DATASETS in the top navigation bar, and then click Recommendations in the left-hand category listing on the All Datasets list page.

    Callout of the 'Recommendations' entry in the left-hand category listing on the 'All Datasets' list page

  3. Find the Recommendations dataset that you want to update, click the upload icon for its entry on the Recommendations list page, and then select Data File Upload.

    Callout of the upload icon and the 'Data File Upload' option for a dataset entry on the Recommendations list page

  4. Select the type of update you want to perform, and then click NEXT.

    Step 1 of the Update Data wizard, with 'Full Update' selected and a callout of the NEXT button

  5. Select Upload File Using Pre-signed S3 URL, and then click NEXT.

    Step 2 of the Upload Data wizard, with 'Upload File Using Pre-signed S3 URL' selected and a callout of the NEXT button

  6. Paste the Amazon S3 URL into the field, and then click FINISH.

    Step 3 of the Upload Data wizard, with a callout of the Amazon S3 presigned URL input field and the FINISH button

The Upload Data wizard closes and Monetate ingests the file. When the Recommendations datasets list page loads, 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.

The Recommendations datasets list page, with a message in the top-right corner that reads, 'Successfully uploaded via pre-signed URL.' In the table of datasets, the PENDING status in the 'LAST UPDATED' column is called out for a Recommendations dataset just updated.

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.

A Recommendations dataset's details page, with a callout of the 'PENDING' status below the 'UPLOAD DATA' button and 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.

Setting Up Automatic Updates

To set up automatic updates for a Recommendations dataset, add the following information to your SFTP client.

  • Hostsftp://sftp.monetate.net
  • Port22
  • ProtocolSFTP

The username and password you can find within Monetate by selecting Sites from the settings cog in the platform.

Callout of the Sites option in the platform settings menu

From that same page you can create new SFTP credentials or change an existing SFTP user password. See Manage SFTP Users for more information.

You must have the Administrator role in the Monetate platform to set up SFTP users in the platform settings.

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:

  1. Click DATASETS in the top navigation bar, and then click Recommendations in the left-hand category listing on the All Datasets list page.

    Callout of the 'Recommendations' entry in the left-hand category listing on the 'All Datasets' list page

  2. Find the Recommendations dataset that you want to update, click the upload icon for its entry on the Recommendations list page, and then select SFTP Info.

    Callout of the upload icon and the 'SFTP Info' option for a dataset entry on the Recommendations list page

  3. Scroll to the bottom of the page to find the dataset ID.

    Callout of the required dataset ID prefix that must appear at the beginning of an update file's name

You must use a hyphen (–) between the dataset ID and the filename. The upload or update will fail if the dataset ID and filename are not separated by a hyphen.

You can change the portion of the filename that follows the hyphen from update to update. However, you cannot change the dataset ID.

Once you upload a file to the platform's SFTP server, it automatically updates the dataset.

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 All Datasets list page and the Recommendations list page

    Callout of the 'UPDATE FAILED' status for a Recommendations dataset on the Recommendations datasets list page

  • In place of the last update's timeframe on the dataset's details page

    Callout of the 'UPDATE FAILED' status on a Recommendations 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.

Callout of the exact date and time that an update failed that appears in the 'UPLOAD DATE' column of the Update History table on a Recommendations dataset's details page

Click that text to view the File Upload Error modal containing the reason(s) for the failure.

Example of the 'File Upload Error' modal.

Refer to Dataset Specifications in the Recommendations dataset overview to ensure the update file conforms to the criteria for this type of dataset.