About the Graphical Data Mapping Retail sample

This sample demonstrates the use of graphical data mapping in a simplified retail scenario. The scenario uses a simplified sales data feed instead of the TLOG industry standard, for which a separate product sample is available.

For more information about mapping, see Using graphical data maps.

Scenario:

A retail company, similar to any typical supermarket chain, has multiple stores throughout the world. Stores complete sales transactions each day and stock deliveries keep the shelves full. This keeps the customers happy.

The company originally covered a small area and was therefore able to use a single warehouse to deliver stock to all its stores. It developed a proprietary stock management system that runs overnight and processes files containing stock adjustment records that identify the item, quantity, and store.

As the company grew it was no longer practical to use a single warehouse (depot) to provide stock to its stores, so multiple depots are now located across the geographies that it covers. To simplify stock processing, the company groups the stock adjustment data feed by depot.

In addition to stock management, the company has subsequently introduced a customer loyalty scheme in line with its competitors. The loyalty system that it developed is online all day, so it can accept its data feed at the time the sales transactions occur. This provides added benefits, including the fact that a customer's accrued points can be displayed on each till receipt.

The company has decided to use IBM Integration Bus to integrate the store sales feeds with the stock management and customer loyalty systems. An integration node is used to perform the appropriate data transformations and perform routing and consolidation on the sales data.

The following graphical data mapping capabilities are demonstrated in the transformations used in the solution:

The message flow used is:



The message passes through the message flow as follows:
  1. An XML StoreSales message enters the message flow through the Store Sales In node.
  2. The Flow Order node routes it down the stock ordering path.
  3. The "StoreSales to SoldStock" Mapping node uses a graphical data map to transform the message by removing data that is not relevant to stock ordering, and querying an external data source to identify the depot that provides stock to the store that is identified in the message.  See Setting up the database for more information.
  4. The message then enters the Collect SoldStock node, where the messages are collated into a collection for each depot.
  5. The Flow Order node then routes the message to the Loyalty System. Here another Mapping node is used with a graphical data map, which transforms the StoreSalesLoyaltySalesData message and then puts it to the loyalty sales queue by the MQOutput node.
  6. After a pre-defined number of seconds since the first message for a given depot arrived (for example, 60), the Collect SoldStock Collector node outputs a collection for that depot, containing all matching messages that have arrived during that time.
  7. The Process SoldStock Collection node then converts the collection into a StockOrderBatch message that contains a StockOrder element for each sold item in each of the SoldStock messages. A Compute node is used to do this.
  8. The "Process each StockOrder" Mapping node uses another graphical data map to generate a CSV StockOrder message for each StockOrder element in the StockOrderBatch message. This node also updates the LocalEnvironment to set the name of the file that will be created later in the message flow.
  9. The CSV messages are then written as separate lines to the file that is identified in the LocalEnvironment by the Batched Depot Stock Updates node.

The Graphical Data Mapping Loyalty Data Warehousing sample shows the use of Insert and Update transforms to provide a solution to warehouse the Loyalty data produced in this sample scenario.

Back to sample home