Summary
By now you may know that Data sources are the main place where you can edit the business logic of a widget. For instance, if we are Holidays are approaching, we may find it useful to return a Christmas collection to the customer. As such, we want to test our widgets before they are seen by customers. In this doc you will learn how to test your data sources using the Data Source Manager.
Data Source Manager
This doc assumes that you have already gone through the process of building and setting up a data source but now want to test that it's working. Do so by navigating to the data source and clicking on 'Preview Ruleset.'
Here you will see the six major sections,
Data Source: Input
API Endpoint
Data Source: Output
Data Source: Rules
Data Source: Filtered out of stock products
Data Source: Filtered input products
Data Source: Input
This section is where you will pretend to be a customer and buy a product. In this section you can,
Add products to a simulated cart
Set the cart subtotal
Set Line Count
Set Item Count
Set URL keywords
Set the number of items to return (Limit)
Set the Customer ID
Toggle cache busting
Run the simulation
API Endpoint
This section has a sample API endpoint that you can use. This is not necessary to test most issue but useful if you are a developer who doesn't want to use our Data Source Manger.
Data Source: Output
Once you have run a simulation, this section will show what has been output by the data source. This is an example of what the customer should see.
Data Source: Rules
Once you have run a simulation, this section will show what data source rules have been matched.
Data Source: Filtered out of stock products
Once you have run a simulation, this section will show what products have been filtered due to being out of stock. This will only show products if you have Filter Out Of Stock active on the data source settings.
Data Source: Filtered input products
Once you have run a simulation, this section will show what products have been filtered due to being input into the data source. This will only show products if you have Filter Input Products active on the data source settings.