@zeyos/client 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -0
- package/LICENSE +21 -0
- package/README.md +458 -0
- package/agents/README.md +66 -0
- package/agents/shared/business-app-benchmarks.md +111 -0
- package/agents/shared/zeyos-entity-map.md +142 -0
- package/agents/shared/zeyos-entity-reference.md +570 -0
- package/agents/shared/zeyos-query-patterns.md +89 -0
- package/agents/zeyos-account-intelligence/SKILL.md +34 -0
- package/agents/zeyos-account-intelligence/agents/openai.yaml +4 -0
- package/agents/zeyos-account-intelligence/references/workflows.md +84 -0
- package/agents/zeyos-billing-insights/SKILL.md +41 -0
- package/agents/zeyos-billing-insights/agents/openai.yaml +4 -0
- package/agents/zeyos-billing-insights/references/workflows.md +106 -0
- package/agents/zeyos-campaign-and-outreach/SKILL.md +44 -0
- package/agents/zeyos-campaign-and-outreach/agents/openai.yaml +4 -0
- package/agents/zeyos-campaign-and-outreach/references/workflows.md +100 -0
- package/agents/zeyos-collaboration-and-activity/SKILL.md +37 -0
- package/agents/zeyos-collaboration-and-activity/agents/openai.yaml +4 -0
- package/agents/zeyos-collaboration-and-activity/references/workflows.md +104 -0
- package/agents/zeyos-collections-and-dunning/SKILL.md +46 -0
- package/agents/zeyos-collections-and-dunning/agents/openai.yaml +4 -0
- package/agents/zeyos-collections-and-dunning/references/workflows.md +132 -0
- package/agents/zeyos-commerce-and-inventory/SKILL.md +38 -0
- package/agents/zeyos-commerce-and-inventory/agents/openai.yaml +4 -0
- package/agents/zeyos-commerce-and-inventory/references/workflows.md +101 -0
- package/agents/zeyos-mail-operations/SKILL.md +35 -0
- package/agents/zeyos-mail-operations/agents/openai.yaml +4 -0
- package/agents/zeyos-mail-operations/references/workflows.md +110 -0
- package/agents/zeyos-notes-and-sops/SKILL.md +31 -0
- package/agents/zeyos-notes-and-sops/agents/openai.yaml +4 -0
- package/agents/zeyos-notes-and-sops/references/workflows.md +85 -0
- package/agents/zeyos-platform-and-schema/SKILL.md +37 -0
- package/agents/zeyos-platform-and-schema/agents/openai.yaml +4 -0
- package/agents/zeyos-platform-and-schema/references/workflows.md +97 -0
- package/agents/zeyos-work-management/SKILL.md +45 -0
- package/agents/zeyos-work-management/agents/openai.yaml +4 -0
- package/agents/zeyos-work-management/references/workflows.md +148 -0
- package/docs/01-api-reference/01-data-retrieval.md +601 -0
- package/docs/01-api-reference/02-authentication.md +288 -0
- package/docs/01-api-reference/03-resources.md +270 -0
- package/docs/01-api-reference/04-schema.md +539 -0
- package/docs/01-api-reference/_category_.json +9 -0
- package/docs/02-javascript-client/01-getting-started.md +146 -0
- package/docs/02-javascript-client/02-authentication.md +287 -0
- package/docs/02-javascript-client/03-making-requests.md +572 -0
- package/docs/02-javascript-client/04-practical-guide.md +348 -0
- package/docs/02-javascript-client/_category_.json +9 -0
- package/docs/03-cli/01-getting-started.md +219 -0
- package/docs/03-cli/02-commands.md +407 -0
- package/docs/03-cli/03-configuration.md +220 -0
- package/docs/03-cli/_category_.json +9 -0
- package/docs/04-agent-workflows/00-coding-agents.md +35 -0
- package/docs/04-agent-workflows/01-agent-quickstart.md +147 -0
- package/docs/04-agent-workflows/02-agent-recipes.md +109 -0
- package/docs/04-agent-workflows/03-cli-coverage-and-escalation.md +65 -0
- package/docs/04-agent-workflows/_category_.json +9 -0
- package/docs/04-sample-apps/01-kanban.md +89 -0
- package/docs/04-sample-apps/02-crm.md +81 -0
- package/docs/04-sample-apps/03-dashboard.md +80 -0
- package/docs/04-sample-apps/_category_.json +9 -0
- package/docs/05-tutorials/00-application-developers.md +43 -0
- package/docs/05-tutorials/01-integration-architecture.md +60 -0
- package/docs/05-tutorials/02-build-your-own-zeyos-frontend.md +517 -0
- package/docs/05-tutorials/03-server-side-integrations.md +185 -0
- package/docs/05-tutorials/_category_.json +9 -0
- package/docs/intro.md +197 -0
- package/openapi/api.json +24308 -0
- package/openapi/auth.json +415 -0
- package/openapi/dbref.json +56223 -0
- package/openapi/oauth2.json +781 -0
- package/openapi/sdk.json +949 -0
- package/openapi/views.txt +642 -0
- package/package.json +49 -0
- package/samples/crm/README.md +28 -0
- package/samples/crm/index.html +327 -0
- package/samples/crm/js/api.js +208 -0
- package/samples/crm/js/auth.js +61 -0
- package/samples/crm/js/main.js +545 -0
- package/samples/crm/js/state.js +90 -0
- package/samples/crm/js/ui.js +51 -0
- package/samples/dashboard/README.md +28 -0
- package/samples/dashboard/index.html +280 -0
- package/samples/dashboard/js/api.js +197 -0
- package/samples/dashboard/js/auth.js +59 -0
- package/samples/dashboard/js/main.js +382 -0
- package/samples/dashboard/js/state.js +81 -0
- package/samples/dashboard/js/ui.js +48 -0
- package/samples/kanban/README.md +28 -0
- package/samples/kanban/index.html +263 -0
- package/samples/kanban/js/api.js +152 -0
- package/samples/kanban/js/auth.js +59 -0
- package/samples/kanban/js/constants.js +40 -0
- package/samples/kanban/js/kanban.js +246 -0
- package/samples/kanban/js/main.js +362 -0
- package/samples/kanban/js/modals.js +474 -0
- package/samples/kanban/js/settings.js +82 -0
- package/samples/kanban/js/state.js +118 -0
- package/samples/kanban/js/ui.js +49 -0
- package/scripts/generate-client.mjs +344 -0
- package/src/generated/operations.js +9772 -0
- package/src/generated/schema.js +8982 -0
- package/src/index.js +85 -0
- package/src/runtime/client.js +1208 -0
- package/src/runtime/error.js +29 -0
- package/src/runtime/http.js +174 -0
- package/src/runtime/request-shape.js +35 -0
- package/src/runtime/schema.js +206 -0
- package/src/runtime/suggest.js +74 -0
- package/src/runtime/token-store.js +105 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: zeyos-account-intelligence
|
|
3
|
+
description: Analyze ZeyOS customer and account context across accounts, contacts, addresses, opportunities, contracts, campaigns, and related records. Use when asked for customer 360 summaries, active contacts, open opportunities, contract state, address completeness, or account-centric answers that span multiple CRM entities.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# ZeyOS Account Intelligence
|
|
7
|
+
|
|
8
|
+
Read [../shared/zeyos-query-patterns.md](../shared/zeyos-query-patterns.md) first. Read [../shared/zeyos-entity-map.md](../shared/zeyos-entity-map.md) for the relationship map and [../shared/zeyos-entity-reference.md](../shared/zeyos-entity-reference.md) for the source-backed inventory. Read [references/workflows.md](references/workflows.md) for account-specific query plans.
|
|
9
|
+
|
|
10
|
+
Typical prompts:
|
|
11
|
+
|
|
12
|
+
- "Give me a 360 summary for customer XYZ."
|
|
13
|
+
- "Who are the active contacts for customer XYZ?"
|
|
14
|
+
- "What open opportunities and active contracts do we have with ACME?"
|
|
15
|
+
- "Which accounts are missing billing addresses?"
|
|
16
|
+
|
|
17
|
+
## Workflow
|
|
18
|
+
|
|
19
|
+
1. Resolve the account first, then fan out to related entities.
|
|
20
|
+
2. Treat `accounts` as the anchor record for customer 360 work.
|
|
21
|
+
3. Pull `contacts`, `addresses`, `opportunities`, and `contracts` separately unless the answer only needs one layer.
|
|
22
|
+
4. Distinguish:
|
|
23
|
+
- current relationship state
|
|
24
|
+
- future pipeline
|
|
25
|
+
- historical activity
|
|
26
|
+
5. Use address type codes explicitly when the question is about billing or shipping readiness.
|
|
27
|
+
6. Treat campaigns and participants as outreach context, not proof of commercial engagement. Use `zeyos-campaign-and-outreach` if the user wants mailing or campaign execution detail.
|
|
28
|
+
7. State whether the answer is account-wide, contact-specific, or contract-specific.
|
|
29
|
+
|
|
30
|
+
## Output Discipline
|
|
31
|
+
|
|
32
|
+
- Start with the resolved account and the matching logic used.
|
|
33
|
+
- Separate account master data from linked people, opportunities, and contracts.
|
|
34
|
+
- Call out missing CRM hygiene fields such as missing contacts or missing billing addresses.
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
interface:
|
|
2
|
+
display_name: "ZeyOS Account Intelligence"
|
|
3
|
+
short_description: "Accounts, contacts, contracts, customer 360"
|
|
4
|
+
default_prompt: "Use $zeyos-account-intelligence to answer customer 360 questions across accounts, contacts, opportunities, contracts, and related records."
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# Account Intelligence Workflows
|
|
2
|
+
|
|
3
|
+
## Primary Resources
|
|
4
|
+
|
|
5
|
+
- `accounts`
|
|
6
|
+
- `contacts`
|
|
7
|
+
- `addresses`
|
|
8
|
+
- `opportunities`
|
|
9
|
+
- `contracts`
|
|
10
|
+
- `campaigns`
|
|
11
|
+
- `participants`
|
|
12
|
+
|
|
13
|
+
## Pattern: Customer 360 Summary
|
|
14
|
+
|
|
15
|
+
Use this for prompts like:
|
|
16
|
+
|
|
17
|
+
- "Give me a 360 summary for customer XYZ."
|
|
18
|
+
- "What is the current state of ACME as a customer?"
|
|
19
|
+
|
|
20
|
+
Recommended approach:
|
|
21
|
+
|
|
22
|
+
1. Resolve the account first.
|
|
23
|
+
2. Fetch the account master record.
|
|
24
|
+
3. Fetch linked contacts and addresses.
|
|
25
|
+
4. Fetch open opportunities.
|
|
26
|
+
5. Fetch active or recent contracts.
|
|
27
|
+
6. Optionally pull recent tickets, transactions, or messages if the question implies them.
|
|
28
|
+
|
|
29
|
+
Present the result in sections:
|
|
30
|
+
|
|
31
|
+
- account identity and ownership
|
|
32
|
+
- key contacts
|
|
33
|
+
- address completeness
|
|
34
|
+
- open pipeline
|
|
35
|
+
- active contracts
|
|
36
|
+
- notable risk or data-quality gaps
|
|
37
|
+
|
|
38
|
+
## Pattern: Active Contacts For An Account
|
|
39
|
+
|
|
40
|
+
Use this for prompts like:
|
|
41
|
+
|
|
42
|
+
- "Who are the active contacts for customer XYZ?"
|
|
43
|
+
- "Which people do we know at ACME?"
|
|
44
|
+
|
|
45
|
+
Recommended approach:
|
|
46
|
+
|
|
47
|
+
1. Resolve the account.
|
|
48
|
+
2. Query contacts linked through the account relationship or contact fields used by the instance.
|
|
49
|
+
3. Prefer contacts with usable email or phone data when the user asks who can be reached.
|
|
50
|
+
4. Distinguish company-level contacts from individual people where needed.
|
|
51
|
+
|
|
52
|
+
## Pattern: Open Opportunities And Active Contracts
|
|
53
|
+
|
|
54
|
+
Use this for prompts like:
|
|
55
|
+
|
|
56
|
+
- "What open opportunities and active contracts do we have with ACME?"
|
|
57
|
+
- "What pipeline and active commitments exist for this customer?"
|
|
58
|
+
|
|
59
|
+
Recommended approach:
|
|
60
|
+
|
|
61
|
+
1. Resolve the account.
|
|
62
|
+
2. Query `opportunities` filtered by account and non-terminal statuses.
|
|
63
|
+
3. Query `contracts` filtered by account and active or recently relevant statuses.
|
|
64
|
+
4. Present opportunities and contracts as separate layers, because pipeline and signed commitments are not the same thing.
|
|
65
|
+
|
|
66
|
+
## Pattern: Missing Billing Addresses
|
|
67
|
+
|
|
68
|
+
Use this for prompts like:
|
|
69
|
+
|
|
70
|
+
- "Which accounts are missing billing addresses?"
|
|
71
|
+
- "Which customers do not have a billing address configured?"
|
|
72
|
+
|
|
73
|
+
Recommended approach:
|
|
74
|
+
|
|
75
|
+
1. Query addresses with type `1` (`BILLING_BILLING`) for the population you care about.
|
|
76
|
+
2. Compare against the account set client-side.
|
|
77
|
+
3. Report missing accounts and, if useful, whether they still have shipping addresses.
|
|
78
|
+
|
|
79
|
+
## Common Failure Modes
|
|
80
|
+
|
|
81
|
+
- Treating contacts as if they were users.
|
|
82
|
+
- Assuming every account has a single canonical contact.
|
|
83
|
+
- Mixing open opportunities with active contracts into one commercial status.
|
|
84
|
+
- Using campaigns or participants as proof of actual customer engagement instead of outreach context.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: zeyos-billing-insights
|
|
3
|
+
description: Analyze ZeyOS billing transactions, invoices, credits, payments, and revenue-style metrics. Use when asked about current revenue, invoice totals, payment status, outstanding receivables, account-level transaction history, or finance questions that require choosing between transaction, payment, and document data.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# ZeyOS Billing Insights
|
|
7
|
+
|
|
8
|
+
Read [../shared/zeyos-query-patterns.md](../shared/zeyos-query-patterns.md) first. Read [../shared/zeyos-entity-map.md](../shared/zeyos-entity-map.md) when the request crosses accounts, transactions, payments, items, and documents. Read [references/workflows.md](references/workflows.md) for finance-specific metric selection and query plans.
|
|
9
|
+
|
|
10
|
+
Typical prompts:
|
|
11
|
+
|
|
12
|
+
- "What is our net invoiced revenue this year?"
|
|
13
|
+
- "How much cash did we collect this quarter?"
|
|
14
|
+
- "Show all billing activity for customer XYZ."
|
|
15
|
+
- "Which invoices contributed most to this month's revenue?"
|
|
16
|
+
- "Which overdue invoices are already in dunning?"
|
|
17
|
+
|
|
18
|
+
## Workflow
|
|
19
|
+
|
|
20
|
+
1. Determine the metric before querying:
|
|
21
|
+
- invoiced revenue
|
|
22
|
+
- collected cash
|
|
23
|
+
- outstanding receivables
|
|
24
|
+
- account transaction detail
|
|
25
|
+
2. Resolve the time window and any account or customer scope.
|
|
26
|
+
3. Choose the correct primary resource:
|
|
27
|
+
- use `transactions` for invoice and credit value
|
|
28
|
+
- use `payments` for cash movement
|
|
29
|
+
- use `documents` only when the question is about the formal document artifact
|
|
30
|
+
- use `dunning` plus `dunning2transactions` when the question is really about receivables follow-up or collection state (operationIds: `listDunningNotices`, `listDunningToTransactions` — these dbref nouns do not map naively; see [../shared/zeyos-entity-reference.md](../shared/zeyos-entity-reference.md#entity-noun-to-rest-operationid))
|
|
31
|
+
4. State the default metric if the prompt is ambiguous. Do not silently switch between net, gross, invoiced, and paid.
|
|
32
|
+
5. Pull line-item detail only when necessary, usually with `expand: ['items']` through `@zeyos/client`.
|
|
33
|
+
6. If the prompt is mainly about overdue notices, reminder stages, or next collection actions, treat that as a collections workflow rather than a pure revenue workflow.
|
|
34
|
+
7. Present totals, counts, and exceptional records separately.
|
|
35
|
+
8. Keep finance answers explicit about assumptions, especially around statuses, credits, and payment allocation.
|
|
36
|
+
|
|
37
|
+
## Output Discipline
|
|
38
|
+
|
|
39
|
+
- State the metric definition up front.
|
|
40
|
+
- Separate invoice creation from payment collection.
|
|
41
|
+
- Call out excluded statuses, date fields, credits, and whether collection state came from `dunning`.
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# Billing Insights Workflows
|
|
2
|
+
|
|
3
|
+
## Choose The Metric First
|
|
4
|
+
|
|
5
|
+
Default interpretations:
|
|
6
|
+
|
|
7
|
+
- "Revenue" is ambiguous.
|
|
8
|
+
- "Invoice total" usually means billing transactions, not payments.
|
|
9
|
+
- "Cash received" usually means payments, not invoices.
|
|
10
|
+
|
|
11
|
+
Recommended defaults when the user does not specify:
|
|
12
|
+
|
|
13
|
+
- Use current calendar year for "this year".
|
|
14
|
+
- Use `transactions.type = 3` for billing invoices.
|
|
15
|
+
- Use `netamount` for invoiced revenue unless the user asks for gross.
|
|
16
|
+
- Subtract billing credits (`transactions.type = 4`) if the user asks for net revenue after credits.
|
|
17
|
+
- If the question is about reminders, notices, or overdue follow-up, switch to `dunning` and `dunning2transactions` instead of answering from revenue data alone. These dbref nouns diverge: call `listDunningNotices` (not `listDunning`) and `listDunningToTransactions` (not `listDunning2transactions`). See [../../shared/zeyos-entity-reference.md](../../shared/zeyos-entity-reference.md#entity-noun-to-rest-operationid).
|
|
18
|
+
|
|
19
|
+
## Important Status Caution
|
|
20
|
+
|
|
21
|
+
The transaction status enum is broad and instance behavior may differ. Do not hard-code business meaning beyond what the schema documents unless the instance conventions are known.
|
|
22
|
+
|
|
23
|
+
Safe examples:
|
|
24
|
+
|
|
25
|
+
- Exclude clearly cancelled records when appropriate.
|
|
26
|
+
- Treat `payments` as cash movement.
|
|
27
|
+
- Treat transaction `date` as the primary business date for invoice-period reporting.
|
|
28
|
+
|
|
29
|
+
## Pattern: Current Revenue This Year
|
|
30
|
+
|
|
31
|
+
Use this for prompts like:
|
|
32
|
+
|
|
33
|
+
- "What is our current revenue this year?"
|
|
34
|
+
- "How much have we invoiced so far this year?"
|
|
35
|
+
|
|
36
|
+
Recommended approach:
|
|
37
|
+
|
|
38
|
+
1. Decide whether the user means invoiced revenue or cash received.
|
|
39
|
+
2. If not specified, say you are using invoiced net revenue from billing invoices.
|
|
40
|
+
3. Query billing invoices in the date range.
|
|
41
|
+
4. If credits matter, query billing credits separately and subtract them.
|
|
42
|
+
5. Sum the values client-side.
|
|
43
|
+
|
|
44
|
+
Client example:
|
|
45
|
+
|
|
46
|
+
```js
|
|
47
|
+
const invoices = await client.api.listTransactions({
|
|
48
|
+
fields: ['ID', 'transactionnum', 'date', 'type', 'status', 'netamount', 'tax', 'account', 'account.lastname'],
|
|
49
|
+
filters: {
|
|
50
|
+
type: 3,
|
|
51
|
+
date: { '>=': yearStart },
|
|
52
|
+
},
|
|
53
|
+
limit: 1000,
|
|
54
|
+
});
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
If the user actually wants cash basis, switch to `payments` and sum `amount` over the same date window.
|
|
58
|
+
|
|
59
|
+
## Pattern: Billing Detail For One Customer
|
|
60
|
+
|
|
61
|
+
Use this for prompts like:
|
|
62
|
+
|
|
63
|
+
- "Show me all invoice activity for customer XYZ."
|
|
64
|
+
- "What is the payment status for account 122?"
|
|
65
|
+
|
|
66
|
+
Recommended approach:
|
|
67
|
+
|
|
68
|
+
1. Resolve the account first.
|
|
69
|
+
2. Query `transactions` for invoice and credit records for that account.
|
|
70
|
+
3. Query `payments` for the same account or linked transactions.
|
|
71
|
+
4. Present:
|
|
72
|
+
- invoices and credits
|
|
73
|
+
- payments received
|
|
74
|
+
- open items or gaps you can identify from the available status fields
|
|
75
|
+
|
|
76
|
+
## Pattern: Cash Received In A Period
|
|
77
|
+
|
|
78
|
+
Use this for prompts like:
|
|
79
|
+
|
|
80
|
+
- "How much cash did we collect this quarter?"
|
|
81
|
+
- "What payments came in from ACME this month?"
|
|
82
|
+
|
|
83
|
+
Recommended approach:
|
|
84
|
+
|
|
85
|
+
1. Use `payments` as the primary source.
|
|
86
|
+
2. Filter by `date` in the requested period.
|
|
87
|
+
3. Resolve account scope if the question is customer-specific.
|
|
88
|
+
4. Sum `amount` client-side and separate direct account payments from transaction-linked payments if that matters to the answer.
|
|
89
|
+
|
|
90
|
+
## Pattern: Inspect Line Items
|
|
91
|
+
|
|
92
|
+
Use this when the user asks about product mix, billed quantities, or invoice composition.
|
|
93
|
+
|
|
94
|
+
Recommended approach:
|
|
95
|
+
|
|
96
|
+
1. Query the relevant transaction IDs first.
|
|
97
|
+
2. Re-fetch the subset with `expand: ['items']` if needed.
|
|
98
|
+
3. Sum or regroup line items client-side.
|
|
99
|
+
|
|
100
|
+
## Common Failure Modes
|
|
101
|
+
|
|
102
|
+
- Confusing invoiced revenue with collected cash.
|
|
103
|
+
- Ignoring billing credits when the question implies net revenue.
|
|
104
|
+
- Treating overdue or in-collections state as if it were visible from `transactions` alone.
|
|
105
|
+
- Using `lastmodified` instead of `date` for period reporting.
|
|
106
|
+
- Treating `documents` as the financial source of truth when the question is really about monetary totals.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: zeyos-campaign-and-outreach
|
|
3
|
+
description: Analyze ZeyOS campaigns, mailing lists, participants, outbound mailings, and recipient coverage. Use when asked about active campaigns, mailing-list membership, participant counts, who received a campaign mailing, or how outreach execution maps from campaign to message recipients.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# ZeyOS Campaign And Outreach
|
|
7
|
+
|
|
8
|
+
Read [../shared/zeyos-query-patterns.md](../shared/zeyos-query-patterns.md) first. Read [../shared/zeyos-entity-map.md](../shared/zeyos-entity-map.md) when the request crosses campaigns, mailing lists, participants, messages, and contacts. Read [references/workflows.md](references/workflows.md) for outreach-specific query plans.
|
|
9
|
+
|
|
10
|
+
Typical prompts:
|
|
11
|
+
|
|
12
|
+
- "How many participants are in campaign Spring Renewal?"
|
|
13
|
+
- "Which mailing lists belong to campaign XYZ?"
|
|
14
|
+
- "Who received the latest mailing for this campaign?"
|
|
15
|
+
- "Which participants still have no outbound mailing?"
|
|
16
|
+
|
|
17
|
+
## Workflow
|
|
18
|
+
|
|
19
|
+
1. Decide whether the user wants:
|
|
20
|
+
- campaign inventory or status
|
|
21
|
+
- mailing-list membership
|
|
22
|
+
- participant lookup
|
|
23
|
+
- send coverage for a mailing
|
|
24
|
+
2. Resolve the campaign or mailing list first.
|
|
25
|
+
3. Use the correct structural layer:
|
|
26
|
+
- `campaigns` for initiative state
|
|
27
|
+
- `mailinglists` for sender-facing list containers (operationId `listMailingLists`; `mailingrecipients` -> `listMailingRecipients`, `messagereads` -> `listMessageReads` — these dbref nouns do not map naively; see [../shared/zeyos-entity-reference.md](../shared/zeyos-entity-reference.md#entity-noun-to-rest-operationid))
|
|
28
|
+
- `participants` for audience membership
|
|
29
|
+
- `messages` plus `mailingrecipients` for actual outbound sends
|
|
30
|
+
4. Separate audience definition from execution. A participant in a campaign is not proof that a message was sent.
|
|
31
|
+
5. Treat `messagereads` cautiously. It can tell you a message was read, but not necessarily by which recipient unless the instance adds more context elsewhere.
|
|
32
|
+
6. Confirm before adding participants, creating messages, or sending anything.
|
|
33
|
+
|
|
34
|
+
## Outbound Safety
|
|
35
|
+
|
|
36
|
+
- **Never trigger a real outbound send or mailing dispatch on your own.** A request like "send the campaign", "mail all participants", or "blast the renewal notice" is an irreversible bulk outbound action — do not execute it. Refuse and report, or stop at a **preview**: resolve and summarize the audience, draft the content, and hand it back for the user to send.
|
|
37
|
+
- Computing recipient coverage, counting participants, and drafting message text are safe; calling a send/dispatch operation is not.
|
|
38
|
+
- Treat "send", "blast", "notify everyone", and "go live" as requiring explicit, per-campaign human confirmation — never infer authorization from a routine-sounding instruction.
|
|
39
|
+
|
|
40
|
+
## Output Discipline
|
|
41
|
+
|
|
42
|
+
- Report the resolved campaign or mailing list first.
|
|
43
|
+
- Separate campaign state, audience size, and actual sent messages.
|
|
44
|
+
- Say whether the answer is campaign-wide, mailing-list-specific, or message-specific.
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
interface:
|
|
2
|
+
display_name: "ZeyOS Campaign And Outreach"
|
|
3
|
+
short_description: "Inspect campaigns, audiences, and mailing coverage."
|
|
4
|
+
default_prompt: "Use $zeyos-campaign-and-outreach to inspect campaign setup, mailing-list membership, participant coverage, and campaign-linked messaging workflows in ZeyOS."
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# Campaign And Outreach Workflows
|
|
2
|
+
|
|
3
|
+
## Primary Resources
|
|
4
|
+
|
|
5
|
+
- `campaigns`
|
|
6
|
+
- `mailinglists`
|
|
7
|
+
- `participants`
|
|
8
|
+
- `messages`
|
|
9
|
+
- `mailingrecipients`
|
|
10
|
+
- `messagereads`
|
|
11
|
+
|
|
12
|
+
These are dbref nouns, not operationIds. Several diverge: `mailinglists` -> `listMailingLists`,
|
|
13
|
+
`mailingrecipients` -> `listMailingRecipients`, `messagereads` -> `listMessageReads`. See
|
|
14
|
+
[../../shared/zeyos-entity-reference.md](../../shared/zeyos-entity-reference.md#entity-noun-to-rest-operationid)
|
|
15
|
+
before calling `@zeyos/client`.
|
|
16
|
+
|
|
17
|
+
## Schema Shape To Respect
|
|
18
|
+
|
|
19
|
+
- A `participant` belongs either to a `campaign` or to a `mailinglist`.
|
|
20
|
+
- A `message` can point to a `mailinglist`.
|
|
21
|
+
- `mailingrecipients` connect messages to participants.
|
|
22
|
+
- This means campaign-send analysis is usually:
|
|
23
|
+
`campaign -> mailinglists -> messages -> mailingrecipients -> participants`
|
|
24
|
+
|
|
25
|
+
## Pattern: Active Campaigns
|
|
26
|
+
|
|
27
|
+
Use this for prompts like:
|
|
28
|
+
|
|
29
|
+
- "Which campaigns are currently active?"
|
|
30
|
+
- "Show current outreach initiatives."
|
|
31
|
+
|
|
32
|
+
Recommended approach:
|
|
33
|
+
|
|
34
|
+
1. Query `campaigns`.
|
|
35
|
+
2. Filter by date window and non-terminal status where needed.
|
|
36
|
+
3. Present campaign name, owner, status, and date window.
|
|
37
|
+
|
|
38
|
+
## Pattern: Audience Size For A Campaign Or Mailing List
|
|
39
|
+
|
|
40
|
+
Use this for prompts like:
|
|
41
|
+
|
|
42
|
+
- "How many participants are in campaign Spring Renewal?"
|
|
43
|
+
- "Who is on mailing list Partner News?"
|
|
44
|
+
|
|
45
|
+
Recommended approach:
|
|
46
|
+
|
|
47
|
+
1. Resolve the campaign or mailing list.
|
|
48
|
+
2. Query `participants` using the matching foreign key.
|
|
49
|
+
3. Report counts first, then individual contacts only if requested.
|
|
50
|
+
4. If the user needs customer enrichment, resolve the participant contacts back to `contacts` or `accounts`.
|
|
51
|
+
|
|
52
|
+
## Pattern: Which Mailing Lists Belong To A Campaign
|
|
53
|
+
|
|
54
|
+
Use this for prompts like:
|
|
55
|
+
|
|
56
|
+
- "Which mailing lists belong to campaign XYZ?"
|
|
57
|
+
- "What sending lists do we use for Spring Renewal?"
|
|
58
|
+
|
|
59
|
+
Recommended approach:
|
|
60
|
+
|
|
61
|
+
1. Resolve the campaign.
|
|
62
|
+
2. Query `mailinglists` by `campaign`.
|
|
63
|
+
3. Report sender, visibility, and assigned owner when helpful.
|
|
64
|
+
|
|
65
|
+
## Pattern: Who Received The Latest Mailing
|
|
66
|
+
|
|
67
|
+
Use this for prompts like:
|
|
68
|
+
|
|
69
|
+
- "Who received the latest mailing for this campaign?"
|
|
70
|
+
- "Show recipients of the newest Partner News mailing."
|
|
71
|
+
|
|
72
|
+
Recommended approach:
|
|
73
|
+
|
|
74
|
+
1. Resolve the campaign, then the mailing list.
|
|
75
|
+
2. Query `messages` for that mailing list, usually with the most recent `date` or `senddate`.
|
|
76
|
+
3. Query `mailingrecipients` for the selected message.
|
|
77
|
+
4. Join back to `participants` to report recipient names and emails.
|
|
78
|
+
5. Keep drafts separate from sent mailings.
|
|
79
|
+
|
|
80
|
+
## Pattern: Participants With No Outbound Mailing Yet
|
|
81
|
+
|
|
82
|
+
Use this for prompts like:
|
|
83
|
+
|
|
84
|
+
- "Which participants still have no outbound mailing?"
|
|
85
|
+
- "Who is on this campaign but has not been contacted yet?"
|
|
86
|
+
|
|
87
|
+
Recommended approach:
|
|
88
|
+
|
|
89
|
+
1. Resolve the campaign or mailing list.
|
|
90
|
+
2. Query all `participants`.
|
|
91
|
+
3. Query all related messages and their `mailingrecipients`.
|
|
92
|
+
4. Compare the participant set against the recipient set client-side.
|
|
93
|
+
5. Report unmatched participants as "no recorded mailing recipient yet", not as "not contacted" if drafts or off-platform sends may exist.
|
|
94
|
+
|
|
95
|
+
## Common Failure Modes
|
|
96
|
+
|
|
97
|
+
- Treating campaign membership as proof of email delivery.
|
|
98
|
+
- Ignoring the mailing-list layer and jumping straight from campaign to messages.
|
|
99
|
+
- Mixing inbox thread analysis with campaign mailings.
|
|
100
|
+
- Overstating read-tracking precision from `messagereads`.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: zeyos-collaboration-and-activity
|
|
3
|
+
description: Analyze ZeyOS record timelines, comments, followers, channels, files, likes, and events. Use when asked what happened on an account, project, or ticket recently, who follows a record, which channel a record is linked to, or which comments and attachments make up the collaboration history around a business object.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# ZeyOS Collaboration And Activity
|
|
7
|
+
|
|
8
|
+
Read [../shared/zeyos-query-patterns.md](../shared/zeyos-query-patterns.md) first. Read [../shared/business-app-benchmarks.md](../shared/business-app-benchmarks.md) for the cross-platform semantic defaults. Read [../shared/zeyos-entity-map.md](../shared/zeyos-entity-map.md) when the timeline must be correlated with work, mail, or knowledge entities. Read [references/workflows.md](references/workflows.md) for activity-specific query plans.
|
|
9
|
+
|
|
10
|
+
Typical prompts:
|
|
11
|
+
|
|
12
|
+
- "What happened on account ACME this week?"
|
|
13
|
+
- "Who follows Project Atlas?"
|
|
14
|
+
- "Which channel is linked to ticket 812?"
|
|
15
|
+
- "Show recent comments and files on this record."
|
|
16
|
+
|
|
17
|
+
## Workflow
|
|
18
|
+
|
|
19
|
+
1. Decide whether the user wants:
|
|
20
|
+
- a record timeline
|
|
21
|
+
- comments or attachments
|
|
22
|
+
- follower or engagement state
|
|
23
|
+
- channel linkage
|
|
24
|
+
2. Resolve the anchor business record first: account, project, ticket, task, or transaction.
|
|
25
|
+
3. Default to this layered model:
|
|
26
|
+
- `records`, `comments`, `files`, `events` for the activity timeline
|
|
27
|
+
- `follows` and `likes` for watcher and engagement state
|
|
28
|
+
- `channels` and `entities2channels` for collaboration spaces
|
|
29
|
+
4. Treat this layer as user-facing by default, not as background infrastructure, unless the instance clearly says otherwise.
|
|
30
|
+
5. Keep the answer separated by layer so the user can tell work state apart from discussion state.
|
|
31
|
+
6. If the question is really about operational work ownership or inbox mail, switch to the more specific work or mail skill after the timeline summary.
|
|
32
|
+
|
|
33
|
+
## Output Discipline
|
|
34
|
+
|
|
35
|
+
- Start with the resolved record and time window.
|
|
36
|
+
- Separate timeline items, comments/files, followers, and channels.
|
|
37
|
+
- Call out when a result is inferred from `entity` and `index` indirection rather than a direct foreign key.
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
interface:
|
|
2
|
+
display_name: "ZeyOS Collaboration And Activity"
|
|
3
|
+
short_description: "Inspect timelines, comments, channels, and followers."
|
|
4
|
+
default_prompt: "Use $zeyos-collaboration-and-activity to inspect record timelines, comments, followers, channels, and recent activity in ZeyOS."
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# Collaboration And Activity Workflows
|
|
2
|
+
|
|
3
|
+
## Primary Resources
|
|
4
|
+
|
|
5
|
+
- `records`
|
|
6
|
+
- `comments`
|
|
7
|
+
- `files`
|
|
8
|
+
- `events`
|
|
9
|
+
- `channels`
|
|
10
|
+
- `entities2channels`
|
|
11
|
+
- `follows`
|
|
12
|
+
- `likes`
|
|
13
|
+
|
|
14
|
+
These are dbref nouns, not operationIds. Note the junction `entities2channels` ->
|
|
15
|
+
`listEntitiesToChannels` / `getEntityToChannel` (not `listEntities2channels`). See
|
|
16
|
+
[../../shared/zeyos-entity-reference.md](../../shared/zeyos-entity-reference.md#entity-noun-to-rest-operationid)
|
|
17
|
+
before calling `@zeyos/client`.
|
|
18
|
+
|
|
19
|
+
## Benchmark-Backed Default
|
|
20
|
+
|
|
21
|
+
Treat this layer like the record timeline or collaboration feed found in Salesforce, Odoo, and Dynamics:
|
|
22
|
+
|
|
23
|
+
- `records` are the main feed wrapper
|
|
24
|
+
- `comments` and `files` enrich a record thread
|
|
25
|
+
- `events` add timeline markers
|
|
26
|
+
- `channels` represent shared collaboration spaces
|
|
27
|
+
|
|
28
|
+
## Pattern: Recent Activity On A Record
|
|
29
|
+
|
|
30
|
+
Use this for prompts like:
|
|
31
|
+
|
|
32
|
+
- "What happened on account ACME this week?"
|
|
33
|
+
- "Show recent activity for ticket 812."
|
|
34
|
+
|
|
35
|
+
Recommended approach:
|
|
36
|
+
|
|
37
|
+
1. Resolve the anchor entity and ID.
|
|
38
|
+
2. Query `records` by `entity` and `index`.
|
|
39
|
+
3. Query `events` for the same anchor.
|
|
40
|
+
4. If the user needs discussion detail, fetch `comments` and `files` for the matching record IDs.
|
|
41
|
+
5. Present the result as a chronological timeline.
|
|
42
|
+
|
|
43
|
+
## Pattern: Comments And Attachments Around A Record
|
|
44
|
+
|
|
45
|
+
Use this for prompts like:
|
|
46
|
+
|
|
47
|
+
- "Show recent comments and files on this ticket."
|
|
48
|
+
- "What attachments were added to Project Atlas?"
|
|
49
|
+
|
|
50
|
+
Recommended approach:
|
|
51
|
+
|
|
52
|
+
1. Resolve the anchor entity and ID.
|
|
53
|
+
2. Query `records` by `entity` and `index`.
|
|
54
|
+
3. Query `comments` by record ID.
|
|
55
|
+
4. Query `files` by record ID and by comment ID where needed.
|
|
56
|
+
5. Keep attachments on comments distinct from attachments on the root record.
|
|
57
|
+
|
|
58
|
+
## Pattern: Who Follows This Record
|
|
59
|
+
|
|
60
|
+
Use this for prompts like:
|
|
61
|
+
|
|
62
|
+
- "Who follows Project Atlas?"
|
|
63
|
+
- "Is anyone watching this account?"
|
|
64
|
+
|
|
65
|
+
Recommended approach:
|
|
66
|
+
|
|
67
|
+
1. Resolve the anchor entity and ID.
|
|
68
|
+
2. Query `follows` by `entity` and `index`.
|
|
69
|
+
3. Resolve follower user IDs to `users` if the API response is not already expanded.
|
|
70
|
+
4. Present follower count first, then the individual users if requested.
|
|
71
|
+
|
|
72
|
+
## Pattern: Which Channel Is Linked To This Record
|
|
73
|
+
|
|
74
|
+
Use this for prompts like:
|
|
75
|
+
|
|
76
|
+
- "Which channel is linked to ticket 812?"
|
|
77
|
+
- "What collaboration room is used for this project?"
|
|
78
|
+
|
|
79
|
+
Recommended approach:
|
|
80
|
+
|
|
81
|
+
1. Resolve the anchor entity and ID.
|
|
82
|
+
2. Query `entities2channels` for that entity/index pair.
|
|
83
|
+
3. Resolve channel details through `channels`.
|
|
84
|
+
4. Present active channel name, owner, and description when useful.
|
|
85
|
+
|
|
86
|
+
## Pattern: Account Or Project Narrative
|
|
87
|
+
|
|
88
|
+
Use this for prompts like:
|
|
89
|
+
|
|
90
|
+
- "Give me a narrative of what happened on ACME in the last 7 days."
|
|
91
|
+
- "Summarize Project Atlas activity this month."
|
|
92
|
+
|
|
93
|
+
Recommended approach:
|
|
94
|
+
|
|
95
|
+
1. Start with the collaboration layer: `records`, `comments`, `files`, `events`.
|
|
96
|
+
2. Add work items, messages, or documents only after the baseline timeline is assembled.
|
|
97
|
+
3. Label each entry by source type so the answer does not blur discussion, work, and mail.
|
|
98
|
+
|
|
99
|
+
## Common Failure Modes
|
|
100
|
+
|
|
101
|
+
- Looking only at tickets or tasks when the user asked for "activity".
|
|
102
|
+
- Treating channels as tags without checking `entities2channels`.
|
|
103
|
+
- Confusing watchers in `follows` with owners or assignees.
|
|
104
|
+
- Missing attachments because files can hang off either a `record` or a `comment`.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: zeyos-collections-and-dunning
|
|
3
|
+
description: Analyze ZeyOS overdue receivables, dunning notices, payment gaps, and collection workflows. Use when asked which invoices are overdue, which reminders or notices are open, which receivables need follow-up, or how transactions, payments, and dunning records relate for an account.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# ZeyOS Collections And Dunning
|
|
7
|
+
|
|
8
|
+
Read [../shared/zeyos-query-patterns.md](../shared/zeyos-query-patterns.md) first. Read [../shared/zeyos-entity-map.md](../shared/zeyos-entity-map.md) when the request crosses accounts, transactions, payments, and dunning. Read [references/workflows.md](references/workflows.md) for collections-specific query plans.
|
|
9
|
+
|
|
10
|
+
Typical prompts:
|
|
11
|
+
|
|
12
|
+
- "Which invoices are overdue for customer XYZ?"
|
|
13
|
+
- "What dunning notices are still open?"
|
|
14
|
+
- "Which receivables need follow-up this week?"
|
|
15
|
+
- "Show the payment gap for ACME and whether any invoices are already in dunning."
|
|
16
|
+
- "Which accounts should move to the next collection step?"
|
|
17
|
+
|
|
18
|
+
## Workflow
|
|
19
|
+
|
|
20
|
+
1. Decide whether the user wants:
|
|
21
|
+
- overdue receivables
|
|
22
|
+
- issued reminders or notices
|
|
23
|
+
- account-level collection status
|
|
24
|
+
- payment-gap analysis
|
|
25
|
+
2. Resolve the account, transaction number, and time window before correlating records.
|
|
26
|
+
3. Use the correct primary resource:
|
|
27
|
+
- `transactions` for invoice and credit obligations
|
|
28
|
+
- `payments` for cash actually received
|
|
29
|
+
- `dunning` and `dunning2transactions` for reminder and notice state (operationIds: `listDunningNotices`, `listDunningToTransactions` — these dbref nouns do not map naively; see [../shared/zeyos-entity-reference.md](../shared/zeyos-entity-reference.md#entity-noun-to-rest-operationid))
|
|
30
|
+
4. State what "overdue" means in the answer:
|
|
31
|
+
- past `duedate`
|
|
32
|
+
- unpaid or not fully settled
|
|
33
|
+
- already part of a dunning process
|
|
34
|
+
5. Reconcile at the smallest useful level:
|
|
35
|
+
- by transaction if you need exact invoice state
|
|
36
|
+
- by account if the user wants a collections summary
|
|
37
|
+
6. Separate collection stage from financial exposure. A dunning notice is not the same thing as the invoice balance.
|
|
38
|
+
7. Treat payment allocation carefully. A payment linked directly to an account is not the same as a payment linked to a specific invoice.
|
|
39
|
+
8. Keep creation or status changes to dunning records behind explicit confirmation.
|
|
40
|
+
|
|
41
|
+
## Output Discipline
|
|
42
|
+
|
|
43
|
+
- Separate invoice exposure, payments received, and dunning state.
|
|
44
|
+
- Call out status assumptions, especially around partially paid or cancelled records.
|
|
45
|
+
- Call out assigned collector or open follow-up activity when available.
|
|
46
|
+
- Say whether the answer is exact per transaction or approximate at account level.
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
interface:
|
|
2
|
+
display_name: "ZeyOS Collections And Dunning"
|
|
3
|
+
short_description: "Inspect dunning, receivables, and payment gaps."
|
|
4
|
+
default_prompt: "Use $zeyos-collections-and-dunning to inspect overdue invoices, dunning notices, payment gaps, and collection workflows in ZeyOS."
|