Update a Content Pages Dataset

You can update a Content Pages dataset through the Upload Data wizard in the Monetate platform, via the Data API, or using SFTP.

You cannot add attributes, also called fields or columns, to a Content Pages dataset. This dataset type can only contain the title, id, category, link, description, and image_link attributes. The platform discards any other attributes and causes the update to fail. To successfully update the dataset, remove the disallowed attribute(s) and then upload the revised file.

When using the Upload Data wizard to update a Content Pages 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. Refer to Content Pages Datasets Overview for additional requirements.

If you need to revise the product catalog dataset(s) associated with the Content Pages dataset, then follow the steps in Edit Associated Product Catalog Datasets. You can't change these associations through a dataset update.

Uploading a File Directly

Follow these steps to update a Content Pages dataset by uploading a file directly to the Monetate platform using the Upload Data wizard.

  1. Click DATASETS in the top navigation bar, and then, if necessary, select Product Data.
  2. Select Content Pages from View on the Datasets list page.

    Callout of the View selector on the Datasets list page. The selector options include Content Pages.

  3. Find the Content Pages dataset that you want to update, click the upload icon for its entry, and then select Data File Upload.

    Callout of the upload icon and the 'Data File Upload' option for a dataset entry on the Content Pages view of the Datasets 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 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

  6. Drag and drop the file into the wizard.

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

  7. 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 and a callout of the FINISH button

When you select the Content Pages view of the Datasets list page loads, PENDING appears in the LAST UPDATED column for the dataset.

On the Update History tab of 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.

The Update History tab of a Content Pages 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 Content Pages dataset 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 with 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, if necessary, select Product Data.
  3. Select Content Pages from View on the Datasets list page.

    Callout of the View selector on the Datasets list page. The selector options include Content Pages.

  4. Find the Content Pages dataset that you want to update, click the upload icon for its entry, and then select Data File Upload.

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

  5. 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

  6. 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

  7. 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 you select the Content Pages 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 Update History tab of 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.

The Update History tab of a Content Pages 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.

Using the Data API

You must create a Content Pages dataset schema in the platform before you can update a Content Pages dataset via the Data API. You cannot create the schema using the Data API.

Refer to the Monetate Data API documentation in the Monetate Developer Hub for the POST endpoint to update a Content Pages dataset using this option.

Before you can send the update, you must first configure your account's API users and then create public keys for those users. API keys allow you to generate authentication credentials that are separate from login credentials for the platform. You can revoke these credentials at any time. See Manage API Keys for more information on configuring API users and public keys.

Establishing Authentication

Monetate's authentication model allows your applications to authenticate directly to Monetate using a JSON Web Token (JWT) signed with your private key.

The Monetate Auth API allows your application to request these access tokens. After you create your public-private key pair and submit your public key to Monetate, you then use your private key to sign an API request, and then your public key is used to verify it so that you receive a token.

Multiple access tokens can be live at any given time, and the expiration for each is independent.

For help constructing the JWT assertion, refer to the Monetate Auth API documentation in the Monetate Developer Hub.

Using SFTP

You can perform both full and partial updates to a Content Pages dataset using SFTP. If you upload a Gzip file, ensure that it has the .gz file extension because Monetate doesn't accept files with the .gzip file extension.

Because SFTP is a batch data ingestion interface, do not transfer more than one file per dataset per 10-minute period.

Setting Up Automatic Updates

To set up automatic updates for a Content Pages 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, if necessary, select Product Data.
  2. Select Content Pages from View on the Datasets list page.

    Callout of the View selector on the Datasets list page. The selector options include Content Pages.

  3. Find the Content Pages dataset that you want to update, click the upload icon for its entry, and then select SFTP Info.

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

  4. 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.

You can access the files on the Update History tab on the dataset's details page in the Monetate platform. Monetate retains dataset files for 180 days from the date it was uploaded. Once a file is out of this retention period, it still appears on the dataset's Update History tab, but you cannot download it.

The 'Upload History' tab of a Content Pages dataset's details page. Two files are available for download.

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 Content Pages view of the Datasets list page

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

  • In place of the last update's timeframe on the Update History tab of the dataset's details page, and the exact date and time of the failed update appears in red in the UPLOAD DATE column of the Update History table

    Callout of the UPDATE FAILED status and of the exact date and time that an update failed that appears in the UPLOAD DATE column on the Update History tab of a Content Pages dataset's details page

Click UPDATE FAILED on either the Content Pages view of the Datasets list page or the Update History tab of the dataset's details page to view the File Upload Error modal containing the reason(s) for the failure.

Example of the 'File Upload Error' modal. The message reads, 'Missing required header field id. (line 1). Please update your file and try again, or contact support@monetate.com if the problem persists.

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

Table of Contents