Page Templates
Publish instantly with 10 industry templates
Surflet provides 10 preset industry templates. Agents simply pass in variables to generate a complete structured page — including sensible layouts, block combinations, and action buttons. No need to manually assemble the blocks array.
List Available Templates
GET /v1/templates
Response:
{
"templates": [
{
"name": "refund_approval",
"description": "Customer refund approval page with details, AI recommendation, risk gauge, and approve/partial/reject actions with 2-step approval chain.",
"variables": [
{"key": "customer", "label": "Customer name", "required": true, "type": "string"},
{"key": "order_id", "label": "Order ID", "required": true, "type": "string"},
{"key": "amount", "label": "Refund amount", "required": true, "type": "number"},
"..."
]
},
"..."
]
}
Publish from a Template
POST /v1/publish/template/:name
Request body:
{
"variables": {
"customer": "Alice Wang",
"order_id": "#ORD-7891",
"amount": 127.50,
"reason": "Product arrived damaged"
}
}
Response (201): Same page object as POST /v1/publish.
Python SDK
import surflet
client = surflet.Client(api_key="sk_live_...")
# Publish a refund approval page in one line
page = client.publish_template("refund_approval", variables={
"customer": "Alice Wang",
"order_id": "#ORD-7891",
"amount": 127.50,
"reason": "Product arrived damaged",
"risk_score": 15,
})
print(page["pageUrl"])
TypeScript SDK
import { Surflet } from '@surflet/sdk';
const client = new Surflet({ apiKey: 'sk_live_...' });
const page = await client.publishTemplate('refund_approval', {
customer: 'Alice Wang',
order_id: '#ORD-7891',
amount: 127.50,
reason: 'Product damaged on arrival',
risk_score: 15,
});
console.log(page.pageUrl);
MCP Tools
In an MCP client, use surflet_list_templates to browse available templates, then use surflet_publish_template to publish:
Agent: Let me check the available templates first...
[Call surflet_list_templates]
→ Returns 10 templates with their variables
[Call surflet_publish_template]
template: "refund_approval"
variables: { customer: "Alice", order_id: "#ORD-7891", amount: 127.50, reason: "Product damaged" }
→ Returns page URL
10 Templates in Detail
1. refund_approval — Refund Approval
Customer refund approval page with customer details, AI recommendation, risk gauge, and approval process stepper.
| Variable | Type | Required | Description |
|---|---|---|---|
customer | string | Yes | Customer name |
order_id | string | Yes | Order ID |
amount | number | Yes | Refund amount |
currency | string | No | Currency code (default: USD) |
reason | string | Yes | Reason for refund |
agent_recommendation | string | No | AI recommendation text |
risk_score | number | No | Risk score 0–100 (default: 15) |
Generated block combination: key_value + gauge + callout + stepper, with columns layout
Action buttons: Approve Full Refund / Partial Refund / Reject (mutually exclusive action group: decision)
2. deploy_approval — Deployment Approval
Deployment approval page with service details, change summary, test results progress bar, and build pipeline stepper.
| Variable | Type | Required | Description |
|---|---|---|---|
service | string | Yes | Service name |
version | string | Yes | Deployment version |
environment | string | Yes | Target environment |
changes_summary | string | No | Change summary (diff format) |
test_results | number | No | Test pass rate 0–100 |
author | string | No | Deploy author |
Generated block combination: key_value + progress + code + stepper
Action buttons: Approve Deploy (with confirmation dialog for production) / Rollback
3. daily_briefing — Daily Briefing
Daily briefing page with metric cards, highlights callout, and action item checklist.
| Variable | Type | Required | Description |
|---|---|---|---|
date | string | No | Report date (default: today) |
metrics | array | Yes | Metrics array [{label, value, trend?, trend_value?}] |
highlights | array | No | Array of highlight strings |
action_items | array | No | Array of action item strings |
Generated block combination: metric + callout + text (Markdown checklist)
4. incident_report — Incident Report
Incident report page with severity callout, key details, timeline, and resolution progress stepper.
| Variable | Type | Required | Description |
|---|---|---|---|
incident_id | string | Yes | Incident ID |
severity | string | Yes | Severity: critical / high / medium / low |
service | string | Yes | Affected service |
started_at | string | Yes | Incident start time |
description | string | Yes | Incident description |
timeline | array | No | Timeline [{time, event}] |
status | string | No | Current status: detected / investigating / mitigating / resolved |
Generated block combination: callout + key_value + stepper + timeline
Action buttons: Acknowledge / Escalate
5. expense_approval — Expense Approval
Expense approval page with employee details, line-item table, and total amount callout.
| Variable | Type | Required | Description |
|---|---|---|---|
employee | string | Yes | Employee name |
department | string | Yes | Department |
amount | number | Yes | Total amount |
currency | string | No | Currency code |
category | string | No | Expense category |
items | array | Yes | Line items [{description, amount}] |
receipt_url | string | No | Receipt URL |
Generated block combination: key_value + table + callout
Action buttons: Approve / Reject
6. access_request — Access Request
Access request approval page with requester details and business justification.
| Variable | Type | Required | Description |
|---|---|---|---|
requester | string | Yes | Requester |
resource | string | Yes | Resource / system name |
access_level | string | Yes | Requested access level |
justification | string | Yes | Business justification |
duration | string | No | Access duration |
requester_role | string | No | Requester's current role |
Generated block combination: key_value + callout
Action buttons: Approve / Approve with Limits / Deny
7. customer_survey — Customer Survey
Customer survey form page with a greeting and dynamically generated form fields.
| Variable | Type | Required | Description |
|---|---|---|---|
customer_name | string | No | Customer name (used in greeting) |
survey_title | string | Yes | Survey title |
questions | array | Yes | Questions array [{label, type, options?}] |
Generated block combination: callout + form
8. code_review — Code Review
Code review page with PR details, diff code block, and test coverage progress bar.
| Variable | Type | Required | Description |
|---|---|---|---|
pr_title | string | Yes | PR title |
pr_url | string | No | PR URL |
author | string | Yes | PR author |
files_changed | number | No | Number of files changed |
diff_summary | string | Yes | Diff content |
test_status | number | No | Test coverage 0–100 |
Generated block combination: key_value + progress + code (diff syntax highlighting)
Action buttons: Approve / Request Changes / Comment Only
9. contract_review — Contract Review
Contract review page with key terms table, risk assessment comparison cards, and risk flags.
| Variable | Type | Required | Description |
|---|---|---|---|
contract_title | string | Yes | Contract title |
parties | array | Yes | Array of party names |
key_terms | array | Yes | Key terms [{term, value}] |
risk_flags | array | No | Array of risk flag strings |
effective_date | string | No | Effective date |
Generated block combination: key_value + table + comparison + callout
Action buttons: Approve Contract / Request Revisions / Reject
10. onboarding_checklist — Onboarding Checklist
Employee onboarding checklist page with employee details, task stepper, completion progress, and task table.
| Variable | Type | Required | Description |
|---|---|---|---|
employee_name | string | Yes | Employee name |
role | string | Yes | Job title |
department | string | Yes | Department |
start_date | string | Yes | Start date |
tasks | array | Yes | Tasks [{label, description?, status}] |
Generated block combination: key_value + progress + stepper + table
Action Groups in Templates
Action buttons in templates use the group field to implement mutual exclusivity. Buttons in the same group are mutually exclusive — only one can be selected (for example, Approve / Reject in the decision group). See Core Concepts - Action Groups.