complex-workflows Scenario 9 — Categorize Products by Stock Status
Written by RTILA X Engineering Team
Advanced ~10 min
Prerequisites: complex-workflows/4 complex-workflows/5 complex-workflows/6
What You'll Learn
Handle complex error recovery across workflows
Real-World Use Case
Ensuring no data is lost when a step fails
LIVE DEMO
Wireless Mouse
In Stock $24.99USB-C Hub
In Stock $39.99Mechanical Keyboard
In Stock $89.994K Monitor
Out of Stock $329.99Webcam
In Stock $59.99Laptop Stand
In Stock $45.99USB-C Adapter
In Stock $19.99HDMI Cable
Out of Stock $12.99Keyboard Cover
Out of Stock $9.99Bluetooth Speaker
Out of Stock $149.99
EXPECTED OUTPUT
RTILA X PROJECT JSON
{
"name": "Categorize_Products_By_Stock",
"settings": {
"urls": [
"https://learn.rtila.com/scenarios/complex-workflows/9"
]
},
"datasets": {
"products": {
"item_selector": "css=.cw-product",
"properties": [
{
"name": "name",
"type": "text",
"selector": "css=.cw-product-name"
},
{
"name": "in_stock",
"type": "attribute",
"selector": "css=.cw-stock-status",
"attribute": "data-in-stock"
},
{
"name": "price",
"type": "text",
"selector": "css=.cw-product-price"
}
]
}
},
"commands": [
{
"command": "wait_for_selector",
"params": {
"selector": "css=.cw-product"
}
},
{
"command": "extract_data",
"params": {
"dataset": "products"
}
},
{
"command": "comment",
"params": {
"text": "Trigger chain can split results by in_stock attribute"
}
}
]
}
The stock status is captured from a data attribute. A trigger chain can separate the rows into two categories for reporting or export.
Did you complete this scenario?
Ready to run this automation?
Copy the project JSON above, open RTILA X, create a new project, and paste it.
This scenario covers 2 RTILA X commands and is referenced in 2 learning articles.
Continue Learning
Was this helpful?
Thank you for your feedback!