DrootERP talks to customers through channel connectors: WhatsApp, email (including users' own Gmail and Microsoft
365 mailboxes), SMS, Facebook Messenger and Instagram, LinkedIn, X, telephony and lead ads. Each provider is one connector type; you add one connector per company or account in
Setup → Integrations → Connectors (capability connectors.admin). Passwords, tokens and keys are stored as
secrets and referenced by name (secret:<name>), never typed into a setting. Flows, notifications and apps choose
a connector by its key, so two companies (or two WhatsApp numbers) are two connectors.
| Channel | Connector type | Sends | Receives |
|---|---|---|---|
whatsapp-cloud |
Text, templates, media, reply buttons and lists | Messages, sent/delivered/read/failed receipts | |
smtp, amazon-ses, sendgrid |
Text and HTML with attachments; SES and SendGrid templates | SES bounces and complaints (Amazon SNS), SendGrid events | |
| Mailboxes | gmail, microsoft-365-mail |
Email as the mailbox's user | New inbox messages (synced) |
| SMS (India DLT) | gupshup-sms, msg91, kaleyra |
Text on a registered DLT template | Delivery reports |
| Messenger and Instagram | meta-messaging |
Replies, media, quick replies | Messages, postbacks, delivery and read receipts |
linkedin |
Organisation page posts | Lead gen form responses | |
| X | x-social |
Posts and direct messages | Direct messages and mentions |
| Facebook and Instagram posts | meta-pages |
Page posts, published on Instagram too | - |
| Telephony | exotel, twilio-voice, knowlarity, myoperator, generic-telephony |
Click-to-call (agent first, then the customer); MyOperator IVR calls | Call status, duration, recording |
| Lead ads | meta-lead-ads, google-lead-forms |
- | New leads with their answers |
Webhook Addresses
Every connector that receives something has a webhook address that names the connector's key:
https://<your server>/api/channels/<connector key>. Give the provider that address when you set up its webhook. A Meta
page's messaging and lead ads connectors share one address: join their keys with +
(/api/channels/fb-page+fb-leads), and each connector takes only its own events. Each connector checks the call itself before anything is used:
| Connector type | How a call is checked |
|---|---|
whatsapp-cloud, meta-messaging, meta-lead-ads |
The Meta app's App Secret (X-Hub-Signature-256); the setup handshake uses the Webhook Verify Token |
amazon-ses |
Amazon SNS's message signature, against Amazon's signing certificate; the topic subscription is confirmed automatically |
sendgrid |
The Signed Event Webhook's Verification Key (ECDSA) |
twilio-voice |
X-Twilio-Signature with the Auth Token, against the Status Callback URL |
google-lead-forms |
The Webhook Key you set on the lead form |
linkedin |
The Client Secret (X-LI-Signature, and the validation challenge) |
x-social |
The API Key Secret (x-twitter-webhooks-signature, and the CRC check) |
gupshup-sms, msg91, kaleyra, exotel, knowlarity, myoperator, generic-telephony |
A shared token: add ?token=<value> to the address, and store the value as the connector's token secret |
A call that fails its check is refused (401) and nothing is recorded. Signed calls that carry a time (SendGrid's
timestamp header, Amazon SNS's Timestamp, Twilio's status Timestamp, the time of Facebook and Instagram entries)
are also refused when older than Webhook Maximum Age (Seconds) or more than 5 minutes ahead, so a captured call
cannot be replayed long after. Each provider's default covers its own retry window, because losing an event is worse
than taking a late retry (a repeat of the same event is recognised and dropped): 86400 (24 hours) for Facebook,
Instagram and Lead Ads, 86400 for SendGrid, 3600 for Amazon SNS and 600 for Twilio, which does not retry status
callbacks by default. Change it per connector; 0 turns the check off. WhatsApp, LinkedIn and X sign no delivery time.
Test Connection
Test Connection on a connector's page makes one harmless signed-in call and shows the reason when it fails: WhatsApp reads the phone number, Messenger and Lead Ads the page, SES its account (and whether it is still in the sandbox), SendGrid the API key's scopes (it needs Mail Send), SMTP signs in and quits, MSG91 reads the balance, Twilio and Exotel the account, MyOperator places a call without a number (refused with 400 once the API key is accepted, so no call is made), Gmail the profile, Microsoft 365 the inbox, LinkedIn the organisation, X the account. Gupshup, Kaleyra, Knowlarity and Google lead forms offer no such call.
Uninstalling a Connector
Uninstall on a connector's gallery card or its settings page (capability connectors.admin with every company)
first shows what still uses the connector, grouped by kind, with links:
| Kind | Found by |
|---|---|
| Automations, flows, virtual models, other metadata | A connector, connectorKey, configKey or connectorConfig property naming the key, at any depth |
| Scripts, and the jobs that run them | The script's code names the key as a string literal beside connectors. |
| Settings | Values of setting fields declared connectorRef: true (or named like connector) |
| Sign-in emails | AUTH_EMAIL_CONNECTOR |
| Records | Fields an app declares connectorRef: true (a GSP registration's connector, a conversation's connector) |
| Sync, mailbox sync | The sync hub's mappings and running syncs; the mailbox's sync state |
| Deliveries, connector calls | Queued deliveries in the outbox; unsettled (pending, ambiguous, retryable) invocations |
While anything still in use is listed, the removal is blocked. Remove Anyway removes it and leaves those references as they are: they fail visibly at their next use ("Unknown connector"), and the audit row lists them. The uninstall never edits the automations or settings that name the connector, because switching off a rule would also stop its other steps. Queued deliveries are cancelled with a reason. A connector shared by every company is removed only with Remove for Every Company; one installed for a company needs no such step.
The removal then:
- gives the provider's access back, when the driver can (
revokeGrant); a failure is shown and does not stop the removal; - clears the connector's stored sessions (access and refresh tokens, cursors) and waiting inputs;
- deletes the secrets only this connector used, when Remove Secrets is ticked (it is by default in the dialog).
Secret usage is read again inside the removal; a secret another connector (a person's own mailbox included), a
sign-in provider (
sso-…) or an app's code (appcode-…) holds is always kept; - writes an audit row for the connector (
platform.connector,delete, with what was cleaned up) and one per deleted secret (platform.secret).
The API: POST /api/admin/connectors/<key>/uninstall/preview answers the list, the secrets and whether the driver can
revoke; POST /api/admin/connectors/<key>/uninstall with { everyCompany, force, removeSecrets } (each opt-in, default
false) removes it (409
connector_group_wide or connector_in_use, with the preview in details, when a confirmation is missing). The
gallery's POST /api/admin/packages/uninstall takes the same options.
For app developers: declare a text field (in fields.json) or a setting field (in settings.json) that holds a
connector key with "connectorRef": true, so uninstall finds its values. A driver that holds a provider grant
implements the optional revokeGrant(ctx): it runs before the sessions and secrets are cleared, so ctx.secret() and
ctx.session.get() still answer. It answers { revoked: true } when the grant is gone and { revoked: false, reason }
when it is not (the same hook Disconnect calls; see below).
A person's own mailbox (connected under My Mailboxes) is never listed or uninstalled by an admin: its owner disconnects it. Uninstalling the connector it was connected through leaves it working; the preview counts such mailboxes without naming them, and keeps the secrets they share.
WhatsApp Business Cloud
- In Meta's WhatsApp Manager, add the business number and note its Phone Number ID and the Business Account ID (WABA).
- Create a system user with
whatsapp_business_messaging(andwhatsapp_business_managementto list templates) and a permanent token. Store it as a secret and choose it as Access Token. - In the Meta app's webhook settings, subscribe to
messages, enter the connector's webhook address and a verify token. Store the token and the app's App Secret as secrets and choose them on the connector.
The 24-hour window: WhatsApp accepts free-form messages (text, media, buttons and lists) only within 24 hours of the
customer's last message. A message carries lastInboundAt, the time the customer last wrote; without it, or outside
the window, the connector refuses the message with outside_window and sends nothing. Templates go at any time:
name them with template.name and template.language, with variables { "1": "SO-1", "2": "Tuesday" } for
positional placeholders or { "customer_name": "Ann" } for named ones, or template.components for header media
and buttons. The approved templates are readable as the connector's whatsapp-templates resource.
Templates are managed from here too: list-templates (and the whatsapp-templates resource) lists every template with
its status, category, language and variables; submit-template sends a new one (name, language, category, components)
for Meta's approval; template-status reads a template's status by id, or by name and language.
A message may carry one media item by link or media id (media: { kind, url | id, filename }), or one attachment,
which is uploaded first. Reply buttons (up to 3) and lists (up to 10 rows) go in interactive.
SMTP works with any mail server or relay: host, port and security (starttls on 587, tls on 465). A server
whose certificate comes from a private CA needs that CA in Server CA Certificate (PEM); the name is still checked. A plain
connection (none) with a password is allowed only for a connector marked internal. SMTP has no delivery webhook:
bounces return to the sender's mailbox.
Amazon SES uses the SES v2 API in the connector's region with an access key (the secret access key as a secret). The sender must be a verified identity. For bounces and complaints, publish them to an SNS topic (identity notifications, or a configuration set for opens, clicks and delays too), subscribe the connector's webhook address to the topic over HTTPS, and enter the topic ARN on the connector: notifications from any other topic are refused.
SendGrid uses the v3 API with an API key that can send mail. For events, turn on the Event Webhook with Signed Event Webhook, point it at the connector's webhook address and paste the verification key on the connector.
Every email connector takes attachments. Statuses (delivered, bounced with permanent for hard bounces,
complained, deferred, opened, clicked, unsubscribed) name the message by the id the send returned. A driver
sets permanent: true on a hard bounce: only that suppresses the address at once. A bounce without it is a soft one,
counted per address since its last delivered status; five in a row suppress the address too (platform 2.38.0).
SMS With India DLT
Commercial SMS in India must be registered on DLT. On each SMS connector enter the registered Sender ID
(Header), the DLT Principal Entity ID and, optionally, a Default DLT Template ID. A message names its own
template with template.id, and its text must be that template with the variables filled in. Messages without a
template id are refused before they leave.
- Gupshup: the Enterprise SMS user id and password; the entity and template ids are sent with every message.
- MSG91: the auth key; the template id goes as
DLT_TE_ID(MSG91 takes the entity from the sender's registration). - Kaleyra: the account SID and API key, the message type (
TXN,OTPorMKT) and, for delivery reports, the Delivery Report URL (the webhook address with its token).
Set the delivery report URL at the provider to the connector's webhook address with ?token=<Delivery Report Token>.
Facebook Messenger and Instagram
One connector per Facebook Page, with its Instagram professional account if it has one: the Page ID, a Page
Access Token, and in the Meta app's webhook settings the messages, messaging_postbacks, message_deliveries
and message_reads fields for the page (and messages for Instagram). Replies are allowed within 24 hours of the
customer's last message; Allow Replies by a Person for 7 Days uses Meta's human agent tag, when Meta has approved
it for your app. Buttons and lists are sent as quick replies.
Connect With the Provider's Sign-In Page
Gmail, Microsoft 365, LinkedIn and X connectors sign in with the provider's consent page instead of a pasted token:
- Register
<web app address>/connectors/oauth/callbackas a redirect URI in the provider's app (Google Cloud console, Microsoft Entra app registration, LinkedIn developer app, X developer portal). The web app address is set in Setup → Instance. - On the connector, set the OAuth Client ID, choose the client secret, and check OAuth Scopes.
- Click Connect. The provider asks for consent and sends you back; the connector stores the tokens encrypted, fills in what the account tells (the mailbox address, the X user id) and turns on.
The request carries PKCE (except LinkedIn, whose web sign-in does not take it) and a signed state that expires after
10 minutes, can be used once, and only by the person who started it. Reconnect switches the account or consents
again. Disconnect revokes the grant at Google, LinkedIn and X, clears the tokens and turns the connector off;
Microsoft has no way to revoke one grant, so remove the app's access in the Microsoft account as well if needed.
LinkedIn gives refresh tokens only to approved partners: otherwise its 60-day access is kept and the connector asks
to be connected again when it ends.
People's own mailboxes: turn on Let Users Connect Their Own Mailbox on a Gmail or Microsoft 365 connector. Each person then connects their own mailbox under My HR → My Mailboxes. Their mailbox connector uses the company's client id and secret, belongs to them only (admins don't see it, and nobody else can send through it), and Disconnect there removes it.
Gmail and Microsoft 365 Mailboxes
One connector per mailbox, authorised by the mailbox user's OAuth consent (Connect, above, or a pasted token): the
OAuth Client ID as a setting, the client secret and, when pasting one, the Refresh Token as secrets (Gmail: gmail.readonly and gmail.send; Microsoft 365:
Mail.ReadWrite, Mail.Send and offline_access, and the Directory (Tenant) ID). The current access token, and a
refresh token the provider rotates, are kept encrypted with the connector. When the refresh token is refused the user
must consent again.
New inbox messages are pulled incrementally: Gmail from its history id (starting from the first sync, no backfill), Microsoft 365 from its delta link (starting with the last First Sync Days of the inbox). Each message arrives with its sender, recipients, subject, text and HTML, thread, Message-ID and attachments' ids. Email sent through the connector goes from the user's own address and shows in their Sent folder.
LinkedIn and X
LinkedIn: the Organisation ID, the app's Client ID and Client Secret, and a Refresh Token (or a
60-day Access Token) with page posting and lead access. create-post posts on the page; lead gen form responses
arrive through the Lead Sync webhook, and poll-leads fetches any since a time. LinkedIn opens messaging only to
approved partners, so the connector sends no messages.
X (x-social): the Account User ID, the OAuth Client ID, the client secret and a Refresh Token (scopes
tweet.write, dm.write, offline.access), and the app's API Key Secret for the Account Activity webhook. It
sends direct messages (to a user id) and posts (create-post), and receives direct messages and mentions.
Facebook and Instagram Pages (meta-pages): the Facebook Page ID and a Page Access Token secret
(pages_manage_posts, read_insights, and instagram_content_publish for Instagram). With an Instagram Account ID
(the professional account linked to the page) each post is published on Instagram too. It has the same operations as
LinkedIn and X: upload-media (one image as base64, kept as an unpublished page photo; its id is the mediaId) and
create-post (text and up to ten media entries, each an uploaded id or a public url), answering
{ postId, instagramMediaId, instagramNote }. The page post goes first; Instagram then gets one image or a carousel.
Instagram takes no post without an image and a caption of at most 2,200 characters, and an Instagram failure never undoes
the page post: it comes back as instagramNote.
Post Figures
linkedin, x-social and meta-pages connectors read the resource post-metrics
(api.connectors.read("<key>", "post-metrics")): the account's posts from the last Post Figures Window (Days) (90 by
default), one row each, the same shape for every network:
{ "ref": "urn:li:share:7212345678901234567", "likes": 12, "comments": 3, "shares": 2, "impressions": 480, "at": "2026-10-10T08:00:00.000Z" }
ref is the reference create-post answered (LinkedIn's postUrn, X's and Facebook's postId; Instagram rows carry
the instagramMediaId), and at is when the post went out. A figure the network does not give is null.
| Connector type | likes | comments | shares | impressions |
|---|---|---|---|---|
linkedin |
Likes | Comments | Reshares | Impressions (organisation share statistics) |
x-social |
Likes | Replies | Reposts and quotes | Impressions (null when X gives none) |
meta-pages, Facebook |
Reactions | Comments | Shares | The Facebook Impressions Metric insight (post_media_view) |
meta-pages, Instagram |
Likes | Comments | The shares insight |
The Instagram Impressions Metric insight (views) |
A refused token or a missing permission is a configuration error (409); throttling and provider outages are transient.
If Meta refuses an insights metric, the figures are read again without it and impressions are null.
Telephony
click-to-call rings the agent's phone first and, when they answer, connects the customer from the connector's caller
id. It is a connector operation (api.connectors.invoke("<key>", "click-to-call", { agent, customer })), so each
request runs once per idempotency key and is logged; call-details looks a call up.
- Exotel: the account SID, API key and token, and the ExoPhone as Caller ID. Set Status Callback URL to the
connector's webhook address with
?token=. - Knowlarity: the API key and authorization token, the SuperReceptionist number; give Knowlarity the webhook
address with
?token=for call details. - Twilio: the account SID and auth token, a Twilio number as Caller ID, and Status Callback URL set to the connector's public webhook address (signatures are checked against it).
- MyOperator (
myoperator): the Company ID, the OBD API Key (sent asx-api-key) and Secret Token, and the Public IVR ID every OBD call goes through. Dialeranonymousrings the agent's phone;userrings the agent's MyOperator user, from Agent User Map (+919876543210=<user id>, …) or the payload'sagentUserId.ivr-call({ customer, ivrId? }) connects the customer into an IVR (Outbound IVR ID when the call names none), for reminders and payment calls; it passes the same consent check asclick-to-call. Both send the idempotency key asreference_idand return it as the call id: MyOperator echoes it asclient_ref_id, so the call's events find the call. Max Call Duration (Seconds) is at most 5400. With the Calling API Token (Manage › API Integration), call events carry the recording's file name (recordingFile) andrecording-link({ file }) gets a fresh link, valid for a day. In MyOperator's API & Webhook settings, sendcall.initiated,call.answered,call.endandcall.summary(JSON) to the webhook address with?token=; events for another company id are ignored, and the deprecated AfterCall webhook (JSON, or the form fieldmyoperator) is read too. Outbound calls are logged fromcall.end(their progress events carry no reference); bridged iscompleted, missed and voicemail areno-answer.
Call events carry the call id, the status (initiated, ringing, in-progress, completed, busy, no-answer,
failed, canceled), the duration and the recording link, and (platform 1.26.0) digits, the key an inbound caller
pressed in the IVR menu, and agent, the number the call was put through to. A MyOperator call gives recordingFile
instead of a link, since its links expire.
Inbound calls and the IVR menu (platform 1.26.0):
- Exotel: in the call flow, put a Gather applet (the menu) before a Passthru applet whose URL is the connector's
webhook address with
?token=. Each Passthru request is acallevent with the caller, the key pressed and, at the end, the duration, the agent's number and the recording. - Twilio: set the Twilio number's Voice URL to the connector's webhook address. With an IVR Prompt, the caller hears it and presses one key (IVR Wait (Seconds)); the call then rings Forward To (recorded when Record Calls is on). Without a prompt the call goes straight to Forward To.
- Telephony (Any Provider) (
generic-telephony): a provider the kernel has no driver for, described by its settings: the click-to-call request (URL, method, a body with{{agent}},{{customer}},{{callerId}},{{reference}}, its content type, the token header and scheme, and where the answer carries the call id) and the webhook's fields (dotted paths for the call id, status, direction, caller, called number, agent, IVR key, duration, recording and times), with Status Map turning the provider's words into call statuses (answered=completed). The provider calls the webhook address with?token=.
The Telephony app logs every call in its Call Log, matches the caller to a business partner and opens service tickets from calls through its service bridge; Call buttons on records place calls through the company's connector.
Messages From Automations
Automation rules send through these connectors with Send Email, Send SMS and Send WhatsApp (an approved
template, with a value for each of its placeholders). Each can send the record's document: the latest PDF issued for
it, or a new one. An email attaches it; an SMS carries a signed link ({{documentLink}} in the text, else at its end);
a WhatsApp template carries it as its header document (the template needs a document header). The link
(/api/e/d/<token>) opens the archived PDF without signing in until it expires (the step's Link Works For (Days)).
Messages are queued in the delivery outbox, so consent applies (opt-outs, suppressions, WhatsApp opt-in) and a
marketing message waits out quiet hours. The steps' fields are one schema (MESSAGING_ACTIONS); the builder reads it
from GET /api/admin/automations/options (actionSchemas), and GET /api/admin/automations/whatsapp-templates?connector=
lists a WhatsApp connector's approved templates.
Lead Ads
- Meta Lead Ads: subscribe the page to the
leadgenfield with the connector's webhook address. Each lead's answers are fetched with the Page Access Token (it needsleads_retrieval). If Meta cannot be reached, the lead still arrives, marked incomplete, with its lead id. - Google Ads Lead Forms: on the lead form's webhook integration, enter the connector's webhook address and a key;
store the same key as the connector's Webhook Key. Answers are keyed by Google's column ids (
FULL_NAME,EMAIL,PHONE_NUMBER), custom questions by their text.
Tracked Links, Unsubscribe Links and Web Forms
Marketing messages carry the platform's own links, so opens, clicks and unsubscribes are recorded whatever the
provider reports. An app asks the kernel for them (kernel.engagement.links([...])): each names its kind (open,
click, unsubscribe), the app and its own reference for the recipient, the company, the channel, the address and, for a
click, the destination. Every token is signed by the kernel, so a link cannot be changed to redirect elsewhere or to
unsubscribe another address. The public addresses (no sign-in, rate limited per client IP):
| Address | What It Does |
|---|---|
GET /api/e/o/<token> |
The open pixel (a 1x1 GIF, always answered). |
GET /api/e/c/<token> |
Redirects to the signed destination (a link that does not verify answers 404). |
GET /api/e/u/<token> |
The unsubscribe page, with a button (opening the link alone changes nothing). |
POST /api/e/u/<token> |
Unsubscribes: a platform.consent opt-out from marketing, source unsubscribe-link. |
GET /api/e/m/<token> |
Platform 2.4.0: the preference centre (link kind preferences): the company's public subscription topics offered on the link's channel as tick boxes, and Unsubscribe From All. |
POST /api/e/m/<token> |
Saves it: a platform.consent row per topic that changed (or a channel-wide opt-out), source preference-centre, with the visit as evidence. |
GET /api/e/k/<token> |
Platform 2.4.0: a double opt-in's confirmation page (link kind confirm), with a button. |
POST /api/e/k/<token> |
Confirms: the opt-ins waiting for that submission are recorded, source double-opt-in. |
The app receives one engagement event per recipient and type (and destination, for a click) through
app.inbound.on("engagement", handler): a link used again is the same event. A delivery queued with
report: { app, ref } (kernel.connectors.enqueueDelivery) comes back as a delivery event with its outcome, sent or
rejected (consent's codes opted_out, suppressed and no_opt_in included), and availableAt holds a delivery back
until its slot (a bulk send's sending rate).
Subscription topics and consent evidence (platform 2.4.0): platform.subscription-topic records (Settings ›
Messaging › Subscription Topics: key, label, description, company (*: the group), channels, public,
defaultOptIn, active) are what a contact subscribes to. A consent row may name a topic, and keeps its company
(*: every company), the noticeVersion the contact saw and its evidence (ip, userAgent, formKey, pageUrl).
kernel.consent.check({ channel, to, purpose, entityId, topic }) decides in this order: the suppression list, the
contact's channel-wide opt-out (it beats any topic), the topic's latest opt-in or opt-out, then the opt-in requirement
(the channels the company's setting lists, or a topic that is not on by default); only the sending company's rows and
the group's count, and a pending-confirmation row counts for nothing. A delivery's message may carry topic too, so
the send gate checks it again. kernel.consent.topics(entityId) lists a company's active topics (an app adds the
preference centre link to a message only when there are some); the link is kernel.engagement.links([{ kind: "preferences", app, ref, entityId, channel, address }]), labelled with the setting's preferencesLabel
(kernel.consent.settings(entityId)).
List-Unsubscribe (platform 2.4.0): a marketing email's message carries listUnsubscribe: { url, mailto?, oneClick }
(url: the signed unsubscribe link, which takes the RFC 8058 one-click POST). The SES (simple, template and raw
messages), SendGrid and SMTP drivers write List-Unsubscribe (the mailto address, then the link) and, with
oneClick, List-Unsubscribe-Post: List-Unsubscribe=One-Click, as Gmail and Yahoo require of bulk senders.
Interxact's API takes no headers, so it sends without them.
Web-to-lead forms are platform.web-form records (Settings › Messaging › Web Forms). A web page embeds the form's
snippet (<div data-droot-form="<key>"> and <api address>/api/e/forms/<key>/embed.js); the script reads
GET /api/e/forms/<key> (the fields and a signed, single-use submission token) and posts the answers to
POST /api/e/forms/<key> (form-encoded or JSON). A submission is refused from a site the form does not allow, with an
expired or reused token, or without a passing captcha (Turnstile, hCaptcha or reCAPTCHA, its secret a connector
secret); one that fills the hidden honeypot field or comes faster than the form's least fill time is answered as accepted
and dropped. Each form also has its own submissions per hour. A good one becomes a lead event on the web channel
(payload: the form's answers by field name, formId, campaignId from utm_campaign or the form's default campaign,
utm, pageUrl, referrer): CRM makes the lead through its lead form mappings.
Web forms for any model (platform 1.25.0): a form's target is lead (the above; every older form) or record.
A record form creates a record of targetModel as the form's serviceUser, with that user's rights in the form's
company: each field's mapTo names the field it fills, defaults fill fixed values, and lookups find a record by
an answer (model, matchField) to link it (mapTo) and copy its values (copy, target=source pairs); a lookup
marked required refuses the submission with its message when nothing matches. A file field takes the ids of files
uploaded first to POST /api/e/forms/<key>/files?name=<file name> (the bytes as the body, the submission token in
x-form-token), within the company's limits (setting platform.web-form-uploads: files per submission, size, types);
they become the record's files. The embed script does both. The record's creation publishes webform.submitted
(an automation trigger, matched on form). The thank-you message may name the record's values ({number}).
Double opt-in (platform 2.4.0): a form's ticked opt-in box records marketing opt-ins for the email and phone given
(one per optInTopics key; none: the whole channel), with the company's notice version and the submission as
evidence. With doubleOptIn (or a channel in the setting's doubleOptInChannels) they wait as pending-confirmation,
and the form's confirmSubject and confirmBody go through confirmConnector as a transactional message, its
{{confirmUrl}} the signed confirm link (valid for the setting's doubleOptInLinkDays). The form's public definition
carries the setting's consentNoticeText as notice when it asks for an opt-in; the embed script shows it.
Customer Links
A customer page (platform.public-page) is a tracking page (status, stage timeline and the fields it lists), a document
download (the record's issued document, issued as the page's acting user when there is none) or a quote approval (the
customer approves or declines with a name and comment, optionally after a one-time code by email or SMS through a
connector; the transition runs as the page's acting user). POST /api/public-links/<page>/records/<id> (signed in:
reading the record and the page's capability) makes a platform.public-link row and its URL,
<api address>/api/e/p/<token>: the token signs the row's id, so the row's expiry and a revocation
(POST /api/public-links/<id>/revoke, public-links.manage) apply on every use. In an automation's email or connector
call, {{link:<page key>}} becomes a link to the triggering record (the record's open link to that page, or a new one).
Payment Gateways and Payment Links
Payment gateway connectors are the payment-gateway kind (razorpay, stripe), each with the operations
create-payment-link, cancel-payment-link and payment-link-status, and a signed webhook at
/api/channels/<connector> that lands payment events (captured, failed, refunded; the fee when the provider reports
it). A payment link rule (platform.payment-link-rule) names the document model, the amount field and share, the
customer fields and the gateway; POST /api/payment-links/<rule>/records/<id> (payments.links) makes a
platform.payment-link, which a kernel job opens at the gateway. Each payment is recorded once
(platform.gateway-payment), moves the link to partly paid or paid, publishes payment.received, and reaches the apps
as a gateway-payment event (app.inbound.on("gateway-payment", …): payment and link ids, the record, purpose
invoice or advance, party, amounts, fee, refund), from which the books draft the receipt.
Amounts are exact decimal strings in major units everywhere here: the operations' amount and minPartial, the
status's paid, the payment events' amount, fee, taxOnFee and refund, and the gateway-payment event. Only
the driver speaks the gateway's own units (Razorpay's ISO 4217 smallest unit, Stripe's table), converting exactly; an
amount with more decimal places than the gateway takes for its currency is refused, never rounded.
Webinar Platforms
Webinar connectors are the webinar kind (zoom: Zoom Webinars, a Server-to-Server OAuth app whose Account ID, Client
ID and Client Secret are connector secrets; Webinar Host is the Zoom user whose webinars are listed). Every provider
offers the same operations, so an app never names a provider. An app finds the connectors with
GET /api/connectors/for-operation/create-registrant and calls them from an inbox job:
const out = await kernel.connectors.invoke(uow, {
configKey, operation: "create-registrant", scopeEntityId: company,
payload: { webinarRef, email, firstName, lastName },
idempotencyKey: `events-registration-${registrationId}`,
});
if (out.status === "ok") { const { registrantRef, joinUrl } = out.result as WebinarRegistrantResult; }
| Operation | Payload | Result |
|---|---|---|
create-registrant |
{ webinarRef, email, firstName, lastName? } |
{ registrantRef, joinUrl } (joinUrl null while the provider holds the registration for approval) |
attendance (read only) |
{ webinarRef } |
{ attendees: [{ email, joinedAt, leftAt, minutes }] } |
list-webinars (read only) |
{ from, to } (ISO dates or date-times; a date-only to takes in its whole day) |
{ webinars: [{ ref, topic, startAt, durationMinutes }] } |
find-registrant (read only) |
{ webinarRef, email } |
{ registrantRef, joinUrl }, or rejected not_found |
find-registrant is create-registrant's reconcile lookup: an ambiguous registration is settled by asking whether the
email is registered. attendance gives one row per email address (lower case): the first join, the last leave and the
minutes present, with overlapping sessions counted once; participants without an email address are left out. Zoom
reads it from the webinar report, which needs a plan with reports. Each read is a logged invoke too, so a job that reads
attendance again uses a new idempotency key (the day, or a run number).
Refusals: not_found (the webinar or registrant does not exist), zoom_<code> with Zoom's message for any other
refusal, and unknown_operation. Refused credentials or a missing scope (401 after a new token, 403) are a
configuration error, and 429 or 5xx are transient (the job retries). Payloads are checked before any request (a
validation error). The types WebinarRegistrantResult, WebinarAttendanceResult and WebinarListResult, and
WEBINAR_KIND and WEBINAR_OPERATIONS, come from @droot/kernel-sdk.