Surflet

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.

VariableTypeRequiredDescription
customerstringYesCustomer name
order_idstringYesOrder ID
amountnumberYesRefund amount
currencystringNoCurrency code (default: USD)
reasonstringYesReason for refund
agent_recommendationstringNoAI recommendation text
risk_scorenumberNoRisk 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.

VariableTypeRequiredDescription
servicestringYesService name
versionstringYesDeployment version
environmentstringYesTarget environment
changes_summarystringNoChange summary (diff format)
test_resultsnumberNoTest pass rate 0–100
authorstringNoDeploy 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.

VariableTypeRequiredDescription
datestringNoReport date (default: today)
metricsarrayYesMetrics array [{label, value, trend?, trend_value?}]
highlightsarrayNoArray of highlight strings
action_itemsarrayNoArray 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.

VariableTypeRequiredDescription
incident_idstringYesIncident ID
severitystringYesSeverity: critical / high / medium / low
servicestringYesAffected service
started_atstringYesIncident start time
descriptionstringYesIncident description
timelinearrayNoTimeline [{time, event}]
statusstringNoCurrent 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.

VariableTypeRequiredDescription
employeestringYesEmployee name
departmentstringYesDepartment
amountnumberYesTotal amount
currencystringNoCurrency code
categorystringNoExpense category
itemsarrayYesLine items [{description, amount}]
receipt_urlstringNoReceipt 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.

VariableTypeRequiredDescription
requesterstringYesRequester
resourcestringYesResource / system name
access_levelstringYesRequested access level
justificationstringYesBusiness justification
durationstringNoAccess duration
requester_rolestringNoRequester'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.

VariableTypeRequiredDescription
customer_namestringNoCustomer name (used in greeting)
survey_titlestringYesSurvey title
questionsarrayYesQuestions 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.

VariableTypeRequiredDescription
pr_titlestringYesPR title
pr_urlstringNoPR URL
authorstringYesPR author
files_changednumberNoNumber of files changed
diff_summarystringYesDiff content
test_statusnumberNoTest 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.

VariableTypeRequiredDescription
contract_titlestringYesContract title
partiesarrayYesArray of party names
key_termsarrayYesKey terms [{term, value}]
risk_flagsarrayNoArray of risk flag strings
effective_datestringNoEffective 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.

VariableTypeRequiredDescription
employee_namestringYesEmployee name
rolestringYesJob title
departmentstringYesDepartment
start_datestringYesStart date
tasksarrayYesTasks [{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.