Setting Up Inventory for Recommendations

The inventory setup allows the recommendation engine to access metadata and item attributes for all available items.

To start the inventory setup process, navigate to the Recommendations Home Screen by either clicking on the Recommendations link on the homepage or in the main menu.

On the Recommendations Home Screen, click Add Inventory.

An image of the Recommendations screen

This will bring you to the Import Inventory screen where you can configure the inventory.

There are 3 key steps involved in setting up the inventory:

  1. Configuring where to get the inventory from, and any update schedules.
  2. Mapping of inventory fields.
  3. Reviewing and saving settings.

Step 1: Configuring the inventory file

An image of the inventory screen

The inventory file has the following requirements:

  • It needs to be in either .csv or .txt format

  • There are several mandatory fields (columns).

To learn more about the technical details and the available options, refer to Additional information - Inventory file format.

The import of an inventory file can be scheduled to happen every 4, 6, 12, or 24 hours.

You have the option of two Inventory modes:

  • Append mode (add new and replace existing items)

    • Add and update inventory items every time a new feed file is received.

    • Products that are present in the database but absent in the current upload should remain unchanged.

  • Overwrite mode (replace/overwrite the existing entire inventory)

    • Replace/Overwrite the existing entire inventory feed file every time with the new file.

    • Products that are present in the database but absent in the current upload should be removed from the database.

    Refer to the image below that displays where to select the Inventory mode.

    An image of the Schedule import option drop-down list

You can use shared links from Dropbox, Google Drive, or host your file in a secure location and import it via SFTP or HTTPS protocols.

To configure the inventory file:

  1. Select the Import type.
  2. Enter the Import file URL.
  3. Select the authentication method for the SFTP location: Password or SSH Authentication.
    • The Username and Password fields can be left blank if your inventory file link does not require credentials to be accessed.

    • To use SSH Authentication:

      • The inventory file needs to be placed in the SFTP secure location.

      • The SFTP location should have the public key in the list of authorized keys.

      • You need access to your private key to set up the Inventory upload.

      • Only Putty .ppk keys are supported. Any other keys will need to be converted to .ppk format before use.

      • Learn more about Creating SSH Keys for Use with Oracle Cloud Services.

  4. Select the data delimiter.
  5. Click the date, time and select the start date/time and the frequency of the import from the choice of 4, 6, 12, or 24 hours.
  6. Click Continue.

Step 2: Mapping column headings

Once the file has been set up to be imported, the Recommendations platform needs to understand the purpose of each column. It needs to know which column headings correspond to which piece of information for an item, such as its item ID, title, or price. This can be done by mapping the column headings in the inventory file with the tags in the database.

Auto-mapping Inventory fields

The Inventory mapping screen is auto-populated with smart mapping between the Inventory File attributes and the Recommendation Inventory fields.

• Inventory file fields are listed in the left pane with blank spaces indicating that a field is yet to be mapped.

• Required fields are marked with a Required label. You must map these fields or provide default values for them.

• Recommendations fields are listed in the right pane.

• You can add custom fields by clicking the + icon at the top.

Carefully review the automatic field mappings generated and update any mappings as necessary.

The following mappings are available:

Attribute

Description

Attribute type

Product ID

Unique item identifier

Identity

Name

Item name

ShortText

Page URL

Page URL (must include full URL)

LongText

Thumb Image URL

Item Thumbnail image URL (must include full URL)

LongText

Price

Item price

Numeric

Sale Price

Item sale price

Numeric

Currency

Currency symbol

ShortText

Description

Description of item (short description)

LongText

Image URL

Full image URL (must include full URL)

LongText

Count in Stock

Stock levels

Numeric

Custom 1 - 13

13 Custom fields are provided to map any additional fields from the inventory files.

ShortText

To map the column headings:

  1. Select the file column that needs to be mapped to the field in the database. You can click + to add mappings to a custom field.
  2. Click Continue.

Step 3: Review settings and complete upload

To review settings:

  1. Review the inventory settings.

  2. Click Preview to view the first 10 items in your inventory file. The Preview screen helps you double-check if the inventory file has been configured properly.

Reset Inventory

To reset inventory:

  1. Click on Reset in the Inventory Summary screen to reset the inventory settings. This will stop the current scheduling of inventory file upload. The recommendation engine will then rely on the last inventory file import.

  2. Click Complete Upload to schedule the upload, or reset the inventory anytime from the inventory options in the Recommendations home screen.

Additional information - Inventory file format

This section provides guidelines to help you create an inventory file that can be used in the user interface.

Inventory file format

 

  • Should be in .csv or .txt formats.

Delimiter support
  • Supported separators are: comma (,), tab, pipe (|), space, and semi-colon (;).

  • Double quotation marks (") are allowed for use at the beginning and at the end of each field of the file. These characters are ignored during the inventory file upload.

Encoding
  • Only UTF-8 encoding is supported.

File size
  • Should have at least 2 and at most 100 columns.

Headers (the first row of the inventory file)

  • Each column should have a name with at least 1 and at most 50 characters.

  • Column name should contain only capital letters (A-Z), lower-case letters (a-z), digits (0-9), the underscore character (_) , or white-space ( ). Double quotation signs (") at the beginning and at the end of the column name are also allowed, but they get deleted during the upload.

  • Column names should be unique. Note that column names are not case-sensitive. For example, mycolumn and MyColumn are considered to be the same name.

Rows (the second row and any subsequent row of the inventory file)

  • Each row must have the same number of columns. Ensure that any empty field is followed with a separator.

 

Mandatory tags

Tag

Description

Product ID

  • Unique item identifier.

  • Can have at most 50 characters.

  • In case multiple products in the inventory file have the same Product ID, only the first ones will be uploaded and others will be skipped.

Name

  • Name of the item. It is common to display recommended item names in the recommendation widget.

  • Can have at most 1,024 characters.

Important:

Recommendations does not modify any data from the inventory file. It will display values exactly like they are entered in the inventory file. Review the example below.

SKU

Name

Price

Currency

1

Glass vase

100

USD

2

Glass vase

100.00

$

For item 1, the price displayed will be USD 100.

For item 2, the price displayed will be $100.00.

Next steps

Installing the Recommender App in Oracle Responsys