The Extract quote data step reads an insurance quote, whatever the insurer's layout, and gives you the same set of fields every time: the insured person, the policy, the broker, the premium and each insured item, such as a vehicle.
It reads PDFs, Excel and Word files, and images (.jpeg, .jpg, .gif, .png).
1. Setting it up
{{popup:rpas/add:action=extract-quote}}
| Field | What it does |
|---|---|
| File path (required) | Where the quote is. Inside a loop over files this is usually a variable such as {file::path}. |
| Variable (required) | The name to store the quote under. If you type quote, the premium is {quote::premium::total}. |
| Cache (required) | Keeps the result so the same quote is not read twice. Only if valid (the default) reuses a result only when it passed its checks. You can also choose Always or Never. |
| Currency | Pick one if all your quotes use the same currency. Leave blank for several. |
| Language | Pick one if all your quotes are in the same language. Leave blank for several. |
| Additional fields | Extra fields to read, each with a type (Date, Number, List, Text or Time). Type policy::excess and you get {quote::policy::excess}. |
2. What you get back
{
"insured": {
"name": "..",
"client number": "..",
"address": "..",
"email": "..",
"id number": "..",
"vat number": "..",
"phone": ".."
},
"policy": {
"number": "..",
"inception": "yyyy-mm-dd",
"endorsement": "..",
"renewal": ".."
},
"broker": {
"company": "..",
"address": "..",
"email": "..",
"registration number": "..",
"vat number": "..",
"phone": ".."
},
"premium": { "total": # },
"insured items": [{
"year": #,
"make": "..",
"model": "..",
"registration number": "..",
"vin number": "..",
"engine number": "..",
"amount": #
}],
"total insured items": #,
"currency": { "code": "..", "name": "..", "symbol": "..", "tax": # },
"file": {},
"errors": [],
"valid": boolean
}
valid is true when the quote passed its checks. When it is false, errors says why.
3. Looping over quotes and insured items
To read many quotes, loop over each file in a folder or each unread email, and use the loop's path as the File path.
To work through each insured item, loop over each record in a list. Set the list to quote::insured items and the counter variable to, say, item. Inside the loop, use {item::make} or {item::amount}. See Working with loops in RPAs.
4. Privacy
A quote holds personal details such as names and ID numbers. The bot opens the file on your machine. To read it, the step may send its text to AI; ID numbers, phone numbers and email addresses are hidden from AI by default. See AI and your data.