INCENT UPLOAD PRODUCTS

The INCENT UPLOAD PRODUCTS command allows developers to load information about products into Incent.

The Product area allows a company to create products and product families that can be used in the incentive compensation rules, formulas, attainment measures, lookup tables, and the Incentive Estimator tool. Product name and the corresponding fields can also be used for reporting in Xactly Analytics, and are featured in several  out-of-the-box template reports, including:

  • Revenue Analysis: Top 10 Products Sold by Order Amount (Business Currency)
  • Cost Analysis: Top 10 Products by Commission (Business Currency)
  • Cost Analysis: Top 10 Products by Bonus (Business Currency)
  • Cost Analysis: Top 10 Products by Payment (Business Currency)

Incent Admin Guide: https://helpcenter.xactlycorp.com/article/incent-administrator-product-2/

The command transfers data from the staging.product table into Incent. The command is often called as part of a larger ETL pipeline before validating staged sales orders. Products found on a staged sales order must be present in Incent for the staged order row to validate properly. Refer to INCENT UPLOAD ORDERS and INCENT VALIDATE ORDERS.

The following list provides the generic steps to follow:

  1. DELETE data from the staging.product and staging.product_exception tables. Archive rows as necessary as dictated by your business requirements.
  2. Perform any ETL transformations necessary to prepare your raw product data for upload into Incent. INSERT the transformed data into staging.product
  3. Call INCENT UPLOAD PRODUCTS.
  4. Check the staging.product_exception table for any processing and data validation errors. Fix or archive any staging rows that failed validation and call the upload command again as necessary.

Syntax

 

incent [synchronous] upload products; 

Parameters

Parameter
Description
synchronous
(Optional) The upload command runs asynchronously by default when invoked, i.e. control returns immediately to the calling program and the job runs in the background on the Connect server. Use the ‘synchronous’ keyword to force the Connect server to return control only after the upload completes.

When invoked asynchronously, you can track the status of the upload by querying the SHOW INVOCATIONS command. Xactly recommends running large data sets asynchronously to avoid client query timeouts.

Details

Ensure you have registered a valid Incent username and password within Connect before invoking the upload command. INCENT commands require valid credentials to modify data with Incent. Refer to INCENT CREDENTIAL.

The upload command operates against the complete set of rows found in the staging.product table.  The following tables describe the staging and exception log tables used to move products into Incent. Unlike other types of reference data in Incent, products are not effective dated.

 

staging.product – (Required) Use this table to transfer product data into Incent.
Column Name Data Type Description xactly Target Table
action string (Required) The value instructs the type of operation the upload should perform on the row. INCENT UPLOAD PRODUCTS has two options:

  • ‘save’ tells the upload command to perform an upsert operation. If the product does not exist, save will insert a new one. If the product already exists in Incent, save will perform an update.
  • ‘delete’ is the second supported action. Delete removes a product from Incent if it does not have ties to other Incent data (sales orders, for example).
n/a
name string (Required) Unique business identifier for a product. xactly.xc_product.name
description string (Optional) Product notes or other details about the product. xactly.xc_product.descr
product_code string (Optional) A secondary descriptor for the product. xactly.xc_product.product_code
cost decimal (Optional) Numeric information for the product. xactly.xc_product.cost
cost_unit_type_name string (Optional) Set to a valid xactly.xc_unit_type.name value if cost is set. The upload command will lookup the appropriate unit_type_id value. xactly.xc_product.cost_unit_type_id
price decimal (Optional) Numeric information for the product. xactly.xc_product.price
price_unit_type_name string (Optional) Set to a valid xactly.xc_unit_type.name value if price is set. The upload command will lookup the appropriate unit_type_id value. xactly.xc_product.price_unit_type_id
parent_name string (Optional) Reserved for future use to construct a hierarchy of products within Incent. xactly.xc_product.parent_product_id

 

staging.product_exception – The upload command writes any errors encountered during processing to this table. INCENT UPLOAD PRODUCTS truncates this table automatically for each run. Archive any existing error rows as needed before running the command.
Column Name Data Type Description
action string Refer to staging.product
name string Refer to staging.product
description string Refer to staging.product
product_code string Refer to staging.product
cost decimal Refer to staging.product
cost_unit_type_name string Refer to staging.product
price decimal Refer to staging.product
price_unit_type_name string Refer to staging.product
parent_name string Refer to staging.product
exception_code integer Numeric error code returned for any row that the command cannot upload
exception_message string Text description returned for any row that the command cannot upload. Refer to possible messages in following table.

 

 

Examples

incent upload products;

Screen Shot 2016-08-29 at 9.14.45 AM

Related Commands

INCENT CREDENTIAL

INCENT UPLOAD CUSTOMERS

INCENT UPLOAD GEOGRAPHIES

INCENT VALIDATE ORDERS

SHOW INVOCATIONS