Car Parts
The Car Parts plugin finds spare parts for a vehicle by its VIN, checks prices and stock in the CoraHB e-shop, and manages the workshop's cart, orders and order history there.
Install parts from Settings → Plugins → Available. It requires Elowen 0.29.82 or later. Tools are granted per account, so accounts without a grant see none of them.
Instance settings
An administrator fills in two optional sections in the plugin settings.
- PartsLink24: account ID, username and password. This is the exact OEM catalog used for VIN lookups and diagrams. Leave it empty to use TecDoc only.
- TecDoc (Profiauto): username and password. TecDoc covers vehicles that PartsLink24 does not. Leave it empty to use PartsLink24 only.
Configure at least one of them for VIN lookups. Both passwords are stored on the server and never shown again. The plugin reads these values when the daemon starts, so a change takes effect after a restart.
CoraHB login for each account
Each workshop account enters its own CoraHB username and password in its plugin settings. Prices, stock, the cart, orders and order history all use this login. The same settings hold Preferred brands, a list of brands to prefer when several equivalent parts fit, the most preferred first.
If an account has no CoraHB login, every e-shop tool refuses and says so. A chat sender who is not linked to an Elowen account has no login either.
Finding parts by VIN
The assistant uses PartsVin with a 17-character VIN. The VIN cannot contain the letters I, O or Q.
- Decode. The tool identifies the vehicle and its catalog. It tries PartsLink24 first and falls back to TecDoc. Pass
sourceaspl24ortecdocto choose a catalog yourself. - Browse. PartsLink24 lists main groups, subgroups and the exact OEM parts. TecDoc lists categories and their parts.
- Search. Pass an English part name to find matching parts directly in the VIN catalog.
- Diagram.
PartsDiagramreturns the diagram image to the assistant. The assistant can show it to the user with the image sharing tool. Diagram positions are not highlighted.
Results include OE numbers, which the shop search uses to find aftermarket equivalents.
Shop search results also reach the user as product cards under the assistant's reply, but only for the article numbers the reply mentions. Each card shows the price and availability, as in the old app: in stock with the count, on the way from the supplier, or not in stock. The cards carry no photo. Parts found by a VIN lookup also get a card with their OE number and name when the reply mentions them.
Searching the shop
PartsShopSearch looks up an article or OE number (code mode, the default) or, for universal products such as oils, chemicals and tools, a name (text mode).
- A single search returns up to 30 results per page, 10 by default.
- A batch search takes several numbers at once and returns a short pick of in-stock options for each, 5 by default and at most 10.
- Filters cover brands, a maximum price excluding VAT, in-stock items only and sort order.
- For the top aftermarket result, the tool also returns its OE cross-references.
Cart
PartsCartAddadds one article, or several withitems. It takes a quantity, an optional OE number to match withtargetOE, a basket note of up to 50 characters and an optionalgroupIdfrom a shop search. When several products match, the preferred brand given in the call comes first, then the account's Preferred brands.PartsCartRemoveremoves articles by article number.PartsCartshows the basket with its subtotal excluding VAT and total including VAT.
After each cart change and each order, the chat shows a cart card. The CoraHB basket stays the source of truth, and the card only displays it.
Ordering in two steps
- The assistant calls
PartsOrderwithoutconfirm. The tool checks the basket with CoraHB and reports what would be ordered. Nothing is sent. - After the user explicitly confirms the order, the assistant calls
PartsOrderagain withconfirmset to true. Only this call sends the order.
An empty basket is refused. On success the tool returns the CoraHB order number and empties the basket. If the basket cannot be emptied, the order still stands and the result shows cartCleared: false. Check the basket in CoraHB in that case. The ordering tool is never run as a read-only step.
Order history
PartsOrders reads orders live from CoraHB and stores nothing locally.
- With no arguments it lists orders from the last 90 days. Set
daysto look further back. - With an
internalIdfrom a list it shows one order in detail. - With a
queryit searches by VIN, article number, order number or note text. A search reads at most the first 30 orders in the period, so raisedaysif an older order is missing.
Data files
Caches are plain files in the plugin data directory on the server, not in a database. Each folder holds one kind of data.
| Folder | Contents |
|---|---|
vin-decode | Vehicle decodes from PartsLink24 and TecDoc |
vin-parts | TecDoc parts for one category |
vin-groups | PartsLink24 subgroup lists and VIN search results |
vin-bom | Exact OEM part lists, with the diagram image when there is one |
diagrams | Diagram images from TecDoc |
File names are hashes of the lookup key. Each entry is a .json file, and an image is stored next to it as a .bin file. Entries never expire. To refresh one, delete its file, and the next lookup fetches it again. A damaged file is logged, deleted and fetched again. Shop prices, the cart and order history are never cached.
Losing these files costs only lookup speed, because the data comes back from the suppliers. Elowen's standard backups may not include this folder.
Limits
- One PartsLink24 login for the whole instance. PartsLink24 allows one session per login. If someone signs in with the same login elsewhere, that session ends, and the plugin logs in again on its next call. Use a login that nobody signs in with by hand.
- Sessions are per process. The daemon and each sub-agent run keep their own PartsLink24 and CoraHB sessions. Two runs that change one workshop's basket at the same moment are not serialized, so check the basket after parallel cart work.
- Scraping can break. PartsLink24, Profiauto and CoraHB are read from their web pages. A page change can break a lookup or an order until the plugin is updated. After a failed order, check CoraHB before trying again.
- Diagrams are not highlighted. The image shows the whole diagram, and the user finds the position on it.
- Prices and stock are what CoraHB returns at the time of the call.