Incent Validate Orders
The INCENT VALIDATE ORDERS
command runs standard data validations against all rows and batches in the staging.order_item
and staging.order_item_assignment
tables. Use the command to validate staged orders before calling INCENT UPLOAD ORDERS
to move sales order data from staging into Incent.
Syntax
incent [synchronous] validate orders; |
Parameters
Parameter
|
Description
|
---|---|
synchronous |
(Optional) The validate 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 validate completes.
When invoked asynchronously, you can track the status of the validate by querying the |
Details
The incent validate orders
command performs the validations listed in the second table below against rows in the staging.order_item
and staging.order_item_assignment
tables. The command writes error messages tostaging.order_item_validation_error
.
Ensure you have registered a valid Incent username and password within Connect before invoking the validate command. INCENT
commands require valid credentials to run. Refer to INCENT CREDENTIAL.
The INCENT UPLOAD ORDERS
command will not transfer any rows from staging tables into Incent if a single row has failed validation. Xactly recommends deleting or archiving any staging rows that failed validation prior to running the upload into Incent.
Connect’s data validations ensure your staging data meet’s Incent’s referential integrity requirements. You may write custom data validations to perform business logic checks using Connect’s xSQL, PIPELINE
, and STEP
features. Xactly recommends calling any custom validations after invoking INCENT VALIDATE ORDERS
. You may write error output to the staging.order_item_validation_error
table or create a custom table in the delta
schema. Email a CSV error report to business users with CREATE EMAIL
and WriteFile()
.
staging.order_item_validation_error – The upload command writes any errors encountered during validation to this table. incent upload orders truncates this table automatically for each run. Archive any existing error rows as needed before running the command. |
||
Column Name | Data Type | Description |
---|---|---|
validation_id | decimal | Unique identifier for the error validation row. |
order_code | string | Refer to staging.order_item |
item_code | string | Refer to staging.order_item |
error_id | decimal | Numeric error code. |
error_message | string | Text description of the error. |
error_field_name | string | Refer to staging.order_item |
error_field_value | string | Depends on your data. Shows the data value present in the erorr_field_name from you staging table data. |
created_timestamp | instant | Instant the row was created (UTC). |
Validation Error Messages – Validation writes these error messages to the staging.order_item_validation_error table. The validate command deletes all rows at the start of each run. Archive your historical errors as dictated by business requirements. | ||
Error Id | Error Message | How to Resolve |
---|---|---|
9000 |
exception: system exception message |
An un-handled error occurred. Troubleshoot on a case-by-case basis. Contact Xactly Tech Support if necessary. |
9010 | staging.order_item.batch_name must be valid |
The staging.order_item.batch_name does not exist in Incent. First execute INCENT CREATE BATCHES to add new staging table batches to Incent. Next, rerunINCENT VALIDATE ORDERS . Query xactly.xc_user_batch to see the list of batches available in Incent. |
9011 |
or
|
Set staging.order_item.period_name to a valid monthly period in xactly.xc_period.name .
Hint: Use the |
9012 |
|
The given employee_id was not found in Incent. Set staging.order_item_assignment.employee_id to a value found inxactly.xc_participant.employee_id . |
9013 |
|
The staging.order_item.customer_name does not exist in xactly.xc_customer.name . Refer to INCENT UPLOAD CUSTOMERS to load customer/account information into Incent. |
9014 |
|
The staging.order_item.product_name does not exist in xactly.xc_product.name . Refer to INCENT UPLOAD PRODUCTS to load information about products into Incent. |
9015 |
|
The staging.order_item.geography_name does not exist in xactly.xc_geography.name . Refer to INCENT UPLOAD GEOGRAPHIES to load information about sales geographies into Incent. |
9016 | staging.order_item.incentive_date must fall into a valid period |
The staging.order_item.incentive_date does not fall within xactly.xc_period.start_date and xactly.xc_period.end_date values for a monthly period. |
9018 |
or
or
|
Set the appropriate staging.order_item.*_unit_type_name to a valid value from xactly.xc_unit_type.name . |
9019 |
|
Set staging.order_item.order_type_name to null or a valid value found in xactly.xc_order_type.name . |
9020 |
|
Set staging.order_item.amount to a numeric value (positive and negative values and zero are valid). |
9021 | staging.order_item.batch_type_name must be valid |
Set staging.order_item.batch_type_name to null or a valid value found in xactly.xc_batch_type.name. If a null value is used, the INCENT UPLOAD ORDERS command will use the default batch type name value, “Commissionable Events”. |
9040 | staging.order_item.batch_name cannot be null |
Enter a non-null string value into staging.order_item_batch_name . Each distinct batch name is registered with Incent in the xactly.xc_user_batch table (refer to INCENT CREATE BATCHES ). |
9041 |
or
|
order_code cannot be null in either staging table. |
9042 |
or
|
item_code cannot be null in either staging table. |
9043 |
|
Set staging.order_item_assignment.employee_id to a value found in xactly.xc_participant.employee_id . |
9044 |
|
Incentive date determines the calendar period in which a sales order will be processed. |
9046 | ||
9070 |
|
A row in staging.order_item_assignment does not correspond to a row in staging.order_item (join between tables using order_code and item_code). |
9071 |
or
|
Error code 9071 covers two different scenarios:
In either case, delete the duplicate rows to pass validation. |
9072 |
|
A row in staging.order_item_assignment does not correspond to a row in staging.order_item (join between tables using order_code and item_code). |
Examples
incent validate orders;
select invocation_id, state, status, created_instant, completed_instant, command, description
from (show invocation details)
where invocation_id = ‘2c909418560ac25901564cd8879e0e42’;