Demo Data Package
Demo Data Package Scenarios
14. Get the Order Line with preferred Products (basic deduplication with defined values)
note the scenario below uses data from the deselect demo data package see docid 5 cozdtg0nwmlmeufrmbz scenario a customer can have multiple order lines you want to get one order line per customer, and you want to pick the order lines for products in the following order \ product running jacket if there is an order line for this product \ product vltg bomber jacket if there is an order line for this product and no order line for running jacket \ product bose bluetooth earphones if there is an order line for this product an no order line for vltg bomber jacket note this scenario uses feature basic deduplication, which is available in deselect plus 1\ input on the selections overview screen, click on new to create a new selection drag data extension deselect demo orders to the selected data extensions section drag data extension deselect demo order lines to the selected data extensions section and drop it on top of deselect demo orders create the relation orders field id deselect demo orders with matching deselect demo order lines order lines field orderid drag data extension deselect demo products to the selected data extensions section and drop it on top of deselect demo order lines create the relation order lines field productid deselect demo orderlines with matching deselect demo products products field id if we would run the selection like this, we would get all order lines however, we're only interested in one filter line per product the one with the highest quantity we'll add prio deduplication rules in step 2 2\ output hit the create data extension button, enter a name, eg orders with preferred products, and press save select the following fields by either double clicking on them or dragging them to the section on the right contactid from deselect demo orders orderid from deselect demo orderlines name from deselect demo products click save data extension now, let's add the prio deduplication rules click on the settings icon on the upper right corner of the target data extension screen, and choose prio deduplication enable the use deduplication switch set contactid as the unique field (this is the product name) press next choose prio deduplication mode basic as the field that determines the priority, choose name under prioritization logic, choose define sort values add the following values, and press enter or click add after typing each value running jacket vltg bomber jacket bose bluetooth earphones deselect will now give priority to the records with product name running jacket , followed by vltg bomber jacket and lastly bose bluetooth earphones if there are no order lines for any of these products for a specific customer (contactid), a random order line will be chosen press confirm to save your prio deduplication settings 3\ preview when you click run preview on the preview screen, a results table will be shown with fields contactid from deselect demo orders orderid from deselect demo orderlines name from deselect demo products the results table shows only one orderline per contactid, with the preferred products if available