From d199e9f192720aaf718db30bfc3abc68af1b4ce1 Mon Sep 17 00:00:00 2001 From: Daksh Aneja Date: Wed, 11 Nov 2026 17:19:57 +0530 Subject: [PATCH] Add help case agent skill: file a case, add a comment with a working link Covers helpCase/v4 case creation, the timeline read and the comment write, including the rich text content shape for a clickable link. Every operation was run on a development tenant and checked on the case page. --- README.md | 1 + examples/help-case-agent-skill/README.md | 25 ++++++++ examples/help-case-agent-skill/SKILL.md | 64 +++++++++++++++++++++ examples/help-case-agent-skill/example.json | 15 +++++ 4 files changed, 105 insertions(+) create mode 100644 examples/help-case-agent-skill/README.md create mode 100644 examples/help-case-agent-skill/SKILL.md create mode 100644 examples/help-case-agent-skill/example.json diff --git a/README.md b/README.md index 8ed0188..2a2055e 100644 --- a/README.md +++ b/README.md @@ -119,6 +119,7 @@ Community examples, open to everyone. This is the section external contributions | [`business-process-undo-agent-skill`](examples/business-process-undo-agent-skill) | A markdown skill that teaches an agent to read a Workday business process event and prepare a rescind or cancel for approval. | Agent Skill | | [`expense-policy-agent-skill`](examples/expense-policy-agent-skill) | A markdown skill that teaches an agent to answer expense policy questions and escalate anything it cannot verify. | Agent Skill | | [`employee-data-orchestration`](examples/employee-data-orchestration) | An orchestration that reads worker data from one tenant and creates matching records through the Workday REST API. | Orchestration | +| [`help-case-agent-skill`](examples/help-case-agent-skill) | A markdown skill for an agent that routes an HR question to the right help case type in Workday, prepares the case for approval, and prepares a comment on an existing case, with a clickable link when one is needed. | Agent Skill | | [`inbox-decisions-agent-skill`](examples/inbox-decisions-agent-skill) | A markdown skill that teaches an agent to read a person's Workday inbox, explain what each step does and prepare an approve, deny or send back decision for approval. | Agent Skill | | [`peer-kudos-home-card`](examples/peer-kudos-home-card) | An Extend app with a Home page card, custom business object, and orchestration that lets employees celebrate peer contributions and notifies managers. | Extend App | | [`promotion-nomination`](examples/promotion-nomination) | A manager nominates a direct report for promotion. Career data is prefilled from Workday, the nomination is saved to a business object, and a business process routes it for approval. | Extend App | diff --git a/examples/help-case-agent-skill/README.md b/examples/help-case-agent-skill/README.md new file mode 100644 index 0000000..453d6c6 --- /dev/null +++ b/examples/help-case-agent-skill/README.md @@ -0,0 +1,25 @@ +# Help case skill + +## What it is + +A markdown skill for an agent that routes an HR question to the right help case type in Workday, prepares the case for approval, and prepares a comment on an existing case, with a clickable link when one is needed. It comes from Cadre, the author's agent layer for Workday, where the same rules are enforced in code. + +## What's inside + +- `SKILL.md` is the skill: the Workday help case operations, the two comment body shapes (plain text and rich text with a link), the rules on sensitive data, and the output format. +- `example.json` is the metadata file used by the Workday Developer Program gallery. + +## How to use it + +1. Read `SKILL.md`. +2. Give your agent read tools for the operations it lists, and prepare-only tools for filing a case and adding a comment. +3. Put an approval step between the proposal and the Workday call. +4. Add the skill to your agent and ask the test questions at the bottom of `SKILL.md`. + +## Before you deploy + +- **Approval gate**: build the approval step before connecting write access. A case and a comment are both read by an HR team and by the worker. +- **Access**: the account the agent uses needs the Help Case Management domains for the cases it reads and writes. An integration system user gets them through an integration system security group, not directly. +- **Who the case is for**: Workday records a case filed through the API for the worker the account belongs to, with the source "Integration". Name the real person in the case text, or run the skill inside an Extend app where Workday knows who is signed in. +- **Tool names**: map the operations in `SKILL.md` to your platform's tools. +- **Tested how**: on 11 November 2026 the author ran every operation in `SKILL.md` on a Workday development tenant with helpCase/v4 and looked at the result on the case page: read the service categories, filed a case (201), read it back, read a timeline, and added comments. A plain `textBody` that contained an address and an `` tag was shown as literal text, not a link. A `content` document with a `link` mark was drawn as a link that opens in a new tab, and it matches what the case page's own editor writes when an address is typed. When the link text and `href` differed, the page followed the text. Sending `textBody` and `content` together was refused with "You cannot add both rich text and plain text in the same comment." Other tenants and versions may differ, so look at one comment in yours first. diff --git a/examples/help-case-agent-skill/SKILL.md b/examples/help-case-agent-skill/SKILL.md new file mode 100644 index 0000000..b5e80f1 --- /dev/null +++ b/examples/help-case-agent-skill/SKILL.md @@ -0,0 +1,64 @@ +--- +name: help-case +description: Routes an HR question to the right help case type in Workday, prepares the case for approval, and prepares a comment on an existing case, with a clickable link when one is needed. Use when someone has a payslip, manager-of-record, benefits or similar HR question that needs a person, or wants to add a comment to a case. Do not use to answer policy from memory or to decide a case. +--- + +# Help case + +Find the right case type, write the case or the comment, and let the person approve it. + +## Decision + +| Request | Workday operation | Notes | +| --- | --- | --- | +| Pick the case type | REST helpCase/v4 `GET /serviceCategories` | Categories, each with its case types | +| File the case | REST helpCase/v4 `POST /cases` | `caseType.id`, `title`, `detailedMessage`. Sent only after approval | +| Confirm it was filed | REST helpCase/v4 `GET /cases/{ID}` | Compare the title read back, give the person `caseID` and `caseLink` | +| Read what happened on a case | REST helpCase/v4 `GET /cases/{ID}/timeline` | Creation, status changes, comments and notes | +| Add a comment | REST helpCase/v4 `POST /cases/{ID}/comment` | Body is `comment.textBody` or `comment.content`, never both | + +## Comment bodies + +A comment is plain text or rich text. Workday refuses a request that carries both. + +Plain text. Workday stores it as written, so an address or an HTML tag in it is shown as text and is not clickable: + +```json +{ "comment": { "textBody": "Your enrolment window is open until Friday." } } +``` + +Rich text. `content` is a string that holds a JSON document: paragraphs of text nodes, where a link is a `link` mark on the text node. Workday derives `textBody` from it: + +```json +{ + "comment": { + "content": "{\"type\":\"doc\",\"content\":[{\"type\":\"paragraph\",\"content\":[{\"type\":\"text\",\"text\":\"You can read the plan details here: \"},{\"type\":\"text\",\"text\":\"https://example.com/benefits\",\"marks\":[{\"type\":\"link\",\"attrs\":{\"href\":\"https://example.com/benefits\",\"title\":\"https://example.com/benefits\"}}]}]}]}" + } +} +``` + +The text of the link node must be the address itself. The case page builds the link from that text, not from `href`: a node whose text is "Benefits page" is drawn as a link that leads nowhere useful. So put the label in an ordinary text node before the link, as above. + +Build the document as an object and serialise it. Do not write the escaped string by hand. + +## Hard rules + +- Do not answer policy questions from memory. If the question needs a policy answer, offer to file a case. +- Choose the case type from the categories Workday returns. If two fit, ask. If none fits, say so. Never invent a case type ID. +- The title needs at least 5 characters and the description at least a full sentence. Keep the title to 200 characters and the description to 4,000. +- Do not put health details, government identifiers or bank details in the case text or a comment. Ask the person to keep those for the HR team. +- A case filed through an integration account is recorded by Workday with the source "Integration" and for the worker that account belongs to. The case text must name the person it is really for. Say this in the proposal. +- A link in a comment comes from the person or from a Workday read in this conversation. Never invent an address. The address is shown in full as the link text, so never try to hide it behind a label. +- A case and a comment are proposals until approved. Never say either was sent before then. A comment can move a case from New to In Progress, so say that too. +- If Workday or your approval step refuses, explain in one plain sentence and never try to get round the refusal. + +## Output format + +A proposal card. For a case: case type in plain words, title, description, and who it is for. For a comment: the case number and title, the comment text, and any link with its full address. + +## Test questions + +- "I have a question about my payslip." +- "My manager changed and Workday still shows the old one." +- "Add a comment to my benefits case with a link to the enrolment page." +- "Close all the open cases for my team." diff --git a/examples/help-case-agent-skill/example.json b/examples/help-case-agent-skill/example.json new file mode 100644 index 0000000..bc3e43a --- /dev/null +++ b/examples/help-case-agent-skill/example.json @@ -0,0 +1,15 @@ +{ + "title": "Help Case Agent Skill", + "description": "A markdown skill for an agent that routes an HR question to the right help case type in Workday, prepares the case for approval, and prepares a comment on an existing case, with a clickable link when one is needed.", + "type": "Agent Skill", + "components": [], + "products": [ + "Workday REST API", + "Workday HCM" + ], + "authors": [ + "Daksh-Aneja-Projects" + ], + "tutorial": "", + "source": "community" +}