Guides
How to build integrations and automations
Step by step guides with the Tray Headless prompts that build each one. Work in your coding assistant, governed by default.
Revenue operations
How to build lead import and validation
Validate before you write, quarantine the bad rows instead of dropping them, dedupe against what is already there, and keep the source.
Automation
How to build lead routing that assigns in seconds
Match the lead to an account first, evaluate rules in a fixed order, catch what they miss, and time it from arrival.
Automation
How to build lead-to-account matching
Domain first, then fuzzy name, then hierarchy, with a confidence score and a review queue for the ones that are close.
Automation
How to build lead enrichment that does not stall the queue
Enrich on a budget and a timeout, cache by domain, fall back between providers, and never hold a lead waiting for a field.
Automation
How to build lead deduplication and merge
Detect on a scored rule set, survive the merge with field-level rules, keep the activity history, and never silently reassign an owner.
Automation
How to build a lead scoring sync
Keep fit and activity scores apart, write one score the CRM trusts, let old activity fade, and route the moment a lead crosses the line.
Integration
How to build speed-to-lead alerts
Alert the rep with everything they need, start a clock on every lead, escalate before it goes cold, and reassign when nobody picks it up.
Automation
How to build pipeline hygiene automation
Detect the staleness that matters, nudge the owner rather than the report, escalate on the deals that count, and measure whether it worked.
Automation
How to build a CRM to marketing automation sync
Decide field ownership before you build, sync deltas not everything, handle the person-versus-lead model gap, and break loops.
Integration
How to build a sales engagement to CRM sync
Log activity without flooding the timeline, suppress sequences on the accounts you must not touch, and keep one definition of engagement.
Integration
How to build a conversation intelligence to CRM sync
Write the few fields a rep will act on, keep every claim linked to its moment in the call, and never let a model set a close date.
Integration
How to build a quote-to-order integration
Approved quote to signed contract to booked order, with the approval state carried through and amendments handled.
Integration
How to build an order-to-cash integration
Closed-won to sales order to invoice to cash applied, as a CRM to ERP integration. Retries that never create a second order, a reconciliation loop, and
Integration
How to build a CPQ to ERP sync
Map the product catalogue as data, carry ramps and proration intact, keep both catalogues aligned, and fail loudly on an unmapped SKU.
Integration
How to build a billing to CRM sync
Put invoice and payment state where the account team works, without letting the CRM become a second billing system.
Integration
How to build subscription and entitlement provisioning
Turn a signed contract into working access on the day it starts, handle mid-term changes, and never let entitlement drift from what was sold.
Integration
How to build partner deal registration
Check submissions against pipeline in seconds, protect for a fixed window, expire visibly, and settle conflicts with a rule rather than an argument.
Automation
How to build a territory and quota sync
Apply a plan on its effective date, keep in-flight deals with their owner, and make coverage visible before anybody signs off.
Automation
How to build a commission data to payroll sync
Qualify transactions against the plan, show the working line by line, hold disputes without holding the run, and reconcile before it pays.
Integration
How to automate business rules and routing decisions
Hold the rules as a table the process owner edits, decide the clear cases automatically, let AI sort free text, and send the rest to a person.
Automation
How to build deal desk approvals
Route each discount and non-standard term to the right approver, decide in Slack with the deal in view, lock the quote to what was approved, and keep the record.
Automation
How to build a forecast snapshot sync
Freeze the pipeline and the forecast call every week, keep each snapshot untouched, compare the call with what closed, and show where deals slipped.
Integration
How to build partner onboarding
Take a partner from signed agreement to portal access, a partner manager and their first training in a day, with the partner set up the same way in the CRM and the portal.
Automation
How to build partner certification tracking
Bring partner training and certifications back to the CRM and the partner portal, so tiers, deal registration and renewals reflect who at the partner can actually sell.
Automation
How to build partner account mapping
Bring account overlaps with partners into the CRM, so reps see which partner already works with an account before they start, and partners hear about the right ones.
Automation
How to build partner lead sharing
Route partner-referred leads to the right rep with the partner credited, pass leads to partners with a deadline to accept, and take back the ones nobody works.
Automation
Finance
How to build purchase request approval
Take requests where people already ask, check for an existing contract first, send each one to the reviewers it needs, and chase approvers before the request stalls.
Automation
How to build a procure-to-pay integration
Requisition to PO to receipt to payment, with the approval matrix as data, three-way matching, and the budget checked before the commitment.
Integration
How to build AP invoice processing
Take invoices from wherever they arrive, extract and verify instead of trust, match against the order, and never pay the same one twice.
Automation
How to build collections and dunning
Escalate on the customer rather than the invoice, stop the moment they pay or dispute, and never dun an account somebody is negotiating with.
Automation
How to build three-way matching
Compare the order, the receipt and the invoice line by line, with tolerances finance sets, holds that release themselves, and every mismatch sent to a person.
Automation
How to build an expense and card feed sync
Match card transactions to receipts, code from the merchant instead of the claimant, and chase the missing ones before month end.
Integration
How to build a vendor master sync
Onboard a supplier once, verify bank details out of band, keep one record per legal entity, and make a change to payment details an event.
Integration
How to build financial close automation
Model the dependencies instead of the checklist, pull the data before anybody asks, and show the critical path instead of a percentage.
Automation
How to build bank reconciliation automation
Match on rules that learn, keep the unmatched visible and ageing, and never write a plug.
Automation
How to build a revenue recognition feed
Carry performance obligations instead of invoice totals, keep the allocation reconstructable, and reconcile bookings to revenue every period.
Integration
How to automate approval routing
Hold who approves what as data, send each approver the facts they need where they work, set a deadline that escalates, and keep the record.
Automation
How to build partner payouts
Calculate partner referral fees and rebates from the closed deal and the paid invoice, show partners the statement before paying, and settle disputes from the record.
Automation
Customer success
How to build a closed-won to onboarding handoff
Carry what was promised, not only what was sold. Generate the plan from the deal, and start the clock at close.
Automation
How to build support ticket routing
Route on the skill needed and the account, not on who is free. Derive priority from contract and impact, and time the clock from the customer.
Automation
How to build a product usage to CRM sync
Send the three signals that change a conversation, aggregated and labelled, without turning the CRM into an analytics tool.
Integration
How to build customer health signals
Weight the signals that predict churn, keep the categories visible instead of one number, and back-test before anybody trusts it.
Automation
How to build an NPS and survey to CRM sync
Attach responses to the account and the person, route detractors before they escalate, and stop surveying people you just surveyed.
Integration
How to build support intake from every channel
Turn email, chat, phone, web forms and shared Slack channels into one ticket per problem, matched to the right account, with nothing lost between them.
Automation
How to build a support history to CRM sync
Put a short, current summary of each account's support history on the CRM record, tied to the right account, with escalations sent to the owner.
Integration
How to build SLA breach alerts
Warn the right person before a support SLA is missed, with the clock read from the customer's contract, paused only when it should be, and every near miss recorded.
Automation
How to build support escalation to engineering
Send a confirmed bug to engineering once, with the evidence attached, link every ticket it affects, and tell each customer when the fix ships.
Automation
How to build ticket to help article drafting
Find the questions customers keep asking that no help article answers, draft the article from the tickets that solved it, and publish only after a person reviews it.
Automation
How to build integration adoption tracking
See which customers turned on which integrations, whether they still run, and how retention differs for customers who integrate, with the numbers in the CRM.
Automation
People operations
How to build employee onboarding provisioning
Drive it from the HRIS, derive access from the role instead of a copied colleague, sequence around the start date, and prove it happened.
Automation
How to build employee offboarding deprovisioning
Revoke on the leave date, cover every system instead of the ones you remember, transfer what they owned, and prove it.
Automation
How to build an HRIS to payroll sync
Sync effective-dated changes, respect the payroll cutoff, hold anything ambiguous instead of guessing, and reconcile every cycle.
Integration
How to build an org hierarchy sync
Propagate a reporting change everywhere it decides something, handle the reorganisation, and never leave an approval routed to somebody who left.
Integration
How to build an ATS to HRIS sync
Move a signed offer into a worker record without rekeying, keep candidate data out of HR, and trigger onboarding from the start date.
Integration
How to build a training completion sync
Assign from role rather than a spreadsheet, carry completions into the HRIS, and produce evidence per person instead of a percentage.
Integration
How to build a role change access update
When someone is promoted or transfers, add what the new role needs, remove what the old role had, and keep a record.
Automation
IT and security
How to build access request and approval
Route to the system owner, grant with an expiry by default, provision automatically, and produce the access review as a by-product.
Automation
How to build incident to resolution
Declare fast, assemble the channel and the timeline automatically, keep customers informed on a cadence, and make the postmortem unavoidable.
Automation
How to build security alert triage
Enrich before a human sees it, suppress the known-benign, escalate on asset value, and measure what you closed rather than what fired.
Automation
How to build IT service desk fulfilment
Catalogue the requests worth automating, fulfil the safe ones end to end, and route the rest with everything already gathered.
Automation
How to build SaaS licence reclamation
Find the seats nobody uses, ask before you take, reclaim on a schedule, and put the saving where finance sees it.
Automation
How to build vulnerability to ticket routing
Rank on exploitability and exposure rather than CVSS, group by fix instead of by finding, and route to whoever ships the patch.
Automation
How to build a device lifecycle sync
Reconcile what management sees against what finance owns and what HR says, and make an unassigned device an exception instead of a row.
Integration
How to automate request intake forms
Capture each request once with the fields the decision needs, check it against the systems that already know, and route it to an owner.
Automation
How to build SaaS security log collection
Pull sign-in, admin and audit events from every SaaS app into the SIEM in one shape, watch each feed for silence, keep what investigations need.
Integration
How to build IT ticket triage and routing
Classify each IT ticket by what it is about, attach who raised it and what they run, and route it to the team that fixes it first time.
Automation
How to build self-service password reset
Let people reset a password or clear a lockout from Slack or Teams, with the identity check that makes it safe and a record IT can audit.
Automation
How to build phishing report triage
Check every reported email, group copies of one campaign into one case, pull the rest from every inbox, and tell the reporter what happened.
Automation
How to build compromised account response
Ask the user about a risky sign-in, revoke every session in every app on a confirmed takeover, and remove what the attacker left behind.
Automation
How to build endpoint alert containment
Decide which endpoint detections isolate a device on a rule and which need a person, contain the account, tell the user, and release cleanly.
Automation
How to build bug bounty report triage
Check each researcher report for duplicates, size it on real impact, route it to the team that owns the code, and reply to the researcher on time.
Automation
Marketing
How to build a campaign attribution pipeline
Stitch touches to accounts, publish more than one model, and reconcile spend against pipeline so the number survives a finance review.
Integration
How to build an ad audience sync
Build audiences from CRM state, suppress customers and open deals, hash before it leaves, and refresh often enough to matter.
Integration
How to build a webinar and event registration sync
Get registrations in before the event, split attended from registered, route the follow-up the same day, and attribute honestly.
Automation
Data operations
How to build a CRM to warehouse sync
Capture history instead of current state, handle deletes and field changes, land raw then model, and prove the row counts.
Integration
How to build reverse ETL from the warehouse
Push modelled data back into the tools people work in, syncing deltas, respecting field ownership, and never overwriting a human.
Integration
How to build a customer 360 and master data sync
Pick a survivorship order per attribute, resolve identity on more than email, and publish a golden record every system can point at.
Integration
How to build data quality monitoring
Test what breaks decisions, alert the owner rather than a channel, and say what depends on a failure.
Automation
How to build schema change management
Detect a source change before it breaks a model, resolve what depends on it, and tell the owner in time to act.
Automation
How to log and report on automated process runs
Record every run, decision and approver in one place, join the runs to the requests they served, and report cycle time and failures by stage.
Automation
How to build an ERP to warehouse sync
Pull only what changed, land the raw copy first, keep posted and reversed entries apart, and reconcile totals to the ERP every day.
Integration
Platform engineering
How to build an API facade
Give consumers one contract instead of six systems, absorb upstream changes rather than leaking them, and keep the caller identity intact.
Integration
How to build a change data capture pipeline
Read the log instead of polling a timestamp, overlap the snapshot with the stream, and keep deletes and order intact.
Integration
How to build webhook fan-out
Acknowledge before you fan out, verify the signature first, retry per consumer, and make replay possible.
Integration
How to migrate an SFTP batch feed to an API
Recover the semantics nobody wrote down, run both in parallel and diff, and cut over only after a month end.
Integration
How to handle exceptions and retries in automated workflows
Sort failures into ones to retry and ones a person must fix, make retries safe to repeat, park what fails with its context, and alert an owner.
Automation
How to update several systems from one automated process
Write each update in a set order, check first so a rerun never doubles anything, hand other teams a tracked task, and tell everyone affected.
Automation
How to build integration request tracking
Collect every customer request for an integration from sales, support and product feedback, count it once per account, and weigh it by revenue.
Automation
How to build one integration for every customer
Build a customer-facing integration once, with every per-customer choice pulled out as a setting, so a fix ships to every customer at the same time.
Integration
How to let customers connect their own accounts
Let customers authorise their own apps inside your product, under your brand, with expired connections caught and fixed before a sync stops.
Integration
How to build customer field mapping
Let each customer match your product's fields to their own, custom fields included, then turn the integration on with a first sync that doesn't flood their account.
Integration
How to build error alerts for customer integrations
Catch every failed run across every customer's integration, sort what the customer can fix from what your team must, and tell the right one first.
Automation
How to roll out integration changes to every customer
Ship a new version of a customer-facing integration to every customer: test it as a customer first, release in waves, and ask for setup again only when it must.
Automation
AI operations
How to expose an internal system as an MCP tool
Scope the tool to a job rather than an API, resolve identity per call, make writes idempotent, and log every invocation.
Integration
How to build human approval for agent actions
Decide what needs approving by blast radius, show the approver what will happen, expire cleanly, and keep the record.
Automation
How to build LLM cost and usage tracking
Attribute spend to a team and a feature, alert on the rate rather than the total, and catch the loop before the invoice does.
Automation
How to build a knowledge base to vector sync
Chunk on structure, carry permissions into the index, delete on delete, and re-embed only what changed.
Integration
How to build shadow AI discovery
Find the AI tools nobody registered, from expenses, SSO and DNS, then route to a path rather than a ban.
Automation
How to build AI support deflection
Answer only what the knowledge base actually covers, escalate early with the context, and measure resolution rather than deflection.
Automation
How to build an agent observability pipeline
Capture whole agent runs instead of single calls, join each one to the outcome it produced, and alert on the failures that return an answer anyway.
Integration
How to build a document intelligence pipeline
Score confidence per field rather than per document, validate against a system of record, and route only the uncertain fields to a person.
Automation
How to scope an AI agent's tool access
Give each agent the few tools its job needs, act as the person asking or a narrow service account, split read from write, and review access on a schedule.
Automation
How to build MCP server access control
Open each MCP server to identity provider groups, make every caller sign in as themselves, cap calls, and close access the day someone leaves.
Automation
How to test an AI agent before release
Build a test set from real requests, score what the agent did as well as what it said, set a pass bar per category, and run it on every change.
Automation
How to build an MCP audit trail
Log every MCP tool call with the person, the assistant, the tool, what went in and what came back, mask what should not be stored, and send it to security's tools.
Integration
How to build an AI agent handoff to a person
Decide when the agent stops, pass the whole case to the right person, tell the user what happens next, and learn from every handoff.
Automation
How to manage the MCP server lifecycle
Publish MCP servers through an approval, keep a version history with a way back, tell the agents that depend on a tool before it changes, and retire what nobody uses.
Automation
How to build an MCP tool access review
Review on a schedule which MCP tools exist and which people and AI assistants can call them, send each owner the usage behind it, and revoke what nobody uses.
Automation
Legal and compliance
How to build data subject request automation
Search every system instead of the ones you remember, verify identity before disclosing, track the statutory clock, and record what was found.
Automation
How to build a consent and preference sync
Give consent one owner, propagate a withdrawal in seconds, keep the evidence, and never let a sync re-subscribe anybody.
Integration
How to build a contract lifecycle sync
Extract the obligations rather than storing a PDF, put renewal and notice dates where somebody will see them, and never let the signed version drift.
Integration
How to build vendor security review
Tier on what the vendor can reach, ask questions that match the tier, track conditions to closure, and re-review before the evidence expires.
Automation
How to build policy attestation tracking
Assign from the HRIS continuously, version what was accepted, chase without nagging everybody, and keep evidence a person can point at.
Automation
How to build a user access review
List who can reach each in-scope app from the app itself, send each reviewer only their own people, remove what nobody confirms, and keep the record an auditor samples.
Automation
How to build change approval evidence
Tie every production change to a ticket, a reviewer who did not write it and a passing test run, catch the ones that skipped a step, and keep the record.
Automation
How to build data retention enforcement
Turn the retention schedule into rules per system, find what is past its date, check for holds before deleting, and record what went.
Automation
How to build audit evidence collection
Map each control to the systems that prove it, collect the evidence on a schedule with its date and source, chase the gaps before the auditor does, and keep one place to look.
Automation
Questions people ask
What is the difference between an integration and an automation?
An integration keeps two systems agreeing about the same records, like a CRM and an ERP holding the same customer. An automation runs a process across systems, like routing a lead or chasing an invoice. The distinction matters because they fail differently: an integration fails by drifting out of agreement, an automation fails by acting on the wrong thing.
What is in each guide?
The design of one integration or automation, the sequence it runs in, the systems it touches, a set of prompts that build it, the questions people ask about it, and what changes when it runs in production rather than on a laptop.
Do the prompts work in any coding assistant?
They are written for Tray Headless through an assistant like Claude Code, Codex or Cursor. Each stage names the skills it uses, so the assistant researches the connector, builds the workflow and checks it against the known failure modes rather than guessing at a schema.
Do I have to build the whole thing at once?
No. Each guide is staged, and every stage runs on its own. The first gets you connected and reading real data, and you can stop there and come back.
What happens after the assistant has built it?
The same workflow opens in Tray Build, so the team that owns the process can change thresholds, mappings and routing in the visual canvas without going back to an assistant or waiting on a deployment.
Tray Headless
Integrations, automations, agents, MCP tools
Every guide here is built with Tray Headless, and it builds the other two the same way: the same kind of prompts, in the same coding assistant, on the same governed platform. These sixty-eight cover integrations and automations because that is where most teams start, not because the method stops there.
What will you vibe-code?