You are on page 1of 42

How To Guide

X3 V5 - SmartForecasts V8:
SmartForecasts Set Up

INTRODUCTION......................................................................................................................... 2

PREPARE ODBC DATA SOURCE ........................................................................................... 3

DATABASE CONFIGURATION WIZARD ............................................................................. 8

SCHEMA WIZARD ................................................................................................................... 14

PREPARE CONVERSION NAMES AND TEST HISTORICAL DATA LOAD ................ 29

TEST SAVE OF FORECAST RESULTS ................................................................................ 33

CONNECTION WIZARD ......................................................................................................... 41

July 2010 Sage Page 1 of 42


X3 V6 -SmartForecasts V8.2

Introduction
This document describes the steps required to prepare SmartForecasts to interface with X3 V6. This document
assumes the X3 setup, documented separately, has already occurred. Three sections in this document detail a
one-time setup process to prepare the database for SmartForecasts for all users. These sections are
Database Configuration Wizard
Schema Wizard
Prepare Conversion Names and Test Historical Data Load

Two sections detail one-time setup that must take place on each SmartForecasts user PC before operating
SmartForecasts. These sections are:
Prepare ODBC Data Source
Connection Wizard

The Test Save of Forecast Results section includes the minimal instructions required to produce forecast results to
test the interface. It is not intended to replace SmartForecasts documentation, but outlines the general
forecasting process. SmartForecasts produces two types of forecast results and each saved in its own
SmartForecasts project.
Expected forecast
Safety stock, or service level, forecast

For each item, the expected forecast project holds period by period estimates of most likely future demand
throughout a forecast horizon. The safety stock project holds a cumulative lead time forecast of safety stock and
reorder point for each item. Reorder point is termed Inventory Level in SmartForecasts. Whether the safety stock
or the reorder point from the safety stock project is used by X3 depends on the items replenishment method as
defined in X3.

2
X3 V6 -SmartForecasts V8.2

Prepare ODBC Data Source


Each PC that will run SmartForecasts must have an ODBC data source set for each folder in the SQL Server
database that will be used by X3 with SmartForecasts. This includes SmartForecasts user PCs and the PC of the
administrator that will run the wizards to prepare SmartForecasts to interface with X3.

Define the ODBC connection information for SmartForecasts. For 32-bit machines this is done
through the ODBC data source administrator found off the Windows Control Panel, Administrative
Tools, under Data Sources (ODBC). For 64-bit machines, the ODBC data source administrator is
opened by running C:\Windows\SysWOW64\odbcad32.exe.
Go to the System DSN tab. Click Add.

Use the standard SQL


Server driver

Select the SQL Server driver and click Next. Then click Finish on the Create New Data Source dialog.

3
X3 V6 -SmartForecasts V8.2

In the Create a New Data Source to SQL Server dialog, type the Name and Description, indicating the
folder this driver will connect to, and X3 Server to connect to.

Enter DSN, description


and SQL Server name.
Then select Next.

4
X3 V6 -SmartForecasts V8.2

Click SQL Server authentication and Enter X3 Folder name and password

SQL authentication, X3
folder name and
password. Select Next.

Select the database and then click Next

Select the change the default


database to the value shown which
should be the X3 Database name.
Leave defaults as defined and select
Next.

5
X3 V6 -SmartForecasts V8.2

Click Finish.

Select Finish, all


defaults should be
properly shown.

Click Test Data Source to verify the connection works.

6
X3 V6 -SmartForecasts V8.2

The connection must successfully complete. Then click OK and exit the ODBC data source
administrator.

Successful. If it does not


complete successfully, then
correct all errors and re-test.
Select OK.

7
X3 V6 -SmartForecasts V8.2

Database Configuration Wizard


Two wizards must be run one time in SmartForecasts per folder in X3 to prepare the database for SmartForecasts
use. The first is the SmartForecasts configuration wizard. Before this wizard can be run, the ODBC data source
must be prepared as shown in the section above. To run the wizard:

Open SmartForecasts.
On the menu, chose Database, then Setup, then Configuration Wizard.
In the Select Data Source dialog, go to the Machine Data Source tab.
Click OK to select the DSN for SmartForecasts or select an existing DSN. This will be the one you set
up in the above section, Prepare ODBC Data Source.

Select Ok

Enter password to logon to the database.

Enter password

8
X3 V6 -SmartForecasts V8.2

Identify the database type as Microsoft SQL server in the drop down.

Select Parameters and click Show Available Qualifiers.

Make sure this value is set. This


value allows the table owner to
be shown in the selection lists.
Click OK.

9
X3 V6 -SmartForecasts V8.2

X3 uses multiple copies of the same table in a single database. If show available qualifiers is not set, the setup to
SmartForecasts cannot be completed. For example, you will see multiple ITMMASTER tables but be unable to tell
which table is associated to the folder where X3 is to extract and save information from. A folder in X3 is a
database owner in MS SQL Server.

Enter the folder name as the qualifier and select the database type.

Enter the X3 application folder name.

Select the database type

This must be the application folder name that will be exporting and importing information with. It cannot be the
parent folder name of X3.

Verify information is correct and click Next. If the table does not exist, you will be prompted to
create it.

10
X3 V6 -SmartForecasts V8.2

The Parameters button must be clicked.

11
X3 V6 -SmartForecasts V8.2

The Do not allow foreign key relationships option must be checked. Click OK and Next.

12
X3 V6 -SmartForecasts V8.2

Confirmation that database connection is setup is the final dialog.

You can click Done here or go directly to the schema wizard. This document will go back through the menu to
pick the schema wizard as the connection configuration is normally done once per folder but there could be
multiple schemas defined, each set up around a different set of data.

13
X3 V6 -SmartForecasts V8.2

Schema Wizard
The schema wizard allows you to enter information about the X3 tables as required by SmartForecasts.
The following steps can be used to define the schemas in SF for the import tables as it pertains to X3. This is the
second of two wizards that must be run one time in SmartForecasts per folder in X3 to prepare the database for
SmartForecasts use. The first is the SmartForecasts configuration wizard, see section above. Before this wizard can
be run, the ODBC data source must be prepared as shown in the Prepare ODBC Data Source section. Also, the
steps in X3 to export data to SmartForecasts, shown in separate documentation, must be completed before this
wizard can be run. To run the wizard:

Open SmartForecasts.
Start the schema wizard from the Database menu, then Setup, then Schema Wizard.
Enter the password for the folder user.

Click the New button to create a new schema.

14
X3 V6 -SmartForecasts V8.2

In SQL terms, SmartForecasts uses a Star Schema for collecting information to forecast. The X3 connection to this
schema has 4 dimensions. The two reference dimensions, a time dimension, and an event dimension. The basic
structure that will be defined in SmartForecasts is shown below.

Product Information
ITMMASTER Calendar
Information
XSFTIME

ITMREF_0 TIMEID_0

Fact Table
XFACTITEM
QTY_0

FCY_0 EVENTID_0

Event
Warehouse Information
Information XASFEVENT
FACILITY

The links between the entities are shown on the arrows that connect the entities. The value being forecasted is
quantity (QTY_0) based on sales demand.

15
X3 V6 -SmartForecasts V8.2

Select the Fact table, XAFACTITEM, by double-clicking on the table name.

Make sure you have selected the correct qualifier (folder name). Click Next.
Indicate what each field on the fact table will be used for.

Each reference will be displayed. Select the table that matches the reference. To start with, the FCY_0
value is displayed, so according to the star schema listed above this is connected to FACILITY.

16
X3 V6 -SmartForecasts V8.2

From the available database tables, click on the folder.FACILITY table to select it. Then click the
Select Table button. ITMREF_0 will automatically show as the next potential reference.

In this case, select folder.ITMMASTER. Then select the Select Table button to specify the dimension
of items.
The next value shown will be TIMEID_0. This is the time dimension. Select the table folder.XASFTIME.
(Note, there is also a table called XSFCTIME this is for shop floor control, do not select this table.)
Click Select Table button to identify XASFTIME as the time dimension.
The next value shown will be EVENTID_0. This is the event dimension. Select the table
folder.XASFEVENT.
Verify that all four tabs have a table referenced by the foreign key specified.

17
X3 V6 -SmartForecasts V8.2

The rest of the fields on the fact table are for forecasting or reference information. Click Next.

The previous set of steps defined the links from the fact table to the dimensions. The next set of steps will identify
the primary key field name in each of the dimensions.

The field FCY_0 is the primary key for the FACILITY table.

Select FCY_0 from the available fields and then click Select Key. It automatically switches tabs to
display the next table.

18
X3 V6 -SmartForecasts V8.2

Select the field ITMREF_0 for ITMMASTER.

Click Select Key and it automatically switches to the timetable.


Scroll down and select the field TIMEID_0 for XSFTIME.

Click Select Key for this table and it automatically switches to the timetable.
Select the field TIMEID_0 for XASFTIME.
Click Select Key then verify that all table links have been defined.

19
X3 V6 -SmartForecasts V8.2

Click Next.
Identify the time dimension table and the event dimension table by type. Select XASFTIME and click
Move to Time. Then select XASEVENT and click Move to Event.

Click Next.

20
X3 V6 -SmartForecasts V8.2

Click the Use event radio button and then Use backup measure radio button.

Click Next.

The next screen allows you to specify multiple fields to identify information about the quantity in SmartForecasts.
Normally the Facility ID and Product Id are sufficient, but other information could be specified in this screen. Note
that there are four tabs. Specify data on all four tabs.

FCYNAM_0 must be selected as default fields on the Folder.FACILITY tables tab.

21
X3 V6 -SmartForecasts V8.2

On the Folder.ITMMASTER tables tab, ITMREF_0 and ITMDES1_0 should be selected as Default fields.
Its recommended to select TSICOD_0 as a Possible field. Other fields could also be useful for
forecasting purposes, check with support for suggestions pertaining to your particular needs.

On the Folder.XSFTIME tables tab, TIMLBL_0 must be selected as the only Used field.

22
X3 V6 -SmartForecasts V8.2

On the Folder.XASFEVENT tables tab, EVENDESC_0 must be selected as the only Used field.

Click Next.
For only the FACILITY and ITMMASTER tables, you must specify which chosen descriptors uniquely
identify each record. All the defaults indicated in the previous dialog should be selected and any
other optionally added fields should be unselected for Has Unique Values.
For the Folder.FACILTY tables tab, at least FCY_0 and FCYNAM_0 should be selected.

23
X3 V6 -SmartForecasts V8.2

For the Folder.ITMMASTER tables tab, at least ITMREF_0 should be selected. Then click Next.

SmartForecasts allows viewing of history and forecasts totaled by groups. The Roll Up Levels Total
Keys dialog identifies placeholder records in the FACILITY and ITMMASTER tables with key values
indicating they stand for group totals.
For the Folder.FACILTY tables tab, select ZZZ from the Primary Key value for the total row drop down
list. If the total key value is not there, see separate documentation for creating total keys.

24
X3 V6 -SmartForecasts V8.2

For the Folder.ITMMASTER tables tab, select ZZZZZZZSF from the drop down list.

The Define Roll Up Levels dialog allows groups to be specified. It opens with only a NO ROLLUP option defined.

Click the Select button beside the ITMREF_0 field.

Click the Select


button.

25
X3 V6 -SmartForecasts V8.2

Click the Add to List below button.

Click the Add to List


Below button.

The Roll Up Level is added to the list on the bottom of the dialog. Click the Savable checkbox.

Click the Savable


checkbox.

Other roll up levels could also be useful for forecasting purposes. Check with support for suggestions
pertaining to your particular needs. Click Next.

26
X3 V6 -SmartForecasts V8.2

Depending on the calendar chosen, select the appropriate data type, month or week, from the drop
down list. Then select starting date for that calendar in the shown in one of two ways. Either by
indicating a fixed start period by highlighting the row in the time table showing the period to start
with and unchecking the checkbox. Or by checking the checkbox and selecting how many recent time
periods to open on a rolling basis. Click Next.

Select fixed starting point by highlighting the row


or
Select rolling starting point by checking the box

Select data type

Select the actual year and period (week or month) that matches the date shown. Then select the
default-forecasting horizon (longest lead time) to use when opening a project. Finally, indicate how
many working days per week should be used when calculating lead times in days and how many days
SmartForecasts should consider are in a year. Click Next.

27
X3 V6 -SmartForecasts V8.2

Your database login is the database folder name. It should be granted access to the forecast schema
with the checkbox checked. Click Next.

Tables to be created in your database upon completion of this wizard are named. The Table Qualifier
should be the database folder name. Click Next.

28
X3 V6 -SmartForecasts V8.2

Name the forecast schema. The default of schema 1 is acceptable. Click Finish.

Tables will be created at this time. Since the tables are in an X3 folder and you are connecting as the folder id, you
should have the correct privileges. A confirmation message will show when the schema is correctly saved.

Click Done.

Prepare Conversion Names and Test Historical Data Load


While testing the load of data from X3 into SmartForecasts, a one-time task to set the conversion names must be
done. Make sure the export to SmartForecasts, described in the X3 Export to SmartForecasts section above, has
been completed because that process provides the data SmartForecasts will load.

To select the schema and start the process to generate a forecast, from the Database menu, select
Open, then New System Project. A dialog displaying the forecast schema(s) will open.

29
X3 V6 -SmartForecasts V8.2

Also note that the schema ID is to the left of the schema name. This is used in the X3 import to identify which data
to pull back into X3.

Select the schema that was just created and click Next.
All possible ways of rolling up the data will display in the next dialog. You may have additional roll up
levels, according to your needs. See SmartForecasts documentation describing how to use Roll Up
Levels. For this one time task, select NO ROLLUP the click Next.

30
X3 V6 -SmartForecasts V8.2

The ends at period for the historical data on the left hand side of the time table dialog should be set
as the last fully completed time period. The forecast data horizon on the right side of the time table
dialog should be large enough to contain all future time periods required to contain forecasts you
want to produce. Click Next.

The Variable and Variable Descriptor Columns to Import dialog allow you to filter on facilities and
items before loading them into SmartForecasts. To test that all data is loaded correctly, change
nothing in this dialog. Click Next.

31
X3 V6 -SmartForecasts V8.2

The Embedded Parameter Sets dialog shows three tabs for the three types of SmartForecasts
embedded parameters. Nothing should be changed in the first two tabs.
Click on the third tab for Conversion Parameter Sets.

Select the Conversion


Parameter Sets tab.

Click on the textbox where it says Conversion 1 and rename it Price. Then click New Set. Click on
the textbox where it says Conversion 2 and rename it Cost.
This renaming of the conversions sets is the one time task that doesnt need to be repeated every
time a project is opened. The dialog should look like this when completed:

Click Finish to test the loading of data into the SmartForecasts data table.

32
X3 V6 -SmartForecasts V8.2

Test Save of Forecast Results


The following information briefly describes returning forecast results but is not intended in any way to replace the
documentation of SmartForecasts. Rather it is to show the steps to get back to a point to be able to import a
forecast to X3. Follow the steps in the section above to test the data load before running though the steps in this
section.

Scroll to the right in the data table. There will be a red line indicating the end of the history.

Red line indicates end of


history and beginning of
forecast.

33
X3 V6 -SmartForecasts V8.2

Select items to be forecasted by highlighting their rows. Or clicking in the top left cell of the table to
select all items.

Before generating an expected forecast, disable the lead time, horizon, and review period embedded
parameters. Select Data from the menu, then Parameters, then Enable/Hide Parameters.
Uncheck the checkboxes in the Enable column for Horizon, Review Period, and Service Level %. Then
click OK.

34
X3 V6 -SmartForecasts V8.2

All should be checked


except Horizon, Review
Period and Service Level
% under Enable.

35
X3 V6 -SmartForecasts V8.2

Select Batch from the menu, then Automatic. To generate an expected forecast, select Expected
Forecast from the drop down list.
Make sure the Use Enabled Embedded Forecast Parameters checkbox is set on.

Click the Forecast button.

36
X3 V6 -SmartForecasts V8.2

The Batch Forecast Graph window opens, displaying the first item forecasted in graphical mode.

Click Save All. A confirmation dialog appears.

Click OK.

37
X3 V6 -SmartForecasts V8.2

Close the graph window and view the forecasts now showing to the right of the red line.

38
X3 V6 -SmartForecasts V8.2

Select Database from the menu, then Save As.

Note the project id.


This forms the
second part of the
import key.

Enter a brief description or other information. Note the project ID. Click OK.
Close the data table so that no data remains open in SmartForecasts.

If safety stock values are to be calculated, another new project needs to be created for this second forecast. After
loading the data as described in the section above, re-enable all embedded parameters then forecast again.

Go to Data on the menu, then Parameters, then Enable/Hide Parameters.


Make sure all checkboxes are selected in the Enable column and click OK.
Select the items to forecast or select the entire table by clicking in the top left corner.
Select Batch from the menu, then Automatic. To generate a safety stock forecast, select Service Level
from the drop down list instead of Expected Forecasts.
Make sure the Use Enabled Embedded Forecast Parameters checkbox is set on.
Click the Forecast button.
Click the Save All button under the graph.

39
X3 V6 -SmartForecasts V8.2

No changes need to be made in the Batch Save dialog. Click OK.


Close the batch graph window.
Select Database from the menu, then Save As.

Note this project


ID. It forms the
third part of the
import key.

40
X3 V6 -SmartForecasts V8.2

Enter a brief description or other information. Note the project ID. Click OK.
Close the data table so that no data remains open in SmartForecasts.
The forecast results just saved can then be imported into X3, using as the import key, the Schema ID
noted during the data load process, the forecast project ID and the safety stock project ID. See
separate documentation for detailed instructions.

Connection Wizard
The previous sections describe what must be completed one time from any PC to configure and test
SmartForecasts. This final wizard is run one time on each SmartForecasts users PC to enable each client
installation of SmartForecasts to access the preconfigured database. An ODBC data source must first be prepared,
then the wizard is run:

From the main menu, select Database, then Connection.

The Current Database Connection dialog initially indicates no connection to a database exists. Click New.

41
X3 V6 -SmartForecasts V8.2

Select the ODBC data source you have prepared. Click OK.
Enter your database login information if prompted.
The Configuration Table Qualifier is the folder name.
The Configuration Table Name is SSI_CONFIG.
This connection is to a Microsoft Access database checkbox should be unchecked.
Save password to allow one log in per session checkbox should be checked.

Click OK.

42