Policies
Policies in Allpage: its screens, what you can do there and its operations.
Availability. Works when the business has it turned on and its plan includes it. Otherwise its tools answer needs (kind module) with how to turn it on: business.useTool, or a plan that includes it.
What you can do
- Accept a policy: the assistant asks you first
For apps
Tools
- policy_accept (Accept a policy): customers see it: waits for the owner’s approval unless they chose Just do it for your app
Reads
- policy_glance (See which of your policies are in place)
- policy_summary (What’s going on)
Operations
Each one's input and output, as JSON Schema. Ids are typed (typed ids).
policy.accept
Accept a policy
- Kind
- Change
- Tool
policy_accept- Scope
policy:write- Reached by
- API, MCP
customers see it: waits for the owner’s approval unless they chose Just do it for your app
Input
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"cancellation",
"no_show",
"deposit",
"waitlist",
"call_off",
"refund"
]
},
"terms": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"summary": {
"type": "string",
"minLength": 5,
"maxLength": 600
},
"name": {
"default": "",
"description": "Leave it out for the business’s own policy. A name (“Retreats”) makes a policy that applies only to the products you attach it to (`policies` on commerce.createProduct or commerce.updateProduct); each name keeps its own versions.",
"type": "string",
"maxLength": 60
}
},
"required": [
"kind",
"terms",
"summary"
],
"additionalProperties": false
}Output
{
"oneOf": [
{
"type": "object",
"required": [
"status",
"title",
"change"
],
"properties": {
"status": {
"const": "done"
},
"title": {
"type": "string"
},
"change": {
"type": "boolean"
},
"result": {},
"undo": {
"type": "object",
"properties": {
"command": {
"type": "string"
},
"input": {}
}
}
}
},
{
"type": "object",
"required": [
"status",
"proposalId"
],
"properties": {
"status": {
"const": "proposed"
},
"proposalId": {
"type": "string"
},
"preview": {},
"approveAt": {
"type": "string",
"format": "uri"
}
}
},
{
"type": "object",
"required": [
"status",
"check"
],
"properties": {
"status": {
"const": "pending"
},
"message": {
"type": "string"
},
"check": {
"type": "string"
},
"checkInput": {
"type": "object"
}
}
},
{
"type": "object",
"required": [
"status",
"message"
],
"properties": {
"status": {
"const": "refused"
},
"message": {
"type": "string"
},
"field": {
"type": "string"
}
}
},
{
"type": "object",
"required": [
"status",
"kind",
"message"
],
"properties": {
"status": {
"const": "needs"
},
"kind": {
"type": "string"
},
"message": {
"type": "string"
},
"note": {
"type": "string"
}
}
}
]
}policy.glance
See which of your policies are in place
- Kind
- Read
- Tool
policy_glance- Scope
policy:read- Reached by
- API, MCP
Read-only.
Input
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {},
"additionalProperties": false
}Output
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"oneOf": [
{
"type": "object",
"properties": {
"status": {
"type": "string",
"const": "done"
},
"title": {
"type": "string"
},
"change": {
"type": "boolean"
},
"result": {
"type": "object",
"properties": {
"set": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"cancellation",
"no_show",
"deposit",
"waitlist",
"call_off",
"refund"
]
},
"summary": {
"type": "string"
}
},
"required": [
"kind",
"summary"
],
"additionalProperties": false
}
}
},
"required": [
"set"
],
"additionalProperties": false
}
},
"required": [
"status",
"title",
"change",
"result"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"status": {
"type": "string",
"const": "refused"
},
"title": {
"type": "string"
},
"change": {
"type": "boolean"
},
"message": {
"type": "string"
},
"field": {
"type": "string"
}
},
"required": [
"status",
"title",
"change",
"message"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"status": {
"type": "string",
"const": "needs"
},
"kind": {
"type": "string",
"enum": [
"module",
"portal",
"business",
"limit",
"paused",
"reauth"
]
},
"title": {
"type": "string"
},
"change": {
"type": "boolean"
},
"message": {
"type": "string"
},
"note": {
"type": "string"
}
},
"required": [
"status",
"kind",
"title",
"change",
"message"
],
"additionalProperties": {}
}
]
}policy.summary
What’s going on
- Kind
- Read
- Tool
policy_summary- Scope
policy:read- Reached by
- API, MCP
Read-only.
Input
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {},
"additionalProperties": false
}Output
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"oneOf": [
{
"type": "object",
"properties": {
"status": {
"type": "string",
"const": "done"
},
"title": {
"type": "string"
},
"change": {
"type": "boolean"
},
"result": {
"type": "object",
"properties": {
"title": {
"type": "string"
},
"facts": {
"type": "array",
"items": {
"type": "string"
},
"description": "One-line facts, e.g. \"3 bookings today\"."
},
"attention": {
"description": "Things that need the owner, each with a plain reason.",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"text": {
"type": "string"
},
"href": {
"type": "string"
}
},
"required": [
"id",
"text"
],
"additionalProperties": false
}
},
"happening": {
"description": "What’s on today, each at its time.",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"at": {
"type": "number",
"description": "Epoch milliseconds."
},
"text": {
"type": "string"
},
"href": {
"type": "string"
}
},
"required": [
"id",
"at",
"text"
],
"additionalProperties": false
}
},
"metrics": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"label": {
"type": "string"
},
"value": {
"type": "number"
},
"prior": {
"type": "number"
},
"unit": {
"type": "string",
"enum": [
"count",
"money"
]
},
"href": {
"type": "string"
}
},
"required": [
"id",
"label",
"value"
],
"additionalProperties": false
}
}
},
"required": [
"title",
"facts"
],
"additionalProperties": false
}
},
"required": [
"status",
"title",
"change",
"result"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"status": {
"type": "string",
"const": "refused"
},
"title": {
"type": "string"
},
"change": {
"type": "boolean"
},
"message": {
"type": "string"
},
"field": {
"type": "string"
}
},
"required": [
"status",
"title",
"change",
"message"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"status": {
"type": "string",
"const": "needs"
},
"kind": {
"type": "string",
"enum": [
"module",
"portal",
"business",
"limit",
"paused",
"reauth"
]
},
"title": {
"type": "string"
},
"change": {
"type": "boolean"
},
"message": {
"type": "string"
},
"note": {
"type": "string"
}
},
"required": [
"status",
"kind",
"title",
"change",
"message"
],
"additionalProperties": {}
}
]
}