diff --git a/CHANGELOG.md b/CHANGELOG.md index 25d2f68..efd0826 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this plugin are documented here. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and versions follow [Semantic Versioning](https://semver.org). +## [Unreleased] + +### Added + +- The customer's businesses: `freightright_list_business_profiles`, `freightright_create_business_profile` and + `freightright_select_business_profile`, under the new `business_profiles:write` permission (listing rides on + `bookings:write`). A prepared booking first asks who it bills; when the customer needs to add or choose a business + it refuses with `business_profile_required` or `business_choice_required` and names the tool to call next. +- The `booking-handoff` skill says how to handle those refusals. Contract, mocks and the eval tool list refreshed — + thirty-nine tools. + ## [0.2.3] - 2026-11-10 ### Added diff --git a/README.md b/README.md index 38ef8db..dd3048d 100644 --- a/README.md +++ b/README.md @@ -211,7 +211,7 @@ recorded here. Installing and using the skills is what the table reports. ## What the connector can do -Thirty-six tools. Everything is read-only except the twelve marked **write**, and only one call can ever spend part +Thirty-nine tools. Everything is read-only except the fourteen marked **write**, and only one call can ever spend part of the monthly price-check allowance. | Area | Tools | | @@ -223,6 +223,7 @@ of the monthly price-check allowance. | **Quotes** | `freightright_list_quotes` · `freightright_get_quote` · `freightright_share_quote` **(write, administrators)** · `freightright_get_quote_offers` **(administrators)** · `freightright_select_quote_offer` **(write, administrators)** · `freightright_send_quote` **(write, administrators)** · `freightright_public_link` **(write)** · `freightright_change_public_link` **(write)** | Every quote, whatever created it, and one by its number with its offer; an administrator shares one with e-mail addresses, and finishes a draft: its offers, the one chosen and sending it; a customer gives their own quotes a public link, an administrator any quote | | **Requests to Freight Right's team** | `freightright_list_requests` · `freightright_create_request_draft` **(write)** · `freightright_update_request_draft` **(write)** · `freightright_preview_request` · `freightright_submit_request` **(write)** · `freightright_get_request` · `freightright_withdraw_request` **(write)** | A spot rate, a contract, booking help, a shipment problem, a correction, a PO discrepancy or a feature, in the customer's own words — sent only after they saw the preview and said yes, answered by e-mail | | **Bookings** | `freightright_prepare_instant_booking` **(write)** · `freightright_prepare_rate_request_booking` **(write)** · `freightright_get_booking_operation` | Prepare a link, then read the decision | +| **Businesses** | `freightright_list_business_profiles` · `freightright_create_business_profile` **(write)** · `freightright_select_business_profile` **(write)** | The business a booking bills and Freight Right invoices: list them, add one (set up as a company at once) or choose the default; the customer confirms on the booking page that they may book for a business their assistant added | | **Shipments** | `freightright_find_shipments` · `freightright_list_shipments` · `freightright_get_shipment` · `freightright_list_shipment_events` | Track what is already moving — legs, milestones, containers with their contents and terminal state — and what changed, as a feed | | **A shipment's billing, customs and documents** | `freightright_get_shipment_billing` · `freightright_get_shipment_customs` · `freightright_list_invoices` · `freightright_list_shipment_documents` · `freightright_get_shipment_document` | Invoices and charge lines per currency, customs entries, the customer's invoices across shipments, documents with a download link that lives for minutes | diff --git a/contract/tools.json b/contract/tools.json index 9cf6cf0..7db1a45 100644 --- a/contract/tools.json +++ b/contract/tools.json @@ -1,7 +1,7 @@ { "source": { "repository": "freight-right/fr-mcp", - "revision": "75c0dda6b43be22449719a738e94c592a48075f9" + "revision": "b8aa27ff58bf6dc73a7dd27baad027a0927ef93a" }, "tools": [ { @@ -40,6 +40,129 @@ "rate_requests:write" ] }, + { + "name": "freightright_create_business_profile", + "description": "Add a business to the customer's account: the company their bookings bill and Freight Right invoices. Ask the customer for its legal name, main address (United States or Canada, no PO boxes) and phone; the account's name and e-mail fill the contact and the invoice e-mail unless they give another invoice e-mail. Only with `authorized: true`, after the customer said they are authorized to book shipments for this business and accept the booking terms: they confirm it themselves on the Freight Right booking page before its first booking. It is set up as a company with Freight Right at once (`status` setting_up, usually ready within seconds) and can be priced and booked meanwhile; the first business becomes the default. Adding the same business again returns it. An account has a limit of businesses.", + "inputSchema": { + "type": "object", + "additionalProperties": false, + "properties": { + "legal_name": { + "description": "The legal name, as bookings and invoices show it. For a person shipping in their own name, their full legal name with entity_type 'individual'.", + "maxLength": 100, + "minLength": 2, + "type": "string" + }, + "address_line1": { + "description": "Street address (no PO boxes).", + "maxLength": 50, + "minLength": 1, + "type": "string" + }, + "city": { + "maxLength": 50, + "minLength": 1, + "type": "string" + }, + "state": { + "description": "2-letter state or province code, like CA or ON.", + "pattern": "^[A-Za-z]{2}$", + "type": "string" + }, + "postal_code": { + "description": "ZIP or postal code.", + "maxLength": 10, + "minLength": 3, + "type": "string" + }, + "country": { + "description": "United States or Canada.", + "enum": [ + "US", + "CA" + ], + "type": "string" + }, + "phone": { + "description": "Main phone number.", + "maxLength": 25, + "minLength": 7, + "type": "string" + }, + "authorized": { + "const": true, + "description": "True only after the customer said they are authorized to book shipments for this business and accept the booking terms.", + "type": "boolean" + }, + "address_line2": { + "anyOf": [ + { + "maxLength": 50, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Suite or unit." + }, + "entity_type": { + "default": "business", + "description": "individual: a person shipping in their own name.", + "enum": [ + "business", + "individual" + ], + "type": "string" + }, + "invoice_email": { + "anyOf": [ + { + "maxLength": 254, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Where invoices go; the account's e-mail when not given." + }, + "website": { + "anyOf": [ + { + "maxLength": 255, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [ + "legal_name", + "address_line1", + "city", + "state", + "postal_code", + "country", + "phone", + "authorized" + ] + }, + "annotations": { + "readOnlyHint": false, + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": false + }, + "scopes": [ + "business_profiles:write" + ] + }, { "name": "freightright_create_request_draft", "description": "Start a request to Freight Right's team — a spot rate, a contract inquiry, booking help, a shipment issue, a data correction, a PO discrepancy (what a container held against the purchase order: the shipment reference, which Freight Right verifies against the shipment before acting, the container, the PO number, the SKU, expected and found quantities) or a feature request — from the customer's own words (`message`, stored exactly as said) and the details you read from them (the slot arguments; give what the customer said, never a guess). Nothing is sent and nobody is notified: the draft is private until freightright_submit_request. The answer says what Freight Right understood, what is still missing and the ONE question to ask next; fill the answer in with freightright_update_request_draft, then show freightright_preview_request. BEFORE creating one, call freightright_list_requests: never file a duplicate of a request that is still open — continue the open one instead. The reply address is the account's own e-mail and the account is already known, so never ask for it; ask which organization only when the answer lists `organization` in `missing_fields`, and pass `billing_organization_id` from freightright_list_billing_organizations. The same message with the same details within 30 days returns that same request, whatever became of it (the answer says so in `replayed`). Needs a Freight Right account — free: sign up on Shipment Manager's sign-up page, then connect your assistant. A Freight Right administrator files requests for a customer on the staff page, not here. At most 20 drafts per organization per day; the answer says when the limit resets.", @@ -2063,6 +2186,24 @@ }, "scopes": [] }, + { + "name": "freightright_list_business_profiles", + "description": "List the customer's businesses: the companies a booking can bill and Freight Right invoices, the default one marked. Prices and quote requests that name no billing use the default; a booking needs one while Freight Right asks for it (the prepare tools say so). With several and no default, ask the customer which one and choose it with freightright_select_business_profile; with none, add one with freightright_create_business_profile. A Freight Right administrator has none. Read-only.", + "inputSchema": { + "type": "object", + "additionalProperties": false, + "properties": {} + }, + "annotations": { + "readOnlyHint": true, + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": false + }, + "scopes": [ + "bookings:write" + ] + }, { "name": "freightright_list_invoices", "description": "The customer's invoices across shipments, as the Billing page of Shipment Manager shows them: each accounting invoice with its shipment reference, dates, total, outstanding amount, paid or cancelled state and a PDF link valid for minutes; the first page also says how many are open and what is outstanding per currency. `open=true` keeps the unpaid ones (an outstanding amount, not cancelled), `open=false` the settled ones, omitted both. Never add amounts across currencies. Newest first, cursor-paged: follow `next_cursor` with the same `open`. A customer sees the invoices billed to its organizations; a Freight Right administrator every one. Read-only.", @@ -3672,6 +3813,46 @@ "rate_requests:write" ] }, + { + "name": "freightright_select_business_profile", + "description": "Choose the business a booking bills. Without `rate_request_id` it becomes the customer's default, which new prices and quote requests use (an instant price already made keeps its billing: price again after choosing). With `rate_request_id` it bills that quote request, if it is not booked yet; Freight Right refuses one priced for another customer group (ask for a new quote). Use the id from freightright_list_business_profiles, as the customer chose it.", + "inputSchema": { + "type": "object", + "additionalProperties": false, + "properties": { + "business_profile_id": { + "description": "From freightright_list_business_profiles.", + "minimum": 1, + "type": "integer" + }, + "rate_request_id": { + "anyOf": [ + { + "pattern": "^rfq_[0-9a-f]{32}$", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The quote request to bill to it, not yet booked." + } + }, + "required": [ + "business_profile_id" + ] + }, + "annotations": { + "readOnlyHint": false, + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": false + }, + "scopes": [ + "business_profiles:write" + ] + }, { "name": "freightright_select_quote_offer", "description": "Make one of a draft quote's offers its offer — a Freight Right administrator's connection only. Give the `offer_id` and `revision` exactly as freightright_get_quote_offers listed them, and only the offer the user chose: tell them its carrier and total first. WHETHER YOUR USER IS ASKED TO CONFIRM BEFORE THIS IS SENT DEPENDS ON THEIR ASSISTANT SETTINGS, NOT ON FREIGHT RIGHT. A quote keeps the first offer selected; changing it is done on the quote page in Shipment Manager. If the offer changed or is no longer listed, list the offers again. The quote stays a draft until it is sent.", diff --git a/plugins/freightright/evals/README.md b/plugins/freightright/evals/README.md index bf6bc32..6bb161a 100644 --- a/plugins/freightright/evals/README.md +++ b/plugins/freightright/evals/README.md @@ -65,7 +65,7 @@ that number separately, and never present the package Δ as though it were this ## Layout - `mocks/freightright/.md` — one file per tool, shared by every case. **A tool with no mock file is not - available to Claude at all**, which is why all thirty-six are here. + available to Claude at all**, which is why all thirty-nine are here. - `mocks/freightright/_tools.json` — a saved `tools/list` response, so mocked tools carry their real descriptions and input schemas rather than a permissive placeholder. Regenerate it from `contract/tools.json`. - `/mocks/` — overrides for one case, such as a price check that comes back still running. diff --git a/plugins/freightright/evals/mocks/freightright/_tools.json b/plugins/freightright/evals/mocks/freightright/_tools.json index b9fd569..07f83ca 100644 --- a/plugins/freightright/evals/mocks/freightright/_tools.json +++ b/plugins/freightright/evals/mocks/freightright/_tools.json @@ -27,6 +27,120 @@ ] } }, + { + "name": "freightright_create_business_profile", + "description": "Add a business to the customer's account: the company their bookings bill and Freight Right invoices. Ask the customer for its legal name, main address (United States or Canada, no PO boxes) and phone; the account's name and e-mail fill the contact and the invoice e-mail unless they give another invoice e-mail. Only with `authorized: true`, after the customer said they are authorized to book shipments for this business and accept the booking terms: they confirm it themselves on the Freight Right booking page before its first booking. It is set up as a company with Freight Right at once (`status` setting_up, usually ready within seconds) and can be priced and booked meanwhile; the first business becomes the default. Adding the same business again returns it. An account has a limit of businesses.", + "inputSchema": { + "type": "object", + "additionalProperties": false, + "properties": { + "legal_name": { + "description": "The legal name, as bookings and invoices show it. For a person shipping in their own name, their full legal name with entity_type 'individual'.", + "maxLength": 100, + "minLength": 2, + "type": "string" + }, + "address_line1": { + "description": "Street address (no PO boxes).", + "maxLength": 50, + "minLength": 1, + "type": "string" + }, + "city": { + "maxLength": 50, + "minLength": 1, + "type": "string" + }, + "state": { + "description": "2-letter state or province code, like CA or ON.", + "pattern": "^[A-Za-z]{2}$", + "type": "string" + }, + "postal_code": { + "description": "ZIP or postal code.", + "maxLength": 10, + "minLength": 3, + "type": "string" + }, + "country": { + "description": "United States or Canada.", + "enum": [ + "US", + "CA" + ], + "type": "string" + }, + "phone": { + "description": "Main phone number.", + "maxLength": 25, + "minLength": 7, + "type": "string" + }, + "authorized": { + "const": true, + "description": "True only after the customer said they are authorized to book shipments for this business and accept the booking terms.", + "type": "boolean" + }, + "address_line2": { + "anyOf": [ + { + "maxLength": 50, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Suite or unit." + }, + "entity_type": { + "default": "business", + "description": "individual: a person shipping in their own name.", + "enum": [ + "business", + "individual" + ], + "type": "string" + }, + "invoice_email": { + "anyOf": [ + { + "maxLength": 254, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Where invoices go; the account's e-mail when not given." + }, + "website": { + "anyOf": [ + { + "maxLength": 255, + "type": "string" + }, + { + "type": "null" + } + ], + "default": null + } + }, + "required": [ + "legal_name", + "address_line1", + "city", + "state", + "postal_code", + "country", + "phone", + "authorized" + ] + } + }, { "name": "freightright_create_request_draft", "description": "Start a request to Freight Right's team — a spot rate, a contract inquiry, booking help, a shipment issue, a data correction, a PO discrepancy (what a container held against the purchase order: the shipment reference, which Freight Right verifies against the shipment before acting, the container, the PO number, the SKU, expected and found quantities) or a feature request — from the customer's own words (`message`, stored exactly as said) and the details you read from them (the slot arguments; give what the customer said, never a guess). Nothing is sent and nobody is notified: the draft is private until freightright_submit_request. The answer says what Freight Right understood, what is still missing and the ONE question to ask next; fill the answer in with freightright_update_request_draft, then show freightright_preview_request. BEFORE creating one, call freightright_list_requests: never file a duplicate of a request that is still open — continue the open one instead. The reply address is the account's own e-mail and the account is already known, so never ask for it; ask which organization only when the answer lists `organization` in `missing_fields`, and pass `billing_organization_id` from freightright_list_billing_organizations. The same message with the same details within 30 days returns that same request, whatever became of it (the answer says so in `replayed`). Needs a Freight Right account — free: sign up on Shipment Manager's sign-up page, then connect your assistant. A Freight Right administrator files requests for a customer on the staff page, not here. At most 20 drafts per organization per day; the answer says when the limit resets.", @@ -1904,6 +2018,15 @@ } } }, + { + "name": "freightright_list_business_profiles", + "description": "List the customer's businesses: the companies a booking can bill and Freight Right invoices, the default one marked. Prices and quote requests that name no billing use the default; a booking needs one while Freight Right asks for it (the prepare tools say so). With several and no default, ask the customer which one and choose it with freightright_select_business_profile; with none, add one with freightright_create_business_profile. A Freight Right administrator has none. Read-only.", + "inputSchema": { + "type": "object", + "additionalProperties": false, + "properties": {} + } + }, { "name": "freightright_list_invoices", "description": "The customer's invoices across shipments, as the Billing page of Shipment Manager shows them: each accounting invoice with its shipment reference, dates, total, outstanding amount, paid or cancelled state and a PDF link valid for minutes; the first page also says how many are open and what is outstanding per currency. `open=true` keeps the unpaid ones (an outstanding amount, not cancelled), `open=false` the settled ones, omitted both. Never add amounts across currencies. Newest first, cursor-paged: follow `next_cursor` with the same `open`. A customer sees the invoices billed to its organizations; a Freight Right administrator every one. Read-only.", @@ -3416,6 +3539,37 @@ ] } }, + { + "name": "freightright_select_business_profile", + "description": "Choose the business a booking bills. Without `rate_request_id` it becomes the customer's default, which new prices and quote requests use (an instant price already made keeps its billing: price again after choosing). With `rate_request_id` it bills that quote request, if it is not booked yet; Freight Right refuses one priced for another customer group (ask for a new quote). Use the id from freightright_list_business_profiles, as the customer chose it.", + "inputSchema": { + "type": "object", + "additionalProperties": false, + "properties": { + "business_profile_id": { + "description": "From freightright_list_business_profiles.", + "minimum": 1, + "type": "integer" + }, + "rate_request_id": { + "anyOf": [ + { + "pattern": "^rfq_[0-9a-f]{32}$", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The quote request to bill to it, not yet booked." + } + }, + "required": [ + "business_profile_id" + ] + } + }, { "name": "freightright_select_quote_offer", "description": "Make one of a draft quote's offers its offer — a Freight Right administrator's connection only. Give the `offer_id` and `revision` exactly as freightright_get_quote_offers listed them, and only the offer the user chose: tell them its carrier and total first. WHETHER YOUR USER IS ASKED TO CONFIRM BEFORE THIS IS SENT DEPENDS ON THEIR ASSISTANT SETTINGS, NOT ON FREIGHT RIGHT. A quote keeps the first offer selected; changing it is done on the quote page in Shipment Manager. If the offer changed or is no longer listed, list the offers again. The quote stays a draft until it is sent.", diff --git a/plugins/freightright/evals/mocks/freightright/freightright_create_business_profile.md b/plugins/freightright/evals/mocks/freightright/freightright_create_business_profile.md new file mode 100644 index 0000000..4d4d1fd --- /dev/null +++ b/plugins/freightright/evals/mocks/freightright/freightright_create_business_profile.md @@ -0,0 +1,14 @@ +{ + "id": 42, + "name": "Bright Co Ltd", + "status": "setting_up", + "role": "admin", + "is_default": false, + "account_code": null, + "invoice_email": "ap@brightco.com", + "city": "Ontario", + "state": "CA", + "country": "US", + "needs_confirmation": true, + "how": "Bright Co Ltd was added and is being set up as a company with Freight Right (usually seconds). It can be priced and booked meanwhile. To book as it, select it with freightright_select_business_profile. Before its first booking the customer confirms, on the Freight Right page where they confirm the booking, that they are authorized to book for it." +} diff --git a/plugins/freightright/evals/mocks/freightright/freightright_list_business_profiles.md b/plugins/freightright/evals/mocks/freightright/freightright_list_business_profiles.md new file mode 100644 index 0000000..7830d31 --- /dev/null +++ b/plugins/freightright/evals/mocks/freightright/freightright_list_business_profiles.md @@ -0,0 +1,23 @@ +{ + "business_profiles": [ + { + "id": 41, + "name": "Acme Imports LLC", + "status": "active", + "role": "member", + "is_default": true, + "account_code": "ACMEIMPLAX", + "invoice_email": "ap@acmeimports.com", + "city": "Los Angeles", + "state": "CA", + "country": "US", + "needs_confirmation": false + } + ], + "default_id": 41, + "needs_default_choice": false, + "count": 1, + "limit": 10, + "can_create": true, + "how": "A booking bills one of these businesses. Prices and quote requests made without naming billing use the default one; choose another with freightright_select_business_profile (as the default, or for one quote request not yet booked), or add one with freightright_create_business_profile." +} diff --git a/plugins/freightright/evals/mocks/freightright/freightright_select_business_profile.md b/plugins/freightright/evals/mocks/freightright/freightright_select_business_profile.md new file mode 100644 index 0000000..7830d31 --- /dev/null +++ b/plugins/freightright/evals/mocks/freightright/freightright_select_business_profile.md @@ -0,0 +1,23 @@ +{ + "business_profiles": [ + { + "id": 41, + "name": "Acme Imports LLC", + "status": "active", + "role": "member", + "is_default": true, + "account_code": "ACMEIMPLAX", + "invoice_email": "ap@acmeimports.com", + "city": "Los Angeles", + "state": "CA", + "country": "US", + "needs_confirmation": false + } + ], + "default_id": 41, + "needs_default_choice": false, + "count": 1, + "limit": 10, + "can_create": true, + "how": "A booking bills one of these businesses. Prices and quote requests made without naming billing use the default one; choose another with freightright_select_business_profile (as the default, or for one quote request not yet booked), or add one with freightright_create_business_profile." +} diff --git a/plugins/freightright/skills/booking-handoff/SKILL.md b/plugins/freightright/skills/booking-handoff/SKILL.md index 294e827..9d838d7 100644 --- a/plugins/freightright/skills/booking-handoff/SKILL.md +++ b/plugins/freightright/skills/booking-handoff/SKILL.md @@ -37,6 +37,27 @@ too long, say that the note is too long and ask the customer to shorten it — i The offer's identity and revision are what was shown to the customer. The server attaches them; you never pass a revision. If the offer has changed or expired upstream, the booking is refused rather than silently repriced. +## The business a booking bills + +Where the connection lists the customer's businesses (`freightright_list_business_profiles`), a booking bills one of +them: the company Freight Right invoices. Prices and quote requests that name no billing use the default one. + +A prepare tool that answers **`business_profile_required`** or **`business_choice_required`** prepared nothing. Its +result names the tool to call next (`next_tool`): + +- `business_profile_required`: ask the customer for the business's legal name, main address and phone, and add it + with `freightright_create_business_profile` — only after they said they are authorized to book shipments for it. +- `business_choice_required`: list them, ask which one this booking is for, and choose it with + `freightright_select_business_profile`. + +Then, for a quote request, choose the business for that request (`rate_request_id`) and prepare again; for an +instant price, price the lane again (a new price check bills the default business) and prepare from it. Never pick a +business for the customer. + +A business the assistant added is confirmed by the customer, on the booking page, before its first booking. A +prepared booking keeps the business it was prepared for: if the customer changes the default afterwards, prepare +again for a new link. + ## Three different expiry times — keep them apart | Time | What it is | diff --git a/scripts/export_contract.py b/scripts/export_contract.py index c5ad302..5656b52 100644 --- a/scripts/export_contract.py +++ b/scripts/export_contract.py @@ -42,7 +42,7 @@ async def inventory(fr_mcp: pathlib.Path): auth_base_url='https://auth.freightright.com', upstream_client_secret='documentation', # noqa: S106 - nothing authenticates with it jwt_signing_key_b64=base64.b64encode(os.urandom(32)).decode(), - features=['rates', 'rate_requests', 'bookings', 'quotes', 'requests', 'billing', 'documents'], + features=['rates', 'rate_requests', 'bookings', 'quotes', 'requests', 'billing', 'documents', 'business_profiles'], confirmation_url='https://app.freightright.com/confirm-booking', ) fr_security = FrSecurityClient(settings) diff --git a/skills/booking-handoff/SKILL.md b/skills/booking-handoff/SKILL.md index 294e827..9d838d7 100644 --- a/skills/booking-handoff/SKILL.md +++ b/skills/booking-handoff/SKILL.md @@ -37,6 +37,27 @@ too long, say that the note is too long and ask the customer to shorten it — i The offer's identity and revision are what was shown to the customer. The server attaches them; you never pass a revision. If the offer has changed or expired upstream, the booking is refused rather than silently repriced. +## The business a booking bills + +Where the connection lists the customer's businesses (`freightright_list_business_profiles`), a booking bills one of +them: the company Freight Right invoices. Prices and quote requests that name no billing use the default one. + +A prepare tool that answers **`business_profile_required`** or **`business_choice_required`** prepared nothing. Its +result names the tool to call next (`next_tool`): + +- `business_profile_required`: ask the customer for the business's legal name, main address and phone, and add it + with `freightright_create_business_profile` — only after they said they are authorized to book shipments for it. +- `business_choice_required`: list them, ask which one this booking is for, and choose it with + `freightright_select_business_profile`. + +Then, for a quote request, choose the business for that request (`rate_request_id`) and prepare again; for an +instant price, price the lane again (a new price check bills the default business) and prepare from it. Never pick a +business for the customer. + +A business the assistant added is confirmed by the customer, on the booking page, before its first booking. A +prepared booking keeps the business it was prepared for: if the customer changes the default afterwards, prepare +again for a new link. + ## Three different expiry times — keep them apart | Time | What it is |