|
Download support/tickets.md from swedishembedded/knowledge: direct link, hf CLI and curl.
- Browser
- Download file 4.6 kB
-
https://huggingface.co/swedishembedded/knowledge/resolve/main/support/tickets.md
- Command line
-
hf download hf://swedishembedded/knowledge/support/tickets.md
-
curl -L -o tickets.md https://huggingface.co/swedishembedded/knowledge/resolve/main/support/tickets.md
4.6 kB
| # SPDX-License-Identifier: CC-BY-4.0 | |
| # Copyright (c) 2026 Martin Schröder <info@swedishembedded.com> | |
| title: Working a ticket through a command-line case system | |
| tiers: rule 1, procedure 2, example 3, mistakes 2 | |
| # Working a ticket through a command-line case system | |
| For tasks where you work one ticket under a written policy, and the result is the state you | |
| leave in the case system. | |
| <!-- tier: 1 --> | |
| ## Rule | |
| **The task's own files and stated rules always win over this page; use this page only for what | |
| the task leaves open.** | |
| 1. **The policy decides; the tool does not.** The tool carries out whatever you type, allowed or | |
| not. Checking the policy is your job. | |
| 2. **Policy rules are tried in their written order, and the first rule that applies decides.** | |
| Later rules are not applied once an earlier one has decided. | |
| 3. **A ticket ends in exactly one outcome:** resolved (with a stated resolution), escalated to | |
| one queue, or waiting for the customer after you asked for a named missing field. Never two. | |
| 4. **Look first, act last.** Gather every fact with read-only commands, decide the whole outcome, | |
| and only then change anything. | |
| 5. **Every change goes through the tool, once.** Changes cannot be taken back; there may be no | |
| delete. A repeated command makes a duplicate. | |
| 6. **Touch only this ticket and its own customer.** Other customers' data appears in listings as | |
| a trap. | |
| 7. **"Today" is the date the system reports**, not the ticket's date and not the machine clock. | |
| 8. **Money units differ between commands.** Records may show whole cents while a command takes | |
| currency with decimals. Check before entering an amount. | |
| <!-- tier: 2 --> | |
| ## Procedure | |
| 1. Read the policy file completely. Run the tool's `--help`. | |
| 2. Show the ticket. Note its kind, customer, order, attachments, text. | |
| 3. Show the policy values the system reports, including its as-of date. | |
| 4. Show the customer and the order or request the ticket names. Read the full output; do not | |
| cut it with line filters. | |
| 5. Walk the policy rules from the first: for each, state the facts it needs and whether it | |
| applies. Stop at the first that applies. Compute day counts with a script | |
| (`/knowledge/calculation/dates.md`). | |
| 6. Write down the changes that outcome needs, in order. Typically one to three commands. | |
| 7. Run `--help` for each sub-command you will use, before using it. Do not guess names. | |
| 8. Run each change as its own call. Read the reply: an error means nothing changed, so fix the | |
| command; success means never run it again. | |
| 9. Keep message texts plain: letters, digits, spaces, commas, full stops. No quotation marks, | |
| apostrophes or special letters inside the message. When asking for something, say the field's | |
| name in the message. | |
| 10. Show the ticket once more. Compare with step 6: nothing missing, nothing extra, nothing | |
| twice. End. | |
| <!-- tier: 3 --> | |
| ## Worked example | |
| Illustration only, with invented data. Your task's data differs: take no fact, count or | |
| expected result from this example. | |
| Invented system `desk` and invented policy: "(1) A customer on the blocked list gets no service: | |
| escalate to the `review` queue. (2) A warranty claim without a serial number: ask the customer | |
| for `serial_number`. (3) A warranty claim within 24 months of purchase: approve a repair." | |
| Ticket K7: a warranty claim, customer U3, product bought 30 months before the system date, no | |
| serial number given. U3 is on the blocked list. | |
| Walk the rules: rule 1 applies (blocked). Stop. Rules 2 and 3 are not reached, although the | |
| serial number is indeed missing and the warranty has indeed expired. | |
| Changes needed: one. | |
| 1. `desk ticket escalate --help` (read the options) | |
| 2. `desk ticket escalate K7 --queue review --message "Customer is on the blocked list, sent for review"` | |
| 3. `desk ticket show K7`: status escalated, queue review, nothing else changed. | |
| Had U3 not been blocked, rule 2 would decide: ask for the serial number, saying "serial number" | |
| in the message, and do nothing else. | |
| <!-- tier: 2 --> | |
| ## Common mistakes | |
| - Applying a later rule although an earlier one already applied, or the reverse: stopping at an | |
| early rule whose condition was not really met. | |
| - Giving two outcomes: refunding and then escalating; asking and also resolving. | |
| - Chaining several changing commands in one line; one fails on quoting, the rest still run. | |
| - Running a changing command twice and leaving two identical flags or refunds. | |
| - Trying to "undo" a wrong change with another change (a zero amount, a second resolution). | |
| - Acting on another customer's order that appeared in a listing. | |