Using a Subset During Creation of Many to Many Rules
The Subset rule for Many to Many match types enables you to match one or more transactions in a data source with all subset of transactions in another data source. The specified tolerance limit is applied to both the data sources.
Example 1: Many to Many with Subset Rule
Consider a match type that contains two data sources, with POS as the source system and Bank as the subsystem. The table below shows a limited set of transactions that are required for the purpose of this example.
Table 9-5 Source System Transactions
Transaction Id | Store Id | Transaction Date | Amount |
---|---|---|---|
10001 | 7959 | 15-JUL-2021 | 983 |
20001 | 7959 | 14-JUL-2021 | 637 |
30001 | 7959 | 11-JUL-2021 | 288 |
40001 | 7959 | 10-JUL-2021 | 500 |
50001 | 7959 | 09-JUL-2021 | 818 |
Table 9-6 SubSystem Transactions
Transaction Id | Store Id | Transaction Date | Amount |
---|---|---|---|
19999 | 7959 | 14-JUL-2021 | -475 |
29999 | 7959 | 16-JUL-2021 | 2095 |
39999 | 7959 | 15-JUL-2021 | -725 |
Notice that, although their dates are not an exact match, the transactions with Transaction Id 10001 and 20001 in the source system add up to an amount of 1620. The transactions with Transaction Id 19999 and 29999 in the subsystem add up to the same amount, 1620.
Consider the rule condition to match exactly with Amount and Store Id, anchor the Date, and then apply the specified tolerance limit on the Date. Assume that the specified tolerance is + or - 1 day. In our example, consider the first source system transaction dated 15-JUL-2021. If you use the Many to Many rule (without subset), the source system transactions that match the rule condition are Transaction Ids 10001 and 20001, whose amount adds up to 1620. In the subsystem, all transactions match the rule condition and their amounts add up to 895. This does not result in an exact match. However, when you use the Many to Many with Subset rule, all possible subsets of the subsystem transactions are created based on the specified match rules. This results in the subset with Transaction Ids 19999 and 29999 in the subsystem matching with Transaction Ids 10001 and 20001 in the source system.