Database Schema
The following tables must exist in the SQL server with the correct schema and default data for the Arkieva Sales Predictor to properly function.
- Ztb_SalesPredictor_DependentAttributes
- Ztb_SalesPredictor_DisplayPreferences
- Ztb_SalesPredictor_Log
- Ztb_SalesPredictor_Results
- Ztb_SalesPredictor_Settings
- Ztb_SalesPredictor_Sink
- Ztb_SalesPredictor_StatusList
Arkieva Configuration for RLS
This section details how to configure the Arkieva Setup Manager to create RLS filters for the Arkieva Sales Predictor.
- Open the Setup Manager
- Create two Attributes
- SalesPredictor_Customer
- SalesPredictor_Item
- Create two standard Dimensions
- SalesPredictor_Customer: Source table ztb_SalesPredictor_Results; Customer_CD/Customer_CD
- SalesPredictor_Item: Source table ztb_SalesPredictor_Results; Item_CD/Item_CD
- Create a new Star
- Create a new Constellation
- Create a new Business Function
- SalesPredictor using the SalesPredictor Star
- Load the Constellation
- Add required users into security (for configuration/testing just use {ALL} data), will need to add permissions to data user-by-user. Security can also be set for the add-in document itself.
Database Configuration
This section details the database configuration required within an existing Arkieva .NET database in SQL.
Required Configuration
The following database configuration work is required.
Ztb_SalesPredictor_Settings\
Find the ID of the SalesPredictor Constellation in the [Constellation] table if RLS will be configured\
Find the “friendly name” of the Customer and Item ATTU’s, for the given examples it is “Sales Predictor Customer CD” and “Sales Predictor Item CD”\
Get the source table or view name (must exist in target database)\
Get the column names for the Customer, Item, Date, and Quantity column\
Determine the value of the NumDataPoints_Valid and PctDataRange_Active parameters\
If RLS is configured, set UseRLS to 1. Otherwise, set UseRLS to 0\
Insert into a single record in ztb_SalesPredictor_Settings (it will only read the first row), or edit by right clicking the table and using “Edit Top 200 Rows”
Optional Configuration
The following database configuration work is optional.
Ztb_SalesPredictor_DependentAttributes
- There are up to three Dependent Attributes available to configure plus the Margin by Customer/Item
- The table is structured Customer_CD, Item_CD, Customer_TX, Item_TX, DepAttu1, …, Margin
- Customer_CD/Item_CD is the PK, if you insert a record into this table when the data is displayed it will map in the value of TX and DepAttu’s and they will be available for filtering
- Note the default displayed TX is the CD if nothing is specified in this table it is purely optional. Margin has a default value as well, but only for display purposes
- Make sure this mapping is kept up to date
Ztb_SalesPredictor_DisplayPreferences
- Any text that is displayed in the application can be changed
- Do not change the [Label] text or you will break the GUI, you can only edit [DisplayAs]
- Restore to default with a simple update from [Default], do not change these values either
- Must close/re-open GUI for the change to take effect
Ztb_SalesPrediector_StatusList
- The list of available acknowledgement statuses can be configured
- This table is the list that will appear in the dropdown
Deploying AddIn Component
This section details the steps required to deploy the latest version of the Arkieva Sales Predictor user interface as a document with in a Arkieva .NET database in SQL.
- Get the latest deployment database, restore to server where target database lies
- Run “Exec DeployAddInComponent”, entering the required values of parameters to target the correct database, component, and version
Installing Service and Setting Properties
This section details the steps required to deploy the latest version of the Arkieva Sales Predictor service to a web server.
- On the target web server, run the installation and ensure that the files are located at C:\ArkievaToolkit\ArkievaSalesPredictor directory
- Find the ArkievaSalesPredictor.exe.config file in installation directory, open the file, set the value of ConnectionString to target Arkieva .NET database
- Make sure that the service is being run with a service account that has access to target database