Distribution Scheduler for Retail Stores

Microsoft Dynamics AX 2012 for Retail has made a huge step forward in helping partners and clients deploy the AX POS in stores. But how do you keep the POS-DB up to date?

Here comes the Distribution schedule, found under /Retail/Periodic/Retail scheduler/Distribution schedule, in play.

There are 3 types of jobs in the scheduler: A-Jobs, N-Jobs and P-Job. The job number tells you what data the job will replicate on the POS-DB; for example N-1010 replicates everything that is related to Customers and N-1080 replicates everything that is related to Tax information. The different tables that are being replicated on the POS-DB you can see under /Retail/Setup/Retail scheduler/Scheduler job. 

Setup of Scheduler Jobs

Setup of Scheduler Jobs

As you can see from the screenshot, every job is made out of at least 1 subjob (tables) that can be replicated. Here you can create specific jobs, that transfer only the tables that you need. You can also edit existing jobs by enabling or disabling subjobs.

Important to note here is that there are a couple of jobs that seem to repeat, like A-1010 and N-1010. What is the difference between the different job types you might ask? Good question!

  • A-Jobs replicate only changes made to the data in the respective tables since the last time the A-Job has ran
  • N-Jobs replicate the whole table in the POS-DB
  • P-Job replicates the data from the POS-DB in AX (the oposite direction from the A and N-Jobs). Here are the POS transactions, transaction lines, tax information, reason codes etc.

Exactly these A-Jobs are used to keep the POS-DB up to date. Every time there is a new record (or an update) in a table that is relevant to the POS-DB (you can find a list of tables under /Retail/Setup/Retail scheduler/Scheduler subjob) there is a so called Preaction generated. This preaction logs the changes to the tables.  All preactions are saved under /Retail/Periodic/Retail scheduler/Preactions.

These preactions must be then converted into Actions (found at /Retail/Periodic/Retail scheduler/Actions).This can be achieved via a Job found at /Retail/Periodic/Retail scheduler/Create actions. These actions will then be processed by the A-Jobs.

These jobs can run directly or as a batchjob.

Here is a simplified standard walkthrough of the process:

  • A change is made to an existing address.
  • A preaction is automatically generated.
  • At the end of the day there is a batch job that converts the preactions into actions. These preactions are then marked as processed.
  • After that the A-1010 batch job starts and creates a XML file for each table with all the changes.
  • These XML files are created by the Retail Store Connect (RSC) Service. The RSC also packs the files together and sends them to the POS-DB.
  • On the POS-DB the RSC unpacks the file in the respective XML files and writes the changes in the db.

Of course, these jobs can be planned and run multiple times a  day, depending on the needs of the customer.

Hope you enjoyed my post and in case you have a question don’t hesitate to leave a comment!

Posted in retail and tagged , .

Leave a Reply

Your email address will not be published. Required fields are marked *