Integrations
Build an integration.
Connect Caleana to your software with the Integration SDK. Sessions open from your product with the record’s details, your system’s data comes into the session, and finished documents go back.
Building a plugin instead? Start on Plugins
An integration connects your system to every session.
It hears when a session starts, when data needs refreshing, when a template set is used and when a write-back is asked for. Context comes in through it, and finished documents go out.
session-created: the session opens from your product for a record, and the integration adds your system’s data with setValues().
data-update-requested: the integration sends your system’s data to the session again.
collection-invoked: the integration is told which template set has been used, with its name and context hints.
writeback-requested: the integration receives the exact bytes of the finished document, as text, RTF or a PDF attachment, and saves them to the record.
The connection
The Integration SDK connects outbound, so your system hosts no endpoint.
- A launch link opens a session from your product, with the record’s details.
- Sign-in is single sign-on through SAML or OIDC, or email and Google.
- Your system’s data comes into the session when it starts, and again when it needs refreshing.
- Write-back sends a fixed copy of the finished document, and each send is tracked to help prevent accidental duplicate sends.
- Events are pushed over an outbound TLS connection, with short-lived credentials the SDK renews on its own.
- An integration is a small TypeScript service beside your system, with an API key and the integration’s ID.
Create a client, and handle the events you need.
The client takes your API key; the listener handles the events you list and sets the session’s values. Write-back, lookups and launch links are in the docs.
# the package npm install @caleana-ai/integration-sdk # what the integration needs CALEANA_API_KEY=api_... # Settings, API keys CALEANA_INTEGRATION_ID=... # the workspace integration
const client = new CaleanaClient({ apiKey })
const listener = client.createEventListener({
integrationId,
eventTypes: ["session-created", "data-update-requested"],
})
listener.on("session-created", async (session) => {
const record = await findRecord(session.subjectIds) // your system
await session.setValues({ details: record.details })
})
listener.start()
Caleana sets up each deployment with your team.
The integration is one part of a deployment. The launch, branding, templates and rules, and field plugins are set up for its users, on the platform that already runs.
Sessions open from your software, with its sign-on.
Your system’s data comes in, and finished documents go back where supported.
Yours, on the product your users see.
Templates and suggestion rules, set up for the deployment’s users.
Built by Caleana or by your team.
Build a pluginWhere the Integration SDK stands.
Install @caleana-ai/integration-sdk from npm.
Finished documents go back to your system through the Integration SDK, as text, RTF or a PDF attachment.
The connection, events, sessions, lookups, write-back and launch links, for SDK 0.3.0.
Integration SDK referenceBuild on your advantage.
Tell us about your platform and the workflows you’re looking to introduce. Let’s explore how Caleana can help bring them to life.
Talk integrations