4 Item Requests

This chapter contains the following sections:

Overview

This chapter provides developers with formats for item requests sent to the Customer Engagement server. The following item requests are recognized by the server.

Cross Reference

Item cross references provide a link between the Item ID, manufacturer, and/or vendor and the Scan ID (or UPC).

An Item ID can be associated with one or more Scan IDs. A specific Scan ID can only be associated with one Item ID.

Note:

Do not try to perform more than one action on the same item in the same request (that is, add an item and then update the same item in the request). Due to the method in which records are processed and saved to the database, performing more than one action on the same item may have unexpected results.

Item Attributes

Item attributes provide a flexible way for retailers to customize the item database and describe individual items. Item attributes are added or updated according to the following rules:

  • When updating item attributes, all old values are deleted and the new value(s) added in their place. A new attribute cannot simply be added to the list of old ones, it must be sent as part of the entire list.

  • If an update request contains an empty value tag in the ItemAttribute section, all current values in the database for that attribute are deleted.

  • Attribute types must be defined through Attribute Definition prior to processing. Any add/update request containing an unconfigured attribute type will cause an UNKNOWN_ATTRIBUTE_TYPE error and the add/update will be rejected.

    See also Customer Engagement User Guide for more information about Attribute Definition.

  • Data types are enforced during the item add or item update. Logical can only be Yes/No, Number must be numeric, etc. If an incorrect format is used, an error will be returned, and the item add/update will be rejected.

  • If the attribute type is List and a value which is not defined in the list is provided in a item add/update, the add/update request will be rejected (failed).

  • A Unique attribute type defines whether Customer Engagement can accept more than one attribute for that type per item, or, whether only one attribute can be provided (unique).

    For example: Item’s recommended age.

    • Unique = Yes - Only one recommended age can be specified.

    • Unique = No - Multiple recommended ages can be specified.

  • Item attributes can only be assigned to items with the same intended industry.

Add Item

The purpose of this action is to add a new item to the database.

Note:

If the ItemID specified in the request already exists in the database, the request will be treated like an Update Item request (see Update Item).

Requirements/Restrictions

The Merchandise Hierarchy should be set up before items are added. When adding items, additional information for the item add is retrieved from the merchandise hierarchy table.

The minimum data element/attribute that is accepted for an Add Item request is the <ItemID> element.

Fields

The elements in the table below are the elements/attributes that may be used in an Add Item request. The sample request shows the placement of these elements/attributes. Not all of these elements/attributes have to be used in any one request.

XML Tag Comments

<Item Action=" "

SerialNumberFlag=" ">

Action - Indicates the type of action to be taken.

SerialNumberFlag - True or False. Indicates whether the item has a serial number.

<ItemID Type=" ">

Type - ItemID or UPC. ItemID will save all data to the ITM_ITEM database table. UPC will create a cross-reference in the ITM_ITEM_XREF table. (Required)

<Description>

Short description of the item.

<MerchandiseHierarchy

ID=" "

Level=" ">

Identifies the Merchandise Hierarchy level.

ID - Must be one of the codes set up in the ITM_MERCH_HIERARCHY table.

Level - Must match a level set up in the ITM_MERCH_HIERARCHY table.

<ItemPrice

ValueTypeCode=" ">

Describes pricing of the item.

ValueTypeCode must be ItemPrice, UnitCost, or MSRP.

Note: ItemPrice value cannot contain a decimal point. The last two digits are used as the decimal places (e.g. 179 in the request = 1.79 in the database).

<Color>

Color of the item.

<IntendedIndustry>

Intended industry for the item. Must be either Culinary or Merchandise.

<Manufacturer> <Name>

The name of the manufacturer of the item.

<Marketing>

<Season>

Any seasonal code can be used.

<BrandOwner Name=" ">

If the item is part of a brand, this is the owner of the brand.

For Merchandise item types:

<ItemAttribute Name=" ">

<AttributeValue>

Name of the item attribute.

Value of the attribute.

For Culinary item types:<ItemAttribute Name=" "> <AttributeCodeValue> <AttributeCode> <AttributeValue>

Name of the item attribute.

ID of the attribute code.

Value of the attribute code.

<ItemMeasurements>

<Depth UnitOfMeasure=" ">

<Height UnitOfMeasure=" ">

<Width UnitOfMeasure=" ">

<Diameter UnitOfMeasure=" ">

Measurements of the item.

UnitOfMeasure can be anything. Be consistent in the naming of the units.

<TaxInformation>

<TaxGroupID>

<TaxExemptCode>

<TaxAmount>

Tax ID

Tax exemption code

Amount of tax

<ItemImageUrl>

URL for a picture of the item.

<ItemFranchisees>

<ItemFranchisee action="ADD" franchiseeID="1" franchiseeName=""/>

</ItemFranchisees>

Franchisees associated with the item.

The item can be associated with the franchisee based on either the ID or the name. If the ID is indicated, the name attribute is ignored.

Example

The XML for an AddItem request should appear similar to the example below. The item data included will vary according to each particular request.

If more than one item is being added, there should be multiple <Item> blocks in the batch file.

<?xml version="1.0" encoding="UTF-8"?><ItemMaintenance>  <Item Action="AddItem" SerialNumberFlag="False">    <ItemID Type="ItemID"><ITEM_ID></ItemID>    <ItemID Type="UPC"><EXAMPLE></ItemID>    <Description>Mens Jeans</Description>    <MerchandiseHierarchy ID="100" Level="DEPT"/>    <MerchandiseHierarchy ID="100-M" Level="SUB_DEPT"/>    <MerchandiseHierarchy ID="100-M-J" Level="CLASS"/>    <MerchandiseHierarchy ID="100-M-JC" Level="SUB_CLASS"/>    <MerchandiseHierarchy ID="100-M-JC-1" Level="STYLE_ID"/>    <ItemPrice ValueTypeCode="ItemPrice">16700</ItemPrice>    <ItemPrice ValueTypeCode="UnitCost">9500</ItemPrice>    <ItemPrice ValueTypeCode="MSRP">19900</ItemPrice>    <Color>Blue</Color>    <IntendedIndustry>Merchandise</IntendedIndustry>    <Manufacturer>      <Name>XX</Name>    </Manufacturer>    <Marketing>      <Season>Summer</Season>    </Marketing>    <BrandOwner Name="XX"/>    <!--  Item attributes for Merchandise items  -->    <ItemAttribute Name="ITEM_SIZE">      <AttributeValue>Small</AttributeValue>    <!--  Item attributes for Culinary items  -->    <ItemAttribute Name="PAPER_PRODUCTS">      <AttributeCodeValue>        <AttributeCode>100</AttributeCode>        <AttributeValue>Paper Plates</AttributeValue>      </AttributeCodeValue>    </ItemAttribute>    <ItemMeasurements>      <Depth UnitOfMeasure="INH"></Depth>      <Height UnitOfMeasure="INH"></Height>      <Width UnitOfMeasure="INH"></Width>      <Diameter UnitOfMeasure="INH"></Diameter>    </ItemMeasurements>    <TaxInformation>      <TaxGroupID>10</TaxGroupID>      <TaxExemptCode>1234567890</TaxExemptCode> 
    <TaxAmount>0</TaxAmount>    </TaxInformation>    <ItemImageUrl>www.EXAMPLE.COM/images/example.jpg</ItemImageUrl>    <ItemFranchisees>      <!-- Zero or more repetitions: -->      <ItemFranchisee action="ADD" franchiseeID="1" franchiseeName=""/>    </ItemFranchisees>  </Item></ItemMaintenance>

Batch Processing Errors

The following table contains a list of errors that may occur and possible causes:

Error Cause

GENERAL_ERROR

A general, non-specific error. If you cannot determine the cause of the problem, contact your Project Consultant.

INVALID_ATTRIBUTE_VALUE

Invalid data based on attribute type. For example, characters included in a value for a numeric attribute.

INVALID_DATE_FORMAT

The data in a date field is not valid date information.

INVALID_INTENDED_INDUSTRY

The value entered for intended industry was invalid.

ITEM_ID_UNSPECIFIED

Item ID missing in request.

ITEM_PRICE_DECIMAL_SPECIFIED

Currency decimals specified in request for item price.

ITEM_PRICE_INVALID

The request includes an invalid item price.

ITEM_UPC_UNSPECIFIED

UPC type specified without a value.

MULTIPLE_VALUES_ON_UNIQUE_ATTRIBUTE_TYPE

The request includes multiple values for an attribute defined as unique.

UNKNOWN_ATTRIBUTE_TYPE

Attribute type not found.

VALUE_NOT_IN_ENUMERATED_ATTRIBUTE_TYPE_VALUES

The value entered for an attribute is not among the possible enumerated values.

ITEM_TAX_INFORMATION_INVALID

The request includes invalid tax information.

ITEM_ID_TYPE_UNSPECIFIED

The item price type is not included in the request.

NEGATIVE_ITEM_PRICE_SPECIFIED

Negative item prices included in the request.

ITEM_MSRP_INVALID

The request includes an invalid item MSRP value.

ITEM_UNIT_COST_INVALID

The request includes an invalid item unit cost value.

Batch File Response

A complete copy of the incoming request is placed in the /complete/[Fileset Name]/archived directory.

Each <Item> block in the request that was not successfully processed is placed in a file with _failures appended to the original filename in the /complete/[Fileset Name]/failed directory.

You may be able to determine the reason for the failure by using the Batch Import Review pages (see Batch Import Review).

Update Item

The purpose of this action is to update an item in the database with new and/or changed information.

Note:

If the ItemID specified in the request does not exist in the database, the request will be treated like an Add Item request (see Add Item).

Requirements/Restrictions

The <ItemID> must be included in the Update Item request.

Any fields included in the request will overwrite the existing ones in the database.

If an <ItemID> is not included in the request, the request will be rejected and nothing will be updated.

Fields

The elements in the following table are the elements/attributes that may be used in an Update Item request. The sample request shows the placement of these elements/attributes. Not all of these elements/attributes have to be used in any one request.

XML Tag Comments

<Item Action=" "

SerialNumberFlag=" ">

Action - Indicates the type of action to be taken.

SerialNumberFlag - True or False. Indicates whether the item has a serial number.

<ItemID Type=" ">

Type - ItemID or UPC. ItemID will save all data to the ITM_ITEM database table. UPC will create a cross-reference in the ITM_ITEM_XREF table. (Required)

<Description>

Short description of the item.

<MerchandiseHierarchy

ID=" "

Level=" ">

Identifies the Merchandise Hierarchy level.

ID - Must be one of the codes set up in the ITM_MERCH_HIERARCHY table.

Level - Must match a level set up in the ITM_MERCH_HIERARCHY table.

<ItemPrice

ValueTypeCode=" ">

Describes pricing of the item.

ValueTypeCode must be ItemPrice, UnitCost, or MSRP.

Note: ItemPrice value cannot contain a decimal point. The last two digits are used as the decimal places (e.g. 179 in the request = 1.79 in the database).

<Color>

Color of the item.

<IntendedIndustry>

Intended industry for the item. Must be either Culinary or Merchandise.

<Manufacturer> <Name>

The name of the manufacturer of the item.

<Marketing>

<Season>

Any seasonal code can be used.

<BrandOwner Name=" ">

If the item is part of a brand, this is the owner of the brand.

For Merchandise item types:

<ItemAttribute Name=" ">

<AttributeValue>

Name of the item attribute.

Value of the attribute.

For Culinary item types:<ItemAttribute Name=" "> <AttributeCodeValue> <AttributeCode> <AttributeValue>

Name of the item attribute.

ID of the attribute code.

Value of the attribute code.

<ItemMeasurements>

<Depth UnitOfMeasure=" ">

<Height UnitOfMeasure=" ">

<Width UnitOfMeasure=" ">

<Diameter UnitOfMeasure=" ">

Measurements of the item.

UnitOfMeasure can be anything. Be consistent in the naming of the units.

<TaxInformation>

<TaxGroupID>

<TaxExemptCode>

<TaxAmount>

Tax ID

Tax exemption code

Amount of tax

<ItemImageUrl>

URL for a picture of the item.

<ItemFranchisees>

<ItemFranchisee action="ADD" franchiseeID="1" franchiseeName=""/>

</ItemFranchisees>

Franchisees associated with the item.

The item can be associated with the franchisee based on either the ID or the name. If the ID is indicated, the name attribute is ignored.

Example

An UpdateItem request should appear similar to the following example. The item data included will vary according to each particular request. If more than one item is being updated, there should be multiple <Item> blocks in the batch file.

<?xml version="1.0" encoding="UTF-8"?><ItemMaintenance>  <Item Action="UpdateItem" SerialNumberFlag="False">    <ItemID Type="ItemID"><ITEM_ID></ItemID>    <ItemID Type="UPC"><UPC></ItemID>    <Description>Mens XX Jeans</Description>    <MerchandiseHierarchy ID="100" Level="DEPT"/>    <MerchandiseHierarchy ID="100-M" Level="SUB_DEPT"/>    <MerchandiseHierarchy ID="100-M-J" Level="CLASS"/>    <MerchandiseHierarchy ID="100-M-JC" Level="SUB_CLASS"/>    <MerchandiseHierarchy ID="100-M-JC-1" Level="STYLE_ID"/>    <ItemPrice ValueTypeCode="ItemPrice">4444</ItemPrice>    <ItemPrice ValueTypeCode="UnitCost">4444</ItemPrice>    <ItemPrice ValueTypeCode="MSRP">9799</ItemPrice>    <Color>Black</Color>    <IntendedIndustry>Merchandise</IntendedIndustry>    <Manufacturer>      <Name>XX</Name>    </Manufacturer>    <Marketing>      <Season>Winter</Season>    </Marketing>    <BrandOwner Name="XX"/>    <!--  Item attributes for Merchandise items  -->    <ItemAttribute Name="ITEM_SIZE">      <AttributeValue>Medium</AttributeValue>      <AttributeValue>Large</AttributeValue>    </ItemAttribute>    <ItemAttribute Name="CLEARANCE_ITEM?">      <AttributeValue>false</AttributeValue>    </ItemAttribute>    <!--  Item attributes for Culinary items  -->    <ItemAttribute Name="PAPER_PRODUCTS">      <AttributeCodeValue>        <AttributeCode>100</AttributeCode>        <AttributeValue>Paper Plates</AttributeValue>      </AttributeCodeValue>    <ItemMeasurements>      <Depth UnitOfMeasure="INH"></Depth>      <Height UnitOfMeasure="INH"></Height>      <Width UnitOfMeasure="INH"></Width> 
    <Diameter UnitOfMeasure="INH"></Diameter>    </ItemMeasurements>    <TaxInformation>      <TaxGroupID>10</TaxGroupID>      <TaxExemptCode>1234567890</TaxExemptCode>      <TaxAmount>0</TaxAmount>    </TaxInformation>    <ItemImageUrl>www.EXAMPLE.COM/images/example.jpg</ItemImageUrl>    <ItemFranchisees>      <!-- Zero or more repetitions: -->      <ItemFranchisee action="ADD" franchiseeID="1" franchiseeName=""/>    </ItemFranchisees>  </Item></ItemMaintenance>

Batch Processing Errors

The following table contains a list of errors that may occur and possible reasons they occurred:

Error Cause

INVALID_ATTRIBUTE_VALUE

Invalid data based on attribute type. For example, characters included in a value for a numeric attribute.

INVALID_DATE_FORMAT

The data in a date field is not valid date information.

INVALID_INTENDED_INDUSTRY

The value entered for intended industry was invalid.

ITEM_ID_UNSPECIFIED

Item ID missing in request.

ITEM_NOT_FOUND

The Item ID in the request cannot be found.

ITEM_PRICE_DECIMAL_SPECIFIED

Currency decimals specified in request for item price.

ITEM_PRICE_INVALID

The request includes an invalid item price.

ITEM_UPC_UNSPECIFIED

UPC type specified without a value.

MULTIPLE_VALUES_ON_UNIQUE_ATTRIBUTE_TYPE

The request includes multiple values for an attribute defined as unique.

UNKNOWN_ATTRIBUTE_TYPE

Attribute type not found.

VALUE_NOT_IN_ENUMERATED_ATTRIBUTE_TYPE_VALUES

The value entered for an attribute is not among the possible enumerated values.

Batch File Response

A complete copy of the incoming request is placed in the /complete/[Fileset Name]/archived directory.

Each <Item> block in the request that was not successfully processed is placed in a file with _failures appended to the original filename in the /complete/[Fileset Name]/failed directory.

You may be able to determine the reason for the failure by using the Batch Import Review pages (see Batch Import Review).

Remove Item

The purpose of this action is to remove (deactivate) an item from the Customer Engagement database. The item is not actually removed from the database, it is just de-activated (ActiveFlag="False").

Note:

If the <ItemID> included in the request does not exist in the database, the request is rejected.

Requirements/Restrictions

The only element (required) for a RemoveItem request is the <ItemID> element. Any other element included in the request is ignored.

Fields

The elements in the following table are the elements/attributes that may be used in an RemoveItem Item request. The sample below shows the placement of these elements/attributes.

XML Tag Comments

<ItemID

Type="ItemID"

(Required)

Type - Must be ItemID.

Example

A RemoveItem request should appear similar to the example below. The item data included will vary according to each particular request.

If more than one item is being removed, there should be multiple <Item> blocks in the batch file

<?xml version="1.0" encoding="UTF-8"?><ItemMaintenance>  <Item Action="RemoveItem">    <ItemID Type="ItemID">44444444</ItemID>  </Item></ItemMaintenance>

Batch Processing Errors

The following table contains a list of errors that may occur and possible reasons they occurred:

Error Reason

ITEM_ID_UNSPECIFIED

The Item ID was not included in the request.

ITEM_NOT_FOUND

The Item ID in the request cannot be found.

ITEM_ACCESS_DENIED

The user supplied in the request does not have access to remove the item.

Batch File Response

A complete copy of the incoming request is placed in the /complete/[Fileset Name]/archived directory.

Each <Item> block in the request that was not successfully processed is placed in a file with _failures appended to the original filename in the /complete/[Fileset Name]/failed directory.

You may be able to determine the reason for the failure by using the Batch Import Review pages (see Batch Import Review).

Add Item Cross Reference

The purpose of this action is to add a cross reference (link or association) between a Manufacturer’s UPC and an ItemID.

If you try to create a cross reference using a UPC that is already in the database, the cross reference will be updated to the new Item ID.

Customer Engagement does not check the ItemID in the request.

Requirements/Restrictions

The minimum data elements/attributes that must be included to make a valid request are the (required) Manufacturer’s UPC and the (required) ItemID.

Fields

The elements in the table below are the elements/attributes that may be used in an Add Item Cross Reference request. The sample request shows the placement of these elements/attributes.

XML Tag Comments

<ItemID Type="UPC">

(required) Manufacturer’s UPC Type="UPC" must be included.

<ItemID Type="ItemID">

(required) ItemID of the item being cross-referenced Type="ItemID" must be included (not verified in ITM_ITEM table).

Example

An AddItemCrossReference request should appear similar to the example below. The cross reference data included will vary according to each particular request. If more than one cross reference is being added, there should be multiple <ItemCrossReference> blocks in the batch file.

<?xml version="1.0" encoding="UTF-8"?><ItemCrossReferenceMaintenance>  <ItemCrossReference Action="AddItemCrossReference">    <ItemID Type="ItemID">44444444</ItemID>    <ItemID Type="UPC">4444444444444444</ItemID>  </ItemCrossReference></ItemCrossReferenceMaintenance>

Batch Processing Errors

The following table contains a list of errors that may occur and possible causes:

Error Cause

ITEM_ID_UNSPECIFIED

Item ID missing in request.

ITEM_UPC_UNSPECIFIED

UPC type specified without a value.

ITEM_ID_DUPLICATE_SPECIFIED

A duplicate item id is included in the request.

ITEM_NOT_FOUND

The item specified could not be found.

ITEM_ACCESS_DENIED

The user supplied in the request does not have access to remove the item.

GENERAL_ERROR

A general, non-specific error. If you cannot determine the cause of the problem, contact your Project Consultant.

Batch File Response

A complete copy of the incoming request is placed in the /complete/[Fileset Name]/archived directory.

Each <ItemCrossReference> block in the request that was not successfully processed is placed in a file with _failures appended to the original filename in the /complete/[Fileset Name]/failed directory.

You may be able to determine the reason for the failure by using the Batch Import Review pages (see Batch Import Review).

Update Item Cross Reference

The purpose of this action is to update a cross reference (link or association) between a Manufacturer’s UPC and an ItemID. Simply put, an Update Item Cross Reference request associates another ItemID with an existing UPC.

If the UPC exists in the database, the database information is updated with the information in the request.

If the UPC does not exist in the database, the UPC and information in the request is added as in an Add item cross reference.

Requirements/Restrictions

The minimum data elements/attributes that must be included to make a valid request are the Manufacturer’s UPC and an ItemID.

Fields

The elements in the table below are the elements/attributes that may be used in an Update Item Cross Reference request. The sample request shows the placement of these elements/attributes.

XML Tag Comments

<ItemID Type="UPC">

(required) Manufacturer’s UPCType="UPC" must be included.

<ItemID Type="ItemID">

(required) ItemID of the item being cross-referenced Type="ItemID" must be included.

Example

An UpdateItemCrossReference request should appear similar to the example below. The cross reference data included will vary according to each particular request.

If more than one item cross reference is being updated, there should be multiple <ItemCrossReference> blocks in the batch file.

<?xml version="1.0" encoding="UTF-8"?><ItemCrossReferenceMaintenance>  <ItemCrossReference Action="UpdateItemCrossReference">    <ItemID Type="ItemID">33330001</ItemID>    <ItemID Type="UPC">999933331111</ItemID>  </ItemCrossReference></ItemCrossReferenceMaintenance>

Batch Processing Errors

The following table contains a list of errors that may occur and possible causes:

Error Cause

GENERAL_ERROR

A general, non-specific error. If you cannot determine the cause of the problem, contact your Project Consultant.

ITEM_ID_UNSPECIFIED

Item ID missing in request.

ITEM_UPC_UNSPECIFIED

UPC type specified without a value.

ITEM_ID_DUPLICATE_SPECIFIED

A duplicate item id is included in the request.

ITEM_NOT_FOUND

The item specified could not be found.

ITEM_ACCESS_DENIED

The user supplied in the request does not have access to remove the item.

Batch File Response

Each <ItemCrossReference> block in the request that was not successfully processed is placed in a file with _failures appended to the original filename in the /complete/[Fileset Name]/failed directory.

A complete copy of the incoming request is placed in the /complete/[Fileset Name]/archived directory.

You may be able to determine the reason for the failure by using the Batch Import Review pages (see Batch Import Review).