retail scheduler technical reference - … · database to the appropriate store and terminal...

34
Retail Scheduler Technical Reference Microsoft Dynamics® AX for Retail April 2011

Upload: trinhhuong

Post on 08-Sep-2018

216 views

Category:

Documents


0 download

TRANSCRIPT

Retail Scheduler Technical Reference

Microsoft Dynamics® AX for Retail

April 2011

Microsoft Dynamics is a line of integrated, adaptable business management solutions that enables you

and your people to make business decisions with greater confidence. Microsoft Dynamics works like and

with familiar Microsoft software, automating and streamlining financial, customer relationship and supply

chain processes in a way that helps you drive business success.

U.S. and Canada Toll Free 1-888-477-7989

Worldwide +1-701-281-6500

www.microsoft.com/dynamics

This document is provided “as-is”. Information and views expressed in this document, including URL and

other Internet Web site references, may change without notice. You bear the risk of using it.

Some examples depicted herein are provided for illustration only and are fictitious. No real association or

connection is intended or should be inferred.

This document does not provide you with any legal rights to any intellectual property in any Microsoft

product. You may copy and use this document for your internal, reference purposes.

Copyright © 2011 Microsoft. All rights reserved.

Microsoft, Microsoft Dynamics, and the Microsoft Dynamics Logo are trademarks of the Microsoft group

of companies.

All other trademarks are property of their respective owners.

Retail Headquarters User’s Guide i

Table of contents

Introduction ..................................................................................................................................... 1

Configuration ................................................................................................................................... 2 Set up connection profiles ............................................................................................................ 2 Enter parameters .......................................................................................................................... 2

Data distribution .............................................................................................................................. 4 Set up distribution locations and sublocations ............................................................................ 4

Set up distribution locations ..................................................................................................... 5 Set up distribution sublocations ............................................................................................... 6

Set up distribution groups, subgroups, and members ................................................................. 6 The 'No filter' group and subgroup ........................................................................................... 6 The default group ...................................................................................................................... 6 Automatic grouping .................................................................................................................. 7 Built-in distribution groups ....................................................................................................... 7 Distribution groups and store groups ....................................................................................... 7 Set up distribution groups ......................................................................................................... 8 Set up distribution subgroups ................................................................................................... 8 Set up distribution member lists ............................................................................................... 9

Set up action filters ..................................................................................................................... 10 Set up table distribution ............................................................................................................. 10

Distribution types .................................................................................................................... 11 Parent-child relationships ....................................................................................................... 12 Insert the default table distribution ........................................................................................ 12 View the table hierarchy ......................................................................................................... 12 Add a new table to the table distribution ............................................................................... 13 Delete a table entry................................................................................................................. 14 Set up table links ..................................................................................................................... 14

Set up the 'Groups to distribute to' list for each record ............................................................ 16 Set up a 'Groups to distribute to' list ...................................................................................... 16

Jobs ................................................................................................................................................ 18 Types of jobs ............................................................................................................................... 18

When to use N jobs ................................................................................................................. 18 Replication counters ................................................................................................................... 19

View replication counters ....................................................................................................... 19 Set up the default include list ..................................................................................................... 20

Which locations receive data .................................................................................................. 20 Initialize jobs and subjobs .......................................................................................................... 21 Configure subjobs ....................................................................................................................... 21

Create or modify a subjob ....................................................................................................... 21 Set up the transfer field list for each subjob ........................................................................... 24

Configure jobs ............................................................................................................................. 25 Settings for P jobs.................................................................................................................... 28

Convert preactions to actions .................................................................................................... 28 View the Actions form ............................................................................................................. 28

Retail Headquarters User’s Guide ii

Run jobs or batches .................................................................................................................... 28 Run a job manually .................................................................................................................. 29 Set up and run a batch ............................................................................................................ 29

Monitor jobs ............................................................................................................................... 29 Troubleshoot job errors .......................................................................................................... 29

Retail Store Connect status ............................................................................................................ 30

Retail Headquarters User’s Guide Introduction 1

Introduction The Retail Scheduler module in Microsoft Dynamics® AX for Retail Headquarters manages the distribution of data through Microsoft Dynamics® Retail Store Connect, from the head-office database to the appropriate store and terminal databases. It also manages updates of the head-office database with sales and inventory data from the stores.

Use Retail Scheduler to manage the distribution of data from the head office to stores and terminals. With this module, you create distribution locations, set up table distribution, and schedule the jobs and subjobs that send information to stores.

Retail Headquarters User’s Guide Configuration 2

Configuration To configure Retail Scheduler, you must complete the following tasks:

Set up connection profiles.

Enter parameters.

Set up connection profiles To set up communication between the head office and stores, you must set up three types of connection profiles: Retail Store Connect profiles, Application Object Server (AOS) profiles, and database profiles. For more information about these tasks, see "Deploy Retail Store Connect" in the Deployment and Installation Guide.

Enter parameters Use parameters to configure Retail Scheduler for your particular business. Parameters provide default settings and values that can often be changed in individual records.

Note For more information about the record types mentioned in this topic, see the appropriate topics later in this part.

1. Click Retail scheduler > Setup > Parameters.

2. Enter information referring, if necessary, to the following.

Retail scheduler parameters form

General tab

System in use – Select this check box to turn on the distribution system. If the check box is cleared, preactions are not generated.

Current location – Select the distribution location (typically, the head-office location) that is the starting point for communication with the stores.

Distribution tab

Use preactions – Select this check box to use preactions instead of actions in jobs. This can be useful when all data goes to all stores.

Retail Headquarters User’s Guide Configuration 3

Data deletion tab

Days actions exist – Type the number of days until an action is automatically deleted. Type 0 (zero) to prevent automatic deletion.

Days scheduler logs exist – Type the number of days until a log file for Retail Scheduler is automatically deleted. Type 0 (zero) to prevent automatic deletion.

Days messages exist – Type the number of days old a Retail Store Connect message must be to be deleted when you delete messages. Type 0 (zero) to prevent message deletion. For more information about deleting messages, see "Monitoring Retail Store Connect" later in this guide.

Days preaction logs exist – Type the number of days until preaction logs are automatically deleted. Type 0 (zero) to prevent automatic deletion.

Note To delete immediately, type -1 in any of the preceding boxes.

Version tab

This tab displays version, copyright, and license information about Retail Headquarters.

Retail Headquarters User’s Guide Data distribution 4

Data distribution Data distribution is the system of settings and records that control how data in the head-office database is sent to store and terminal databases. Data distribution is store-specific, meaning you can specify that certain records are sent only to the locations where they are useful. Data distribution is also table-specific, meaning you can customize the way that changes to certain tables are distributed.

Simply stated, distribution starts and ends with the record that is changed. The distribution process looks like this:

1. You set up action filters to choose which tables are monitored for changes.

2. When a record in one of those tables is modified, the distribution settings for the table that contains the changed record determine whether that record is distributed and whether records in parent or child tables should be distributed along with it.

3. If distribution is supposed to happen, the Groups to distribute to list for the changed record (or its parent record) determines the distribution locations that the data should go to.

4. When the correct distribution has been determined, the appropriate data is sent to the appropriate locations by means of jobs, with the settings of the jobs further refining the specifics of the distribution.

As you can see, setting up data distribution is a complex task. Conduct some tests to determine the distribution structure and settings that provide the best results and performance for your organization.

Setting up data distribution involves the following tasks:

Set up distribution locations and sublocations.

Set up distribution groups, subgroups, and members.

Set up action filters.

Set up table distribution.

Set up the Groups to distribute to list for each record.

Note For more information about jobs, see "Jobs" later in this part.

Set up distribution locations and sublocations A distribution location is a record that represents the destination for distributed data, such as a store or terminal. Whenever you create a store or terminal, Retail Headquarters automatically creates a corresponding distribution location. In general, you must have a distribution location for each location (store or terminal) that has its own database.

Sublocations can help you to improve performance by streamlining the actual distribution of data. For example, if you set up the terminals in a store as sublocations of the store, a single package of information that is distributed to the store goes to the terminal sublocations, too. The disadvantage of this approach is that sending terminal-specific data becomes much more difficult.

Retail Headquarters User’s Guide Data distribution 5

Set up distribution locations

The distribution locations that are created automatically when you create stores or terminals are probably sufficient, but you can create new distribution locations if you want.

Important If you create a distribution location manually, ensure that the distribution location ID matches the ID for the store or terminal that it represents.

5. Click Retail Scheduler > Common Forms > Distribution locations.

6. Press CTRL+N to create a new distribution location.

7. Enter information referring, if necessary, to the following.

Distribution location form

General tab

Location number – Type a unique ID for the distribution location.

Description – Type the description of the distribution location.

Connection profile – Select the database connection profile for this location. For the head-office location, select the AOS profile. For a store or terminal location, select a database profile.

Setup button

Location tables – Open the list of tables that are included in the database for the selected location. For most locations, this list is blank. For more information, see the description of the Read design with Retail Store Connect function below.

Sublocations – Open the list of sublocations for the selected location.

Default include list – Open the default include list for the location. In most cases, only the head-office location needs a default include list.

Functions button

Test connection – Test the connection to the instance of Retail Store Connect that is selected in the connection profile for this location.

Read design with Retail Store Connect – Read the database schema for the selected location and creates the list of location tables. Reading the design is necessary only for locations that are used to define the database design in jobs. By default, all jobs are set to use the design of the Default terminal, location 0001, that was created when you installed Retail Headquarters.

Important Never use this function if the selected location is the head-office location.

For store or terminal locations, use this function only to read third-party tables from the store or terminal database (which you might prefer to do manually instead by using location tables) or to read third-party point-of-sale databases.

Send configuration – Send the Retail Transaction Service profile that is selected in the connection profile for this location to the instance of Retail Store Connect that is selected in the connection profile. The Retail Transaction Service profile facilitates the upload of Retail Store Connect status messages from the store to the head office.

Retail Headquarters User’s Guide Data distribution 6

Set up distribution sublocations

1. Click Retail scheduler > Common Forms > Distribution locations.

2. Select a location, click Setup, and then click Sublocations.

3. Press CTRL+N to add a new sublocation, and then select the distribution location that you want to designate as a sublocation for the distribution location that you selected in step 2 above.

Important To include a sublocation in a job, you must modify the replication information on the Scheduler job form. For more information, see "Jobs" later in this part.

Set up distribution groups, subgroups, and members Distribution groups provide the distribution structure for your organization. You organize distribution locations into distribution groups and subgroups by listing them as members of the group or subgroup. Later, you include distribution groups and subgroups in the Groups to distribute to list for specific records. This controls where those records are distributed. You can also assign a distribution group or subgroup to a job.

You can use distribution groups to group the distribution locations of several stores together. This facilitates data distribution because you can specify data distribution to a large number of stores at one time.

The 'No filter' group and subgroup

Designate one distribution group as the No filter distribution group. This group contains all distribution locations and is at the top of the distribution structure for your organization. All other distribution groups are subsets of this group. When you create a new distribution location, it is automatically added to the No filter group.

If you have subgroups within the No filter distribution group, you must designate one subgroup as the No filter subgroup. Any distribution location added to the distribution group after the No filter subgroup is selected is added to the No filter subgroup automatically.

The default group

The default group is the distribution group that new stores and store groups are assigned to by default. Select this group in the Distribution group form by selecting the Default group check box.

Important When you create a new store or store group, you have the opportunity to change the default distribution group to another distribution group. If you do, the subgroup for the store or store group is not added to the default distribution group, which could have significant impact on the distribution structure.

Retail Headquarters User’s Guide Data distribution 7

Automatic grouping

When you create a store or terminal, a distribution location is created automatically and placed in the following groups and subgroups:

The No filter distribution group.

The No filter subgroup in the No filter distribution group (if any).

The default subgroup in the No filter distribution group (if any).

The distribution group that you select in the Stores form.

The default distribution group if that is different from the distribution group that you select in the Stores form.

A new subgroup in each of the above distribution groups that has the same name as the store.

The default subgroup (if any) in each of the above distribution groups.

Note For terminal locations, automatic grouping based on the store's settings does not happen until the terminal is assigned to a store.

Built-in distribution groups

Three distribution groups are set up for you when you install Retail Headquarters.

All types

All regions

All stores

The All types group is marked as the No filter group, and the All stores group is marked as the default group. If you do not change the settings for these built-in groups, the stores and terminals that you set up are included automatically in the distribution structure.

Distribution groups and store groups

The distribution subgroup that is automatically generated when a store group is created is also automatically populated with the distribution locations for the stores in the store group. When assortments for a store group are modified, Retail Scheduler factors in the relationship between store group and stores, and the changes are automatically distributed directly to the correct stores and terminals.

If you include the distribution subgroup for a store group in the Groups to distribute to list for any record, you must manually add terminal locations to the distribution subgroup. Do this for all terminals for all stores that are included in the store group. If you do not, information is sent only to the stores.

Retail Headquarters User’s Guide Data distribution 8

Set up distribution groups

The automatic grouping that occurs when you set up your stores and terminals might be sufficient for your distribution needs, but you can set up custom distribution groups or modify the built-in distribution groups.

1. Click Retail scheduler > Setup > Distribution groups.

2. Press CTRL+N to create a new group, or select an existing group that you want to modify.

3. Enter information referring, if necessary, to the following.

Distribution groups form

General tab

Distribution group – Type the unique ID of the distribution group.

Description – Type a name for the distribution group.

No filter – Select this check box to specify that all new distribution locations should be included in this distribution group. This option can be assigned to only one distribution group. For more information, see "The 'No filter' group and subgroup" earlier in this topic.

Default group – Select this check box to specify this distribution group as the default distribution group. This option can be assigned to only one distribution group. For more information, see "The default groups" earlier in this topic. This setting represents the first type of default group that is discussed there.

Tree tab

View the hierarchy of distribution groups, subgroups, and members.

Group button

Subgroups – Open the list of subgroups for the selected distribution group.

Member list – Open a read-only list of the distribution locations that are included in this distribution group.

Set up distribution subgroups

A distribution subgroup is the second level in the distribution group. The subgroup can have one or more members.

1. Click Retail scheduler > Setup > Distribution groups.

2. Select the distribution group that you want to modify.

3. Click Group, and then click Subgroups.

4. Press CTRL+N to create a new subgroup.

5. Enter information referring, if necessary, to the following.

Retail Headquarters User’s Guide Data distribution 9

Subgroups form

General tab

Distribution subgroup – Type the unique ID of the distribution subgroup.

Description – Type a name for the distribution subgroup.

No filter – Select this check box to specify that all new distribution locations should be included in this distribution subgroup. This option can be assigned to only one subgroup, and the option is only available if the subgroup belongs to the No filter distribution group. For more information, see "The 'No filter' group and subgroup" earlier in this topic.

Default subgroup – Select this check box to specify this distribution subgroup as the default distribution subgroup for this distribution group only. This option can be assigned to only one subgroup. For more information, see "Default subgroups" earlier in this topic.

Group is distribution location – This check box is selected when the subgroup is automatically generated from the distribution location and contains one or more members that are distribution locations.

Member list button

Open the list of member distribution locations for the selected distribution subgroup.

Important

Be very careful when setting up subgroups. If a member of a subgroup is not associated with a valid connection profile, the actions in jobs related to the subgroup member are not processed. This could lead to replication counter conflicts that are not easily resolved.

If a subgroup is marked as a distribution location, it is maintained automatically. In general, you should not modify its member list manually.

Set up distribution member lists

A distribution member is directly linked to distribution locations. You can add and remove distribution locations from a member list for a distribution subgroup.

1. Click Retail Scheduler > Setup > Distribution groups.

2. Select the distribution group that you want to modify.

3. Click Group, and then click Subgroups.

4. Select the subgroup that you want to modify.

5. Press CTRL+N to add a new member to the subgroup.

6. Enter information referring, if necessary, to the following.

Retail Headquarters User’s Guide Data distribution 10

Distribution members form

Location – Select the distribution location that you want to make a member of this subgroup.

Location name – The name of the selected distribution location. This field is filled in automatically.

Note If you opened the Distribution members form from a distribution group rather than from a distribution subgroup, all fields are read-only.

Set up action filters When you set up an action filter, you begin to monitor changes to a specific table. Whenever a record in the table is created, updated, or deleted, the action filter captures that information and puts it into a preaction, which is an instruction about the corresponding changes that should be made at the affected distribution locations.

If you want to monitor changes only to certain fields in a table, you can list those fields in the action filter. Do not list fields if you want to monitor all changes to the table.

1. Click Retail scheduler > Setup > Filter on action creations.

2. Press CTRL+N to create a new action filter.

3. Enter information referring, if necessary, to the following.

Filter on action creations form

Tables tab

Table number – Select the table that you want to monitor for changes.

Name of table – The name of the selected table. This field is filled in automatically.

Fields tab

Note If no fields are listed on this tab, changes to all fields are monitored.

Field number – Select the field that you want to monitor for changes.

Field name – The name of the selected field. This field is filled in automatically.

Set up table distribution Table distribution is the hierarchical distribution scheme for the head-office database. For each table included in the table distribution, you specify the type of distribution that occurs. You also define the parent-child relationships for the tables in the table distribution.

Retail Headquarters User’s Guide Data distribution 11

The decision on how to distribute the data in a table depends on the purpose of the table. For example, the Product Posting Group table should be distributed to all distribution locations. The Item table might have a more selective data distribution, depending on the selection of items in the stores.

Important Setting up table distribution is a complex task. It should be undertaken only by someone experienced in Microsoft® SQL Server® administration who has detailed knowledge of the tables and fields in the head-office database.

Note If you create an action filter for a table that is not listed in the table distribution, changes to records in that table are sent to all locations provided a subjob for the table is included in an active job. In other words, if you want all changes to a particular table to go to all stores, you do not need to add that table to the table distribution. If the table is already listed in the table distribution, however, you must ensure that the distribution type is correct.

Distribution types

The distribution type for a table controls how that table is distributed. The following distribution types are available:

All distribution locations – Changes to records in the table are sent to all locations.

Same as parent distribution – Changes are distributed based on the distribution type of the table that is the parent of the table. Use this distribution type for records that must always be accompanied by other records. For example, items and bar codes for the items must have the same data distribution. If you select this distribution type, you cannot set up Groups to distribute to lists for specific records in the table.

Important If you select this distribution type, you must set up table links that describe the relationship between the child table and its parent table. For more information, see "Set up table links" later in this topic.

By distribution groups – Changes are distributed based on the Groups to distribute to list for the changed record in the table. For example, changes made to an item are sent only to the distribution locations that are included in the groups list for that specific item.

Important Typically, you select this distribution type only for tables at the top of the table distribution hierarchy.

Before selecting this distribution type, verify that a Groups to distribute to list is available for the records contained in the table. You must set up the Groups to distribute to list for every record in the table, either in the individual record or in a group—such as a store group or retail hierarchy group—that contains the individual record. Records for which the groups list is not set up are not distributed. For more information, see "Set up the 'Groups to distribute to' list for each record" later in this section.

No distribution – Changes to the table are not distributed, regardless of the Groups to distribute to list for the changed record. If a table with this distribution type is the parent of another table and the child table is set to Same as parent distribution, changes to the child table are not distributed.

Retail Headquarters User’s Guide Data distribution 12

Parent-child relationships

If you use table distribution to establish a parent-child relationship between two tables, you must complete both of the following actions:

For the child table, set up table links that describe the relationship between the child table and its parent table. For more information, see "Set up table links" later in this topic.

For the parent table, specify the types of actions (insert, update, or delete) that cause any child tables to be distributed with the parent table. These Linked actions settings carry through to any child tables of the child tables, too. In other words, if table A has the Linked actions settings enabled and it is the parent of table B, and table B is the parent of table C, the Linked actions settings on table A cause records in both tables B and C to be distributed when records in table A are distributed. The Linked actions settings on table B are ignored if the change originates in table A. The Linked actions settings are found on the Table distribution form (Retail scheduler > Setup > Table distribution).

Insert the default table distribution

The default setup for table distribution is appropriate for most organizations. Even if you want to customize the table distribution, inserting the default setup can save you a lot of time.

Note If you inserted the default setup during deployment of Retail Headquarters, skip this procedure.

1. Click Retail scheduler > Setup > Table distribution.

2. Click Functions, and then click Insert default setup.

View the table hierarchy

Turn on the tree control to see the hierarchy of parent-child relationships between tables.

1. If you want to view a particular table in the tree view, select the table.

2. Select the Tree control check box.

3. Take one of the following actions:

To expand a parent table in order to view or modify its child tables, click the plus sign (+) next to the table name.

To view or modify the settings for a table, select it.

Note A table can be the child of more than one parent table. In that event, the child table appears in the hierarchy more than once, and, depending on settings, the distribution of changes to a record in the child table might propagate up through multiple parent tables.

Retail Headquarters User’s Guide Data distribution 13

Add a new table to the table distribution

Important Setting up table distribution is a complex task. It should be undertaken only by someone who is experienced in SQL Server administration and who has a working knowledge of the tables and fields in the head-office database.

1. If it is selected, clear the Tree control check box.

2. Press CTRL+N to create a new table.

3. Enter information referring, if necessary, to the following.

Table distribution form

Tree control – Select this check box to see a hierarchical view that shows the parent-child relationships between tables.

Table ID – Select the table that you want to add to the table distribution.

Name of table – The name of the selected table.

Distribution type

o All distribution locations – Select this option to distribute changes to records in the table to all locations.

o Same as parent distribution – Select this option to distribute changes based on the distribution type of the table that is the parent of the table.

o By distribution groups – Select this option to distribute changes based on the Groups to distribute to list for the changed record in the table.

o No distribution – Select this option if changes to the table are not distributed.

For more information about distribution types, see "Distribution types," earlier in this guide.

Parent table – The table that is the parent of this table. If this table does not have a parent table, set this to zero (0).

Name of table – The name of the table that is the parent of this table. This field fills in automatically when you select the table ID.

No actions – Select this check box if this table is part of the hierarchy of tables that are distributed but it should not itself be distributed.

Parent to another table – A check box appears here if this table is the parent of another table. This is set automatically when table links are set up for the child tables as described in "Set up table links" later in this topic.

Table links – The number of links to a parent table that are set up for this table. This field is calculated automatically. For more information, see "Set up table links" later in this topic.

Linked actions on insert – Select this check box if you want relevant records in the child tables for this table to also be distributed when a record is added to this table. If this table has no child tables, selecting this check box has no effect. For more information, see "Parent-child relationships" earlier in this topic.

Retail Headquarters User’s Guide Data distribution 14

Linked actions on update – Select this check box if you want relevant records in the child tables for this table to also be distributed when a record in this table is modified. If this table has no child tables, selecting this check box has no effect. For more information, see "Parent-child relationships" earlier in this topic.

Linked actions on delete – Select this check box if you want relevant records in the child tables for this table to also be distributed when a record is removed from this table. In most cases, this means that records in the child table are deleted along with the record in this table. If this table has no child tables, selecting this check box has no effect. For more information, see "Parent-child relationships" earlier in this topic.

Setup button

Table links – Set up the links between this table and its parent table. For more information, see "Set up table links" later in this topic.

Functions button

Insert default setup – Inserts the default table distribution. For more information, see "Insert the default table distribution" earlier in this topic.

Check parent table setup – Verifies that the parent-child relationships in the table distribution are set up properly.

Indent – This feature is not implemented in this release and may be removed from future releases.

Clear indent – This feature is not implemented in this release and may be removed from future releases.

Delete a table entry

1. If it is selected, clear the Tree control check box.

2. Select the table entry that you want to delete, and then click the Delete button on the toolbar.

Set up table links

Table links define the conditions that must be met for the distribution of records in one table to be managed according to the distribution type of a parent table. The effect of setting up a table link is comparable to the link between a primary key and a foreign key in SQL Server, but a table link applies only to data distribution. Table links are only required for tables that are set to the Same as parent distribution distribution type.

Important Setting up table links is a complex task. It should be undertaken only by someone experienced in SQL Server administration who has detailed knowledge of the tables and fields in the head-office database.

There must be a logical relation between the tables that you link. For example, you cannot link the Item table to the Customer table because there is no logical relation between those two tables.

For parent fields, you must select fields that are part of the primary key for the parent table.

For child fields, we recommend that you select fields that are part of the primary key or part of a properly indexed foreign key for the child table.

Retail Headquarters User’s Guide Data distribution 15

How table links work

When a record in a child table is modified and the resulting preaction is converted to an action, Retail Scheduler checks to see if the modified record is in a table for which distribution is controlled by the settings of a parent table. If it is, Retail Scheduler then checks to see if the modified record meets the criteria of one of the links to the parent table.

If a table link includes multiple criteria, all of the criteria must be met for distribution to occur based on that link. If a modified record does not meet the criteria of any of the links to the parent table, distribution does not occur.

For example, in the default setup for table distribution, the RBOMultibuyDiscountItems table has only one link to its parent table, and only one criterion is included in the link. That criterion specifies that a changed record in the RBOMultibuyDiscountItems table is distributed only if the value in its offerId field matches an entry in the multibuyId field in the parent table, RBOMultibuyDiscountTable. If the table link had more than one criterion, the changed record would have to meet the other criteria, too, for distribution to occur.

Set up table links

1. In the Table distribution form, select the table that you want to link to its parent table.

Note The parent table must already be listed in the table distribution.

2. Click Setup, and then click Table links.

3. In the upper pane, press CTRL+N to create a new table link, and then type a unique link number.

Note If there are multiple entries in the upper pane, meeting the criteria of any one table link creates the link (SQL OR operation).

4. In the lower pane, press CTRL+N to create a new criterion.

Note If there are multiple entries in the lower pane, all of the criteria must be met in order to create the link (SQL AND operation).

5. In the Field box, select the field that you want to link to a field in the parent table.

6. In the Parent field box, select the field in the parent table that you want to link to.

7. If the parent field should contain a particular value, type that into the Value box.

8. Repeat steps 4 through 7 for any additional criteria for this table link.

Retail Headquarters User’s Guide Data distribution 16

Set up the 'Groups to distribute to' list for each record The Groups to distribute to list is the list of distribution subgroups that a specific record should be distributed to. For example, you can set up the Groups to distribute to list for a discount so that it is distributed only to certain locations.

The Groups to distribute to lists are used only for tables that have the By distribution groups distribution type. Create the following distribution structure for each record in the table:

The Groups to distribute to list contains one or more distribution subgroups.

The distribution subgroups contain one or more members (distribution locations).

Note You must set up Groups to distribute to lists for all records in tables that have the By distribution groups distribution type. You can do this in two ways:

By setting up a Groups to distribute to list for each record in the table.

By creating a Groups to distribute to list for each of your organizational groups—such as store groups or retail hierarchy groups—that contain the records in the table.

You cannot set up Groups to distribute to lists for records in tables that have other distribution types or for records in tables that are not included in the table distribution. For more information, see "Set up table distribution" earlier in this section.

Warning If a record is in a table that has the By distribution groups distribution type and the Groups to distribute to list for that record is not set up, the record is not distributed.

Set up a 'Groups to distribute to' list

1. Open the form that contains the type of records that you want.

2. Select the record that you want to modify, click Setup, and then click Groups to distribute to.

3. Press CTRL+N to create a new entry in the list.

4. Enter information referring, if necessary, to the following.

Groups to distribute to form

Distribution group – Select a distribution group that you want this record to be distributed to.

Name – The name of the selected distribution group. This field is filled automatically.

Distribution subgroup – Select a distribution subgroup that you want this record to be distributed to.

Note If you want this record to be distributed to more than one subgroup in the distribution group, you must create an entry for each subgroup.

Name – The name of the selected distribution subgroup. This field is filled automatically.

Retail Headquarters User’s Guide Data distribution 17

5. Repeat this procedure for other records of this type.

Note

If you receive an error that says that you cannot manually insert distribution for the table, it means that the distribution type for the table is not set to By distribution groups.

For more information about distribution locations and groups, see "Set up distribution locations" and "Set up distribution groups" earlier in this section.

Retail Headquarters User’s Guide Jobs 18

Jobs With distribution set up, you are ready to begin distributing data to your locations. Jobs are the mechanism for doing this. Each job has a location filter, which is the set of distribution locations that has resulted from the distribution settings for the data that is included in the job. Jobs are made up of subjobs, which are table-specific instructions for replicating data.

Running jobs involves the following tasks:

Set up the default include list

Initialize jobs and subjobs

Configure subjobs

Configure jobs

Convert preactions to actions

Run jobs or batches of jobs

Types of jobs There are four types of jobs:

Action (A) jobs – A jobs send data from the head office to stores. The changes included in the jobs are those that have been tracked by the action filters that you set up. The locations that receive the jobs are determined by the distribution settings for the changed records (or their parent records).

Custom (C) jobs – C jobs run a specified custom class. Custom classes can be created by Microsoft partners and must contain support to be run in Retail Scheduler. Two C jobs are included in Retail Scheduler by default, C-1000 (Send email receipts) and C-1020 (Convert Preactions).

Normal (N) jobs – N jobs are not dependent on actions. They delete all existing data in the destination tables and then insert updated data. N jobs send data from the head office to the locations specified in the include list for the job.

Pull (P) jobs – P jobs pull data—such as sales and inventory data— from the distribution location specified in the job and insert it into the head-office database. You need one P job for each terminal or store database.

When to use N jobs

Use N jobs if all of the locations in your organization should receive the same data. You should also run select N jobs when you set up a new store or terminal.

Note The following topic assumes that you are using the jobs that are set up for you when you initialize jobs and subjobs as described later in this guide. If you have modified those jobs or created additional jobs, you might need to modify the following list accordingly.

Retail Headquarters User’s Guide Jobs 19

Jobs for a new store or terminal

In addition to all A jobs, run the following N jobs when you set up a new store or terminal.

Important To avoid sending all of this data to all locations, temporarily modify each of these N jobs so that it is sent only to the new location. To do this, select Single location in the Distribution restrictions field for the job, and then select the new location in the To location field. After the jobs are complete, change the Distribution restrictions and To location fields back to their previous values.

N-1000 (Currency)

N-1010 (Customer)

N-1030 (Infocodes) – if used

N-1050 (Loyalty) – if used

N-1080 (Tax)

N-1100 (Item and price parameters)

N-1110 (Global configuration)

Replication counters A replication counter is a marker that is used by an A job or P job to determine which records to process. Replication counters are specific to each subjob within the job.

For A jobs, the record ID of the last processed action is stored in a table in the head-office database. The subsequent run of each job starts with the next action after that. Typically, you do not need to set up these replication counters; however, if you want to, click Retail scheduler > Setup > Initial replication counters.

For P jobs, the previous replication counter is stored in the source table in the terminal or store database. The next run of the P job starts with the replication counter that is one higher than that value.

View replication counters

1. Click Retail scheduler > Common Forms > Scheduler job.

2. Select the job for which you want to view replication counters.

3. Click Setup, and then click Replication counters.

The list shows the replication counters for each of the subjobs included in the job.

Note For P jobs, you can modify a replication counter to a lower value in order to reprocess records, such as in the event of a job error. Be very careful with this feature, as it is possible to cause inconsistencies and other issues with your data.

Retail Headquarters User’s Guide Jobs 20

Set up the default include list An include list is a list of distribution locations that are included in a subjob. When you assign an include list to a subjob, data is distributed to locations that are in both the include list for the subjob and the location filter for the actions that are included in the subjob.

When you configure a subjob, you can select a custom include list or you can select the default include list, which is the list of distribution locations that you typically distribute data to.

To ensure that data is distributed to the locations it is intended for, we recommend putting all of your distribution locations into your default include list. The exception would be locations to which you want to distribute information only under special circumstances.

The default include list is associated with the distribution location for the head office.

1. Click Retail scheduler > Common Forms > Distribution locations.

2. Select the head-office location.

3. Click Setup, and then click Default include list.

4. To add a distribution location, press CTRL+N.

5. In the Default include location field, select the distribution location that you want to include.

The Description is filled in automatically.

6. Repeat steps 4 and 5 for any additional locations.

Note If there are distribution locations that you want to exclude from a job, you can specify those in an exclude list. For more information, see the descriptions of the Distribution restrictions settings in the Jobs form in "Configure jobs" later in this section.

Important Locations that are not in the default include list or the include list for the job will not receive data.

Which locations receive data

Table distribution and the Groups to distribute to lists determine the initial list of distribution locations that receive data. The result of these settings is visible in the action location filters.

For each job, the include list or exclude list can be used to further filter the list of distribution locations for the job. If a location in the location filter is present in the include list, that location receives data. If a location in the location filter is present in the exclude list, that location does not receive data.

The distribution filter for the job further filters the location filter and the include list. If a location is not part of the distribution filter, the job is not sent to that location. For this reason, we recommend including all distribution locations in the distribution filter whenever possible and using other settings to limit the locations that receive data.

Note The distribution filter can be useful for partner and other third-party solutions, because you can define jobs and subjobs that apply only to specific locations, while still taking advantage of the flexibility of the distribution mechanisms.

If none of the locations in the action location filter are filtered out by the settings of the job, all of the locations in the location filter receive data.

Retail Headquarters User’s Guide Jobs 21

Initialize jobs and subjobs Microsoft Dynamics AX for Retail Headquarters comes with prepared jobs and subjobs that meet the replication needs of most organizations. To populate these jobs and subjobs, you must initialize Retail Headquarters. Do this even if you want to customize the jobs and subjobs; it will save you a lot of time.

Note You might have completed this task already during deployment of Retail Headquarters. If so, skip this procedure.

1. Click Retail Headquarters > Setup > Parameters.

2. Click Initialize.

Configure subjobs To configure a subjob, complete the following tasks:

Create or modify a subjob.

Set up the transfer field list for each subjob.

Note You can reuse a single subjob in several jobs.

Create or modify a subjob

1. Click Retail scheduler > Common Forms > Scheduler subjob.

2. Press CTRL+N to create a new subjob or select the subjob that you want to modify.

3. Enter information referring, if necessary, to the following.

Scheduler subjob form

Overview tab

Subjob number – A unique identifier for the subjob.

Description – The name of the subjob.

Replication method – The replication method for the subjob.

o By actions – Replicates only the records that have changed since the last replication occurred. This replication method works in conjunction with the action filters and table distribution that you have set up.

o Normal – Replicates all records from the source table to the destination table. Use this method when the data is sent for the first time, when the destination location must be updated with a complete new data set, or when the subjob uses a replication counter to pull data from a store or terminal database that is new since the job was last run.

Important As a general rule, N jobs and P jobs should contain subjobs with Normal replication, and A jobs should contain subjobs with By actions replication.

Retail Headquarters User’s Guide Jobs 22

Setup tab

From design – Enter settings about the database that this subjob will read data from. These settings are used only to identify the database schema; they are not used to determine the actual database that is read.

o Location number – A distribution location with a database that contains the table that you will want to read data from.

For subjobs for A and N jobs (jobs that read from the head-office database), leave this field blank.

For subjobs for P jobs (jobs that read from store or terminal databases), select a location with a typical database schema. If you are deploying Microsoft Dynamics AX for Retail POS, select the Default POS location, location 0001, that was created when you installed Retail Headquarters.

Note If you are not using Retail POS, you must select a distribution location for which you have read the database design by using the Read design with Retail Store Connect function.

o From table – Select the table that should be checked for data.

To design – Enter settings about the database that this subjob will replicate data to. These settings are used only to identify the database schema; they are not used to determine the actual database that is written to.

o Location number – A distribution location with a database that contains the table that you want to write to.

For subjobs for A and N jobs (jobs that write to the store or terminal databases), select a location with a typical database schema, such as the Default POS location, location 0001, that was created when you installed Retail Headquarters.

For subjobs for P jobs (jobs that write to the head-office database), leave this field blank.

o To table – Select the table that should be updated with new data.

Replicate dataAreaId – Select this check box for all subjobs for A or N jobs. It causes the company account field to be replicated.

Field for dataAreaId – The field in the From design table that contains the company account (dataAreaId).

Replication

o Replication method – For descriptions of the methods, see "Overview tab" above.

o Field transfer type – How the transfer field list is handled. Select Include list.

o Delete – Select this check box to delete records in the table prior to inserting data.

o Insert – Select this check box to add the data in the job into the table as new records.

Note The Delete and Insert options are ignored by A jobs. For most subjobs for N jobs, select both the Delete and Insert check boxes. For subjobs for P jobs, select only the Insert check box.

Retail Headquarters User’s Guide Jobs 23

o Enabled – Clear this check box if the subjob should be skipped when it is included in a batch job.

o Pull data – Select this check box only for subjobs for P jobs where the From design database is for a store or terminal and the To design database is for the head office.

o Transfer field list exists – This check box is selected automatically when the transfer field list contains data.

o From/To filters exist – This check box is selected automatically when From table filters have been set up for the subjob.

o Linked tables exist – This feature is not implemented in this release and might be removed from future releases.

Replication tab

Actions – These settings are only available for By actions subjobs.

o Action counter interval – The number of actions to process at one time. You can use this feature to process actions in batches in order to improve performance. Type 0 to process all actions since the previous run.

Important If you process actions in batches, ensure that the batch job runs repeatedly so that all records are updated in quick succession.

Replication counters – These settings are only available for subjobs for which the Pull data check box is selected on the Setup tab.

o Replication counter – The name of the field in the pulled tables that contains the replication counter. You must select REPLICATIONCOUNTER.

o Replication counter interval – The number of transactions or other records to pull at one time. You can use this feature to pull records in batches in order to improve performance. Type 0 to process all actions since the previous run.

Important If you pull records in batches, ensure that the batch job runs repeatedly so that all records are updated in quick succession.

Setup button

Transfer field list – Opens the list of fields that should be transferred from the From design table to the To design table.

From table filters – Opens the list of table filters.

Functions button

Copy scheduler subjob – Speeds up subjob creation by copying the settings of the selected subjob to a new subjob.

Retail Headquarters User’s Guide Jobs 24

Set up the transfer field list for each subjob

Important Setting up the transfer field list is an advanced task that should be undertaken only by someone with detailed knowledge of the database schemas.

1. Click Retail scheduler > Common Forms > Scheduler subjob.

2. Select the subjob that you want to modify.

3. Click Setup, and then click Transfer field list.

4. If the field list is empty, complete the following steps:

a. Click Functions, and then click Match fields.

b. Select the dataAreaId field, and then click Delete.

c. Make other changes as desired.

5. Enter information referring, if needed, to the following.

Field list form

From field – Select the field in the From design database that you want to map to a field in the To design database.

Field type – The type of field in the database. This is filled in automatically; the information comes from the database.

To field – Select the field in the To design database that you want to map to the field that you selected in the From field number field.

Field type – The type of field in the database. This is filled in automatically; the information comes from the database.

Conversion type – The method that will be used to convert the data in the field that you selected in the From field number field so that it is useful in the field that you selected in the To field number field.

o None – No conversion takes place.

o Constant – A single value is inserted in the To field. You must specify this value in the Conversion value field.

o Substring – This feature is not implemented in this release and may be removed from future releases.

o Today() – The current date is inserted into the To field, with the time set to midnight.

o TimeNow – The time of the conversion is inserted into the To field.

o Skip text conversion – This feature is not implemented in this release and may be removed from future releases.

o Time to integer – Converts the time in the From field to Long data type and then inserts it into the To field.

o Integer to time – Converts the value in the From field to a time and then inserts it into the To field.

Conversion value – The value that you want the data in the From field to be converted to.

Retail Headquarters User’s Guide Jobs 25

Functions button

Match fields – Reads fields from the From design database and maps them automatically to fields in the To design database. Do not use this function if the list already contains settings.

Configure jobs Jobs should contain subjobs that are related. For example, the Currency job contains subjobs that update currencies and exchange rates. Jobs should also contain subjobs that use replication methods that are consistent with the type of job. As a general rule, N jobs and P jobs should contain subjobs with Normal replication, and A jobs should contain subjobs with By actions replication.

1. Click Retail scheduler > Common Forms > Scheduler job.

2. Press CTRL+N to create a new job or select the job that you want to modify.

3. Enter information referring, if necessary, to the following.

Scheduler job form

Overview tab

Job number – A unique identifier for the job.

Description – A name for the job.

Job type – The type of job that this is. Select 1 for A and P jobs, and select 3 for C and N jobs.

Location number – The starting point of the job. Select the location that has the database that contains the data to be sent.

Last checked date – The date when the job was last run.

Last checked time – The time when the job was last run.

Enabled – Clear this check box if the job should be skipped when it is included in a batch job.

Status message – The result of the last run of this job.

General tab

Job number – A unique identifier for the job.

Description – A name for the job.

Subjobs defined by job – The job that was duplicated to create this job.

Retail Headquarters User’s Guide Jobs 26

From location – The starting point of the job. Enter settings about the location that has the database that contains the data to be sent.

o Use current location – Select this check box to start with the location (typically, the head-office location) that is set as the current location in the Retail scheduler parameters form.

o Location number – The location that is the starting point for this job.

Important If you have selected the Use current location check box, leave this field blank.

o Description – The name of the location that you selected in the Location number box. This field is filled in automatically.

Distribution

o Distribution restrictions – Specify the distribution locations that the data in the job is sent to.

Note Use this setting to filter the included distribution locations beyond the filtering that has already taken place based on table distribution and other settings. For example, suppose other distribution settings have resulted in a changed record being slated (via the location filters for the actions in the job) to go to three locations. If one of those locations is not on the include list used by the job, or if it is on the exclude list used by the job, then the data will only go to the remaining two locations. Locations that are not in the default include list or the include list for the job will not receive data.

No – No restrictions. Data is sent to all locations that are part of the location filters for the actions in the job.

Include list – Data is sent only to the locations that are in the Distribution include/exclude list.

Exclude list – Data is not sent to the locations in the Distribution include/exclude list for the job.

Single location – Data is sent only to the To location for the job. Use this option for P jobs, and then select the head-office location as the To location.

Default include list – Data is sent only to locations that are on the default include list for the From location for the job. Typically, you should use this setting only when the From location is the head office. For more information, see "Set up the default include list" earlier in this section.

Distribution sublocations – Specify whether the data in the job is sent to the sublocations of the locations that qualify to receive the data.

o Excluded from replication – Sublocations do not receive data (unless the sublocation is itself a qualifying distribution location).

o Included in replication – Sublocations receive data. Each sublocation receives the same data package that is received by its parent location.

o Only included in replication – Only sublocations receive data; the parent location is excluded.

Retail Headquarters User’s Guide Jobs 27

Error handling – This feature is not implemented in this release and might be removed from future releases.

To location – The distribution location that should receive the data in this job. These settings are only available if Single location is selected in the Distribution restrictions field.

o Location number – Select the location that should receive data.

o Description – The name of the selected location. This field is filled in automatically.

Object setup tab

Application object – The application object that executes the job.

Free variables – Data to be passed to the application object as execution context. This feature is not used by the default distribution structure; it is included to facilitate partner customizations.

Setup button

Distribution filters – The master list of distribution locations that this job can be sent to. You can use this list to filter locations. For best results we recommend including all locations in the distribution filter and relying on other settings, such as the Distribution include/exclude list, to manage the locations for the job. For more information, see "Which locations receive data" earlier in this section.

Distribution include/exclude list – Opens the list of distribution locations that the data in this job is allowed to be sent to. For more information, see "Which locations receive data" earlier in this section.

Note The Distribution include/exclude list acts as an include list or an exclude list depending on whether Include list or Exclude list is selected in the Distribution restrictions field. If neither of those options is selected, the Distribution include/exclude list is ignored.

Default include list – Opens the default include list for the From location for this job.

Replication counters – Opens the list of replication counters for an A or P job.

Functions button

Run Retail Scheduler job directly – Runs the selected job now.

Copy scheduler job – Speeds up job creation by copying the settings of the selected job to a new job.

Batch job button

Create batch job – Click to include all selected jobs in a batch job. For more information, see "Set up batch jobs" later in this section.

Enable batch job – Selects the Enabled check box for all selected jobs, causing each job to be run when any batch job that includes that job is run.

Disable batch job – Clears the Enabled check box for all selected jobs, causing the jobs to be skipped when any batch job that includes those job is run.

Scheduler log button

Opens the log for the selected job.

Retail Headquarters User’s Guide Jobs 28

Settings for P jobs

You must have one P job for each store or terminal location that has its own database. In each job, verify the following settings on the General tab in the Scheduler job form:

Under From location, clear the Use current location check box and select the correct location.

Under Distribution, confirm the correct setting in the Distribution restrictions box. Typically, to pull data, specify Single location.

Under To location, select the head-office location.

Convert preactions to actions When changes occur in tables for which you have set up action filters, preactions are created automatically. A preaction is a data record that provides information about what entity changed, when it changed, and who made the change. The preaction list is like a holding area for these data records. To send the changes to stores, you must convert the preactions to actions.

Click Retail scheduler > Periodic > Actions > Create actions.

This generates the action job.

Note

This procedure works only if the Insert, Update, and Delete methods in the table have been overridden and contain the correct code to generate the preactions.

You can create actions automatically by setting up a batch job that includes job C-1020, Convert Preactions.

View the Actions form

Click Retail scheduler > Periodic > Actions.

Location filters in actions

When you convert preactions to actions, you add an extra field to the data record, the location filter. The location filter is the list of locations that the action applies to. This is determined by looking at both of the following:

The table distribution setup for the affected table

The Groups to distribute to list for the affected record (or its parent record)

For more information, see "Set up table distribution" earlier in this part.

Run jobs or batches You can run jobs manually or set up a batch to create a schedule for jobs to be run automatically.

Retail Headquarters User’s Guide Jobs 29

Run a job manually

1. Click Retail scheduler > Scheduler job.

2. Select the job that you want to run.

3. Click Functions, and then click Run Retail Scheduler job directly.

Set up and run a batch

A batch is a scheduled job or batch of jobs. If you create a batch, AOS sets a timer to run the job automatically on the server without manual action.

Note

To run batch jobs, you must configure the batch server. For more information, see Microsoft Dynamics AX Help.

If the Enabled check box is cleared for a job, the job is omitted in any batch that includes that job. The Enable batch job and Disable batch job commands on the Batch job button menu actually enable or disable the selected scheduler jobs by selecting and clearing the Enabled check boxes.

1. In the jobs list, use the CTRL key to select all of the scheduler jobs that you want to include in a batch, click Batch job, and then click Create batch job.

2. Type a name for the job. The job name does not have to match job names or table names. Typing a name is optional; if you do not, a name is created for you based on the company name plus the name of the first job in the batch. A name that you select might make the batch easier to recognize.

3. Enter the schedule for the batch. For information about the settings in the Recurrence form, see Microsoft Dynamics AX Help.

To view created jobs, click Basic > Inquiries > Batch job. To view the jobs within a batch, select the batch, and then click View tasks.

Monitor jobs Use the Scheduler log form to check job status.

1. Click Retail scheduler > Common Forms > Scheduler job.

2. Select the job that you want, and then click Scheduler log.

Troubleshoot job errors

The error message "Cannot get package information" typically means that Retail Store Connect cannot connect to its message database. For each instance of Retail Store Connect that is included in the job, troubleshoot the issue by taking the following actions on the computer where the instance is installed:

View the log file to view the cause of the issue. For information about turning on logging, see the Retail Store Connect Technical Reference. Run the job again to create a new log file.

Run Retail Store Connect Settings and verify the connection string.

For assistance with other job errors, contact Microsoft Product Support.

Retail Headquarters User’s Guide Retail Store Connect status 30

Retail Store Connect status In most deployments, an instance of Retail Store Connect is deployed in each store in addition to several instances at the head office. This means that a data package can go through multiple instances of Retail Store Connect before it is actually inserted into the target database. To make it easier to view the status of a data transfer and troubleshoot any issues, Retail Scheduler includes a tool that lets you check status messages from every store to see if data downloads were successful and respond if an error occurs.

For more information, see "Retail Store Connect status" in the Headquarters User's Guide.