Store my customers' data
Say "keep each customer's leases" and get typed records, a workspace per customer, full history, SQL queries and exports.
For developers
Every record is stored by kind and kept apart for the Customer it belongs to, with every change kept. Each kind is a Collection inside that customer’s private workspace, its Tenant.
For developers
Needs Customer
What you get
- 1table for each kind of recordCollection
- 1workspace per customer, holding its records apartTenant
- 5calls for each kind of record: create, get, list, update, deleteVerb
- 1history of every write, readable at any past momentEvent
- 1SQL queries over every record and its historyCollection
- 1list and record view in the AppDashboard
- 1export to a file or a warehouse on a scheduleCollection
Your agent does
You, to your agent
Keep each customer's leases, units and tenants.
Store renewal dates per customer, kept apart from every other customer.
Store my customers' data.
# 1. Collection.create
curl -X POST https: //api.sb/ leaseline.app/ collections \
-H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
-H "Content-Type: application/ json" \
-d '{"id": "leases", "type": ["lease"]}'
# 2. Tenant.provision
curl -X POST https: //api.sb/ leaseline.app/ tenants/ provision \
-H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
-H "Content-Type: application/ json" \
-d '{"customer": "customer_harbor"}'
import { $ } from 'startup-builder'
await $.Collection.create({ id: 'leases', type: ['lease'] })
await $.Tenant.provision({ customer: 'customer_harbor' })
npx startup-builder do Collection.create --json '{"id": "leases", "type": ["lease"]}'
npx startup-builder do Tenant.provision --json '{"customer": "customer_harbor"}'
{
"name": "do",
"arguments": {
"code": "await $.Collection.create({ id: 'leases', type: ['lease'] })\nreturn await $.Tenant.provision({ customer: 'customer_harbor' })"
}
}
Change it
- Add a deposit amount to every Lease.
- Export every Lease to a spreadsheet each Monday.
- Link each Lease to the Unit it covers.
Under the hood
- Systems
- Data editor, Customer access
- Nouns
- Collection, Tenant, Noun, Thing
- Events
Collection.created,Tenant.provisioned