kind: InlineAgentSkill
content: |
  ---
  name: price-quote
  description: Prepare and send a price quote for a customer's order. Use when asked to quote prices for specific products and quantities for a named customer.
  ---
  <!-- bic:source=upload -->
  # Price Quote

  Prepare a price quote for the customer's order and send it to them by email.

  ## Domain terms
  - **Tier**: the customer's pricing band, derived from their employee count — `Small` (under
    2,000), `Mid` (2,000 to 5,000), `Large` (over 5,000).
  - **Tier discount**: `Small` 0%, `Mid` 5%, `Large` 10%, applied to the order subtotal.

  ## Steps
  1. Read the customer name and the requested items (product or SKU, plus quantity) from the
     request.
  2. Use `Dataverse` to read the customer's row from the `Accounts` table in the current
     environment, matching on the customer name (sample accounts carry a "(sample)" suffix). Read
     the number of employees. If no matching account exists, set the tier to `Unknown`, use list
     prices with no discount, and note in the quote that the account needs to be verified.
  3. Determine the customer's **tier** from the number of employees.
  4. For each item, take the SKU and list price from the product catalogue in the `Sales & Pricing
     Guide`. If an item is not in the catalogue, list it with a unit price of 0 and note it.
  5. Calculate, in order:
     1. Each line total = quantity × list price.
     2. Subtotal = the sum of the line totals.
     3. Discount = subtotal × the tier discount rate.
     4. Total = subtotal − discount.
  6. Read the payment terms and the delivery option for the customer's tier, and the delivery lead
     time for the customer's state, from the `Sales & Pricing Guide` and the `Product & Delivery
     Guide`.
  7. Use `Work IQ` to send the quote to the customer's email address, using the email format below.

  ## Email format
  Send the email with the subject `Your price quote from Contoso Electronics` and this body. Fill
  the bracketed values; list one line per item showing the product, quantity, unit price, and line
  total.

  ```
  Dear [customer contact or "Customer"],

  Thank you for your interest in Contoso Electronics. We're pleased to provide the quote below for
  your requested items.

  Quote for [customer name]
  -------------------------------------------------
  [product] — [quantity] × [unit price] USD = [line total] USD
  [product] — [quantity] × [unit price] USD = [line total] USD
  -------------------------------------------------
  Subtotal: [subtotal] USD
  [tier] tier discount ([discount rate]%): -[discount amount] USD
  Total: [total] USD

  Payment terms: [terms]
  Delivery: [delivery option], estimated [lead time] to [customer state].

  This quote is valid for 30 days. If you'd like to proceed or adjust any quantities, just reply to
  this email and our order management team will take care of the rest.

  Kind regards,
  Order Management Team
  Contoso Electronics
  ```

  ## Rules
  - Use only prices, discounts, payment terms, and delivery figures from the knowledge; do not
    estimate or round them.
  - Apply only the discount the customer's tier allows. If the customer asks for a larger discount,
    do not apply it and note the request in the quote for the orders team.
  - Send the quote only to the customer who requested it.
