Incent Upload Order Details

Summary

Use the incent upload order details command to transfer staged sales order detail into Incent.

Sales order details are an Incent feature that provides the ability to join aggregated sales order information used in compensation calculations to finer grained order details. Using sales order details can improve Incent calculation runtimes by reducing the volume of data sent into Incent’s calculation engine while still retaining the sales order details needed for reporting. Contact Xactly Customer Support to learn more about using and enabling the feature.

Incent Admin Guide: https://helpcenter.xactlycorp.com/article/incent-administrator-orders-introduction/

Syntax

incent [synchronous] upload order details; 

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.

Call the command  only after aggregated sales orders have been uploaded into Incent AND calculated.Upload aggregated sales orders with the INCENT UPLOAD ORDERS command. Incent’s calculation engine processes sales orders during calculate and transfers rows from the Incent application table xactly.xc_order_stage into xactly.xc_comp_order_item. The child detailed sales order rows must have corresponding parent rows in xactly.xc_comp_order_item before the detailed sales orders can be uploaded into Incent.

The following tables describe the two staging tables used to move sales orders into Incent. Refer to INCENT VALIDATE ORDER DETAILS for information on the staging.order_item_details_validation_error table and messages it may contain regarding your staging table data.

staging.order_item_detail – (Required) Insert sales order detail rows into this table.
Column Name Description xactly Target Table
order_code

(string)

(Required) Incent enforces a constraint on order_code and item_code to uniquely identify a sales order detail. A single order_code can have many line items or item_codes.

xactly.xc_comp_order_item_detail.order_code

item_code

(string)

(Required) Incent enforces a constraint on order_code and item_code to uniquely identify a sales order detail. Use item_code to assign different line items to the order_code.

xactly.xc_comp_order_item_detail.item_code

comp_order_code

(string)

(Required) Value must tie to a xactly.xc_comp_order_item and xactly.xc_comp_order_item.item_code combination. Comp_order_code and comp_item_code are the composition primary key for the aggregated xactly.xc_comp_order_item row. There is a one to many relationship from xc_comp_order_item to xc_comp_order_item_detail.

xactly.xc_comp_order_item_detail.coi_order_code

comp_item_code

(string)

(Required) Value must tie to a xactly.xc_comp_order_item and xactly.xc_comp_order_item.item_code combination. Comp_order_code and comp_item_code are the composition primary key for the aggregated xactly.xc_comp_order_item row. There is a one to many relationship from xc_comp_order_item to xc_comp_order_item_detail.

xactly.xc_comp_order_item_detail.coi_item_code

amount

(decimal)

(Required) The total transactional amount for a given order detail. Typically, orders represent sales transaction events as currency values (1 widget sold for $50), but can also track non-currency decimal values.

xactly.xc_comp_order_item_detail.amount

amount_unit_type_name

(string)

(Required) Should correspond to a valid xactly.xc_unit_type.name value. Many numeric values in Incent must be assigned to a unit type. Examples include: USD, EUR, quantity, and percent.

xactly.xc_comp_order_item_detail.amount_unit_type_id

discount

(decimal)

(Optional) Sometimes used in reporting to track any discount amounts or percentages given to a buyer for a given sales orders. The field’s use and context depends entirely on your company’s business requirements and Incent implementation.

xactly.xc_comp_order_item_detail.discount

quantity

(decimal)

(Optional) Generally used to track the number of product units sold for the given order detail.

xactly.xc_comp_order_item_detail.quantity

incentive_date

(date)

(Required) Represents the transaction or close date of the order detail. Value determines the monthly period the detail is assigned to. Refer to staging.order_item.period_name and staging.order_item_batch_name.

Must equal the same value found in the associated xactly.xc_comp_order_item row.

xactly.xc_comp_order_item_detail.incentive_date

order_date

(date)

(Optional) Stores when a customer first placed the sales order.

xactly.xc_comp_order_item_detail.order_date

order_type_name

(string)

(Optional) Should correspond to a valid xactly.xc_order_type.name value. Business requirements may specify that compensation rules behave differently for different types of orders.

xactly.xc_comp_order_item_detail.order_type_id

batch_name

(string)

(Required) A batch_name cannot cross monthly periods and cannot be assigned to more than one batch_type_name (see next column).

Must equal the same value found in the associated xactly.xc_comp_order_item row.

xactly.xc_comp_order_item_detail.batch_id

xactly.xc_comp_order_item_detail.batch_name

xactly.xc_user_batch.batch_name

batch_type_name

(string)

(Optional) Every sales order batch in Incent must be assigned to a batch type name. Batch type names are used alongside Incent’s Process Group feature. Your compensation administrator defines the set of possible values. Query xactly.xc_batch_type.name for the list of valid values.

Two choices exist when populating the stage table:

  1. Setting to null causes the upload command to use the default batch type name, “Commissionable Events”.
  2. Use a valid value from xactly.xc_batch_type.name. Do not assign the same batch_name to different batch_type_name values.

Must equal the same value found in the associated xactly.xc_comp_order_item row.

xactly.xc_user_batch.batch_type_id
period_name

(string)

(Required) The leaf level, monthly period name for the given incentive_date. Use LookupPeriodName() function to return a period name given a date value. The functions helps you avoid cluttering your SQL statements with joins to the xactly.xc_period and xactly.xc_period_type tables. The upload command converts the period_name value given in the staging table to the appropriate period_id in the target table.

Must equal the same value found in the associated xactly.xc_comp_order_item row.

xactly.xc_comp_order_item_detail.period_id

product_name

(string)

(Optional) If populated, must correspond to a valid xactly.xc_product.name.

The upload will transform the product_name into the correct product_id during the upload.

xactly.xc_comp_order_item_detail.product_id

xactly.xc_comp_order_item_detail.product_name

customer_name

(string)

(Optional) If populated, must correspond to a valid xactly.xc_customer.name.

The upload will transform the product_name into the correct product_id during the upload.

xactly.xc_order_stage.customer_id

xactly.xc_order_stage.customer_name

geography_name

(string)

(Optional) If populated, must correspond to a valid xactly.xc_geography.name.

The upload will transform the product_name into the correct product_id during the upload.

xactly.xc_comp_order_item_detail.geography_id

xactly.xc_comp_order_item_detail.geography_name

related_order_code

(string)

(Optional) Use related_order_code and related_item_code to associate a staging sales order with a different sales order that already exists in Incent. The related sales order may exist in a different batch and period.

xactly.xc_comp_order_item_detail.rel_order_code

xactly.xc_comp_order_item_detail.related_item_id

related_item_code

(string)

(Optional) Use related_order_code and related_item_code to associate a staging sales order with a different sales order that already exists in Incent. The related sales order may exist in a different batch and period.

xactly.xc_comp_order_item_detail.rel_item_code

xactly.xc_comp_order_item_detail.related_item_id

description

(string)

(Optional) Can store notes or other information regarding the sales order.

xactly.xc_comp_order_item_detail.descr

Custom_Fields

(varies)

(Optional) Incent allows compensation administrators to add custom string, numeric, and date columns to sales orders. The column labels given by the business user in Incent’s UI should be present in the staging.order_item table. If they are not, please contact Xactly’s tech support team. They can work with you to make the custom column labels visible. The sync must be performed by Xactly personnel until further notice. xactly.xc_comp_order_item_detail.Custom_Fields

 

Examples

incent upload order details;

incent_up_details01

select command, invocation_id, state, status,
created_instant, completed_instant, description
from (show invocation details)
where invocation_id = '2c909419579c30670157a1c2e31b5f4c';

incent_up_02

Related Commands

Incent Upload Orders

Incent Validate Order Details

Incent Validate Orders