Skip to main content

Content Management

Automatic - DataMilk Attention Data Script

The DataMilk Attention Data Script automatically extracts content from usage and publicly available information from the target website mainly consisting of website pages and user activity. The content extracted can be QA’d and items can be configured to be included or excluded for API calls. The DataMilk Attention Data Script is also used to automatically determine the general outcome of algorithms for optimizing machine learning models.

Manual - Developer Created

Additional content can be created by developers for certain situations such as website banners, button labels, titles, image selection for a product, and other content developers wish to use with the website.

Content Item Ranking Preferences

Depending on the situation, it is desirable to manually increase, include, or exclude rankings for certain items to achieve business goals. For example, an item that a site does not wish to be promoted can be excluded from rankings. Items can be increased like watches for a themed “watch week” event. Finally, it is possible to decide that all potential items in a certain API which are to be shown to users should be approved before they are made available to users.

Some examples of page content types commonly used are Product (aka Product Detail Pages PDP), Product Collections (aka Product Listing Pages PLP), and Search Results (connecting a search term with results)

Content Item Types

DataMilk currently supports 2 content types. PageContentItem represents web pages and is extracted automatically from a website. CustomContentItem is created by the developer for anything they wish which can include button labels/styling, web page banners, etc.

getContentItems

DataMillk provides a User Interface to allow management of content. If you wish to do this programmatically, you can use this API.

This API allows the caller to access all the content items in the system to retrieve items, optionally with QA status, comments, or developer created content.

export enum SortOrder {
ASC = 'ASC',
DESC = 'DESC',
}

export interface OrderBy {
name: string;
order: SortOrder;
}

export type ComparisonOperator = '=' | '>' | '<' | '>=' | '<=' | 'LIKE';

export type LogicalOperator = 'AND' | 'OR' | 'NOT';

export type FilterValue = Date | string | number;

export enum FilterItemType {
Logical = 'Logical',
Comparison = 'Comparison',
}
export interface FilterItem {
type: FilterItemType;
}
export interface LogicalFilterItem extends FilterItem {
operator: LogicalOperator;
value: FilterItem[];
}
export interface ComparisonFilterItem extends FilterItem {
operator: ComparisonOperator;
name: string;
value: FilterValue;
}

export interface ContentItemsGetRequest extends DmRequest {
start: number;
limit: number;
orderBy: OrderBy[];
filterBy: FilterItem;
}

Common Definitions

export enum ContentItemType {
Page = 'Page',
Custom = 'Custom',
}

export interface ContentItem {
id: string;
type: ContentItemType;

// Don't use but still show for management
disabled?: boolean;

// Don’t use or show for management.
deleted?: boolean;
}

Page Content Type

Represents a web page and is typically acquired automatically by the DataMilk Attention Data Script.

export enum PageType {
ProductCollection = 'ProductCollection',
Product = 'Product',
SearchResults = 'SearchResults',
}

export interface PinConfig {
contextPageUrls?: RegExp;
}

export interface PageContentItem extends ContentItem {
title: string;
url: string;
imageURL: string;
laguage: Language;
pageType: PageType;
}

export interface PinConfig {
contextPageUrls?: RegExp;
}

export interface PageContentItemConfiguration extends PageContentItem {
qaImageOk?: boolean;
qaTitleOk?: boolean;
qaComment?: string;
// Increase or decrease importance.
boost?: boolean;
pin?: PinConfig[];
}

Custom Item

Represents any content the developer wishes to optimize. This is typically created by a developer for an intended application. See AI Auto Select for more information on how the properties of custom content can be used.

export interface CustomContentItem extends ContentItem {
// The Set the item belongs to.
datasetName: string;
// For human understanding in reports
title?: string;
// Developer defined value for dev usage.
value: string;
}

Response

export interface ContentItemsGetResponse extends DmResponse {
items: ContentItem[];
}

updateContentItems

This API allows the caller to update information for one or more content items available. Automatic content items are typically quality reviewed to ensure sufficient quality to serve to shoppers.

export interface ContentItemsUpdateRequest extends DmRequest {
items: ContentItem[];
}

export type ContentItemsUpdateResponse = UpdateResponse;

newContentItems

Add new items. Mainly used for CustomContentItem.

export interface ContentItemsNewRequest extends DmRequest {
items: ContentItem[];
}

export type ContentItemsNewResponse = NewResponse;

Any parameter not specified in the request will not have its value modified. The item and type is always required. To just change qaImageOk, send just that parameter. Some fields can not be updated such as id. See each ContentItem type for more information.