Find the rater's code for a customer's job
find_occupationSecond-round helper, outside the three steps: turns the customer's words into the occupation code start_quote takes.
Turns what the customer said they do into the carrier's own occupation codes. Call it before sending occupation on a driver: the catalogue is written in trade names and customers answer in their own, so the code is never something to guess at. Pick the entry that matches what they described and send its code.
An empty list means ask them another way rather than settle for the nearest thing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| said | Yes | What the customer said they do, in their own words — 'chofer', 'trabajo en construcción'. | |
| locale | Yes | The language the customer is writing in. Set it from their own messages rather than leaving the default: the estimate's notice comes back in this language, and a notice the customer cannot read discloses nothing. Sigo serves these two languages only. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | Yes | What to do with this list, in the customer's language — including when it comes back empty. | |
| matches | Yes | The rater's entries that fit, best first. Pick the one that matches what the customer described and send its `code` as the driver's `occupation`. |