Understand how Essal Office handles real-time collaborative editing, presence awareness, and conflict resolution.
Essal Office uses Operational Transformation (OT) to allow multiple users to edit the same document simultaneously. Changes are merged server-side and broadcast to all connected clients within milliseconds.
When a user connects to a document session, their presence is broadcast to all other participants. You can subscribe to presence events to show live cursors and avatars:
Essal Office resolves edit conflicts using server-authoritative OT. Each operation carries a revision number. If two clients submit conflicting operations at the same revision, the server transforms them into compatible operations and broadcasts the resolved result.
You do not need to implement conflict resolution logic in your client. The OT engine on the server handles all transformations. If you use the Essal SDK, this is fully transparent.
All operations are stored as an immutable history log. You can retrieve the full change history for a document:
GET /v1/office/documents/doc_01HXYZABC/history?limit=20
Each entry includes the operation type, the author, a timestamp, and a diff summary. You can restore any previous revision using the revision restore endpoint.
The SDK automatically buffers local operations during a disconnection and replays them once the connection is re-established. Clients that have been offline for more than 30 minutes will receive a full document snapshot rather than a delta sync.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Essal Developer Docs","colors":{"primary":"#0066FF","light":"#3D8BFF","dark":"#0050B4"},"logo":{"light":"https://mintcdn.com/essal/5qVV5p4Y6tAbM76k/logo/logo.svg?fit=max\u0026auto=format\u0026n=5qVV5p4Y6tAbM76k\u0026q=85\u0026s=706e0f6b7817c8a2af008f21830be42b","dark":"https://mintcdn.com/essal/5qVV5p4Y6tAbM76k/logo/logo.svg?fit=max\u0026auto=format\u0026n=5qVV5p4Y6tAbM76k\u0026q=85\u0026s=706e0f6b7817c8a2af008f21830be42b","href":"https://essal.cloud"},"favicon":"https://mintcdn.com/essal/McBxieepy9CPQ7G0/favicon.png?fit=max\u0026auto=format\u0026n=McBxieepy9CPQ7G0\u0026q=85\u0026s=10fba0b2f9e4f93957e9338d17ef82cb","api":{"playground":{}},"background":{},"footer":{"socials":{"github":"https://github.com/essal","facebook":"https://facebook.com/essal","linkedin":"https://www.linkedin.com/company/essal"},"links":[{"items":[{"label":"Office","href":"https://essal.cloud/products/office"},{"label":"Access","href":"https://essal.cloud/products/access"},{"label":"Sales","href":"https://essal.cloud/products/sales"},{"label":"Careers","href":"https://essal.cloud/products/careers"},{"label":"Project","href":"https://essal.cloud/products/project"},{"label":"Guard","href":"https://essal.cloud/products/guard"}]},{"items":[{"label":"Help Center","href":"https://support.essal.cloud"},{"label":"Training","href":"https://essal.cloud/training"},{"label":"Security Center","href":"https://essal.cloud/security"},{"label":"Legal Center","href":"https://legal.essal.cloud/"},{"label":"Certifications","href":"https://credentials.essal.cloud/"}]},{"items":[{"label":"About Us","href":"https://essal.cloud/about"},{"label":"Careers","href":"https://careers.essal.cloud/"},{"label":"Newsroom","href":"https://newsroom.essal.cloud/"},{"label":"Become a Partner","href":"https://essal.cloud/partners"},{"label":"Brand Assets","href":"https://brand.essal.cloud/"},{"label":"Contact","href":"https://essal.cloud/contact"}]},{"items":[{"label":"Privacy","href":"https://legal.essal.cloud/privacy"},{"label":"Terms of use","href":"https://legal.essal.cloud/terms"},{"label":"Leave Feedback","href":"https://review.essal.cloud/"},{"label":"Status Page","href":"https://status.essal.cloud/"}]}]},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"essal","hasAudioNarration":false,"actualSubdomain":"essal","customDomains":["developers.essal.cloud"],"gitSource":{"type":"github","owner":"essalhq","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"collectionId":"4d503a57-591d-47e7-9d7d-1abd2ae897c8","liveDeploymentHistoryId":"6a5383090b5bb62de3ce1c58","schemaVersion":"v3"},"entitlements":{},"buildId":"6a5383090b5bb62de3ce1c58:success","clientVersion":"0.0.4045","searchFilterCounts":[{"language":"default","tag":"Documentation","count":38},{"language":"default","tag":"API Reference","count":23},{"language":"default","tag":"SDKs \u0026 Tools","count":8},{"language":"default","tag":"Platform Concepts","count":6},{"language":"default","tag":"Getting Started","count":5},{"language":"default","tag":"Integrations","count":5},{"language":"default","tag":"Official SDKs","count":5},{"language":"default","tag":"Webhooks","count":4},{"language":"default","tag":"Changelog","count":4},{"language":"default","tag":"Changelog Updates","count":4}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"a[href*=\"mintlify.com?utm_campaign=poweredBy\"]{display:none!important}"}],"page":{"pagePath":"guides/office/collaborate-in-real-time","slug":"/guides/office/collaborate-in-real-time","pageMetadata":{"title":"Collaborate in Real Time","description":"Understand how Essal Office handles real-time collaborative editing, presence awareness, and conflict resolution.","href":"/guides/office/collaborate-in-real-time"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Understand how Essal Office handles real-time collaborative editing, presence awareness, and conflict resolution.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Essal Office uses Operational Transformation (OT) to allow multiple users to edit the same document simultaneously. Changes are merged server-side and broadcast to all connected clients within milliseconds.`}),`\n`,_jsx(Heading,{level:`2`,id:`connecting-to-a-document-session`,children:`Connecting to a Document Session`}),`\n`,_jsx(_components.p,{children:`Real-time collaboration is facilitated over a WebSocket connection. Establish a session using the collaboration endpoint:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`11`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`11`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`OfficeSession`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"@essal/sdk\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` session`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` OfficeSession`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`connect`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` documentId:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"doc_01HXYZABC\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` apiKey:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`ESSAL_API_KEY`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`session`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`on`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"operation\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`op`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Remote operation received:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`op`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` applyToEditor`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`op`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`The SDK handles reconnection, operation buffering, and state synchronisation automatically.`}),`\n`,_jsx(Heading,{level:`2`,id:`presence-awareness`,children:`Presence Awareness`}),`\n`,_jsx(_components.p,{children:`When a user connects to a document session, their presence is broadcast to all other participants. You can subscribe to presence events to show live cursors and avatars:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`11`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`11`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`session`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`on`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"presence.update\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`participants`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` participants`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`forEach`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`((`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`p`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` renderCursor`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`p`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`user_id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`p`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`cursor_position`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`p`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`display_name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Publish your own cursor position`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`session`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`updatePresence`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` cursor_position:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`line:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 14`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`column:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 7`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` selection:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`from:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`line:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 14`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`column:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`to:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`line:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 14`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`column:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 20`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`conflict-resolution`,children:`Conflict Resolution`}),`\n`,_jsxs(_components.p,{children:[`Essal Office resolves edit conflicts using server-authoritative OT. Each operation carries a `,_jsx(_components.strong,{children:`revision number`}),`. If two clients submit conflicting operations at the same revision, the server transforms them into compatible operations and broadcasts the resolved result.`]}),`\n`,_jsx(Note,{children:_jsx(_components.p,{children:`You do not need to implement conflict resolution logic in your client. The OT engine on the server handles all transformations. If you use the Essal SDK, this is fully transparent.`})}),`\n`,_jsx(Heading,{level:`2`,id:`document-history`,children:`Document History`}),`\n`,_jsx(_components.p,{children:`All operations are stored as an immutable history log. You can retrieve the full change history for a document:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`GET`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` /v1/office/documents/doc_01HXYZABC/history?limit=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`20`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Each entry includes the operation type, the author, a timestamp, and a diff summary. You can restore any previous revision using the revision restore endpoint.`}),`\n`,_jsx(Heading,{level:`2`,id:`handling-disconnections`,children:`Handling Disconnections`}),`\n`,_jsx(_components.p,{children:`The SDK automatically buffers local operations during a disconnection and replays them once the connection is re-established. Clients that have been offline for more than 30 minutes will receive a full document snapshot rather than a delta sync.`})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Collaborate in Real Time","description":"Understand how Essal Office handles real-time collaborative editing, presence awareness, and conflict resolution.","href":"/guides/office/collaborate-in-real-time"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Connecting to a Document Session","slug":"connecting-to-a-document-session","depth":2,"children":[]},{"title":"Presence Awareness","slug":"presence-awareness","depth":2,"children":[]},{"title":"Conflict Resolution","slug":"conflict-resolution","depth":2,"children":[]},{"title":"Document History","slug":"document-history","depth":2,"children":[]},{"title":"Handling Disconnections","slug":"handling-disconnections","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"essal","siteName":"Essal Developer Docs","title":"Collaborate in Real Time - Essal Developer Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-07-12T12:05:45.247Z","originalFileLocation":"guides/office/collaborate-in-real-time.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Understand how Essal Office handles real-time collaborative editing, presence awareness, and conflict resolution.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Essal Developer Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/essal/hV1lHJlq_XIJhUPP/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/essal/hV1lHJlq_XIJhUPP/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/essal/hV1lHJlq_XIJhUPP/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/essal/hV1lHJlq_XIJhUPP/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/essal/hV1lHJlq_XIJhUPP/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/essal/hV1lHJlq_XIJhUPP/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/essal/hV1lHJlq_XIJhUPP/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/essal/hV1lHJlq_XIJhUPP/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/essal/hV1lHJlq_XIJhUPP/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Collaborate in Real Time - Essal Developer Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Understand how Essal Office handles real-time collaborative editing, presence awareness, and conflict resolution.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Essal Developer Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://developers.essal.cloud/guides/office/collaborate-in-real-time\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://essal.mintlify.app/_mintlify/api/og/v2?division=App+Guides+%E2%80%94+Office\u0026amp;title=Collaborate+in+Real+Time\u0026amp;description=Understand+how+Essal+Office+handles+real-time+collaborative+editing%2C+presence+awareness%2C+and+conflict+resolution.\u0026amp;theme=d5c245af879c7f969a007e7d\u0026amp;signature=f93b8e055ee20cf65354448fe9af4e0c30c5390f2d7553ce42980f99b29a6c6a\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Collaborate in Real Time - Essal Developer Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Understand how Essal Office handles real-time collaborative editing, presence awareness, and conflict resolution.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://essal.mintlify.app/_mintlify/api/og/v2?division=App+Guides+%E2%80%94+Office\u0026amp;title=Collaborate+in+Real+Time\u0026amp;description=Understand+how+Essal+Office+handles+real-time+collaborative+editing%2C+presence+awareness%2C+and+conflict+resolution.\u0026amp;theme=d5c245af879c7f969a007e7d\u0026amp;signature=f93b8e055ee20cf65354448fe9af4e0c30c5390f2d7553ce42980f99b29a6c6a\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/essal/hV1lHJlq_XIJhUPP/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Essal Developer Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0066FF\">\u003clink data-mint-head rel=\"canonical\" href=\"https://developers.essal.cloud/guides/office/collaborate-in-real-time\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/guides/office/collaborate-in-real-time.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://developers.essal.cloud/#organization\",\"name\":\"Essal Developer Docs\",\"url\":\"https://developers.essal.cloud\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/essal/5qVV5p4Y6tAbM76k/logo/logo.svg?fit=max\u0026auto=format\u0026n=5qVV5p4Y6tAbM76k\u0026q=85\u0026s=706e0f6b7817c8a2af008f21830be42b\"}},{\"@type\":\"WebSite\",\"@id\":\"https://developers.essal.cloud#website\",\"name\":\"Essal Developer Docs\",\"url\":\"https://developers.essal.cloud\",\"publisher\":{\"@id\":\"https://developers.essal.cloud/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://developers.essal.cloud/guides/office/collaborate-in-real-time#webpage\",\"url\":\"https://developers.essal.cloud/guides/office/collaborate-in-real-time\",\"name\":\"Collaborate in Real Time\",\"description\":\"Understand how Essal Office handles real-time collaborative editing, presence awareness, and conflict resolution.\",\"dateModified\":\"2026-07-12T12:05:45.247Z\",\"isPartOf\":{\"@id\":\"https://developers.essal.cloud#website\"},\"breadcrumb\":{\"@id\":\"https://developers.essal.cloud/guides/office/collaborate-in-real-time#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://developers.essal.cloud/guides/office/collaborate-in-real-time#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"App Guides — Office\",\"item\":\"https://developers.essal.cloud/guides/office/create-document\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Collaborate in Real Time\",\"item\":\"https://developers.essal.cloud/guides/office/collaborate-in-real-time\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://developers.essal.cloud/guides/office/collaborate-in-real-time#article\",\"headline\":\"Collaborate in Real Time\",\"name\":\"Collaborate in Real Time\",\"description\":\"Understand how Essal Office handles real-time collaborative editing, presence awareness, and conflict resolution.\",\"url\":\"https://developers.essal.cloud/guides/office/collaborate-in-real-time\",\"mainEntityOfPage\":{\"@id\":\"https://developers.essal.cloud/guides/office/collaborate-in-real-time#webpage\"},\"dateModified\":\"2026-07-12T12:05:45.247Z\",\"publisher\":{\"@id\":\"https://developers.essal.cloud/#organization\"},\"isPartOf\":{\"@id\":\"https://developers.essal.cloud#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Essal Developer Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Essal Developer Docs","nav":{"global":null,"tabs":[{"tab":"Documentation","groups":[{"group":"Getting Started","pages":[{"title":"Introduction","href":"/introduction"},{"title":"Quickstart","href":"/getting-started/quickstart"},{"title":"Authentication","href":"/getting-started/authentication"},{"title":"Environments","href":"/getting-started/environments"},{"title":"Rate Limits","href":"/getting-started/rate-limits"}]},{"group":"Platform Concepts","pages":[{"title":"Workspaces","href":"/concepts/workspace"},{"title":"Apps","href":"/concepts/apps"},{"title":"Users \u0026 Roles","href":"/concepts/users-and-roles"},{"title":"Organizations","href":"/concepts/organizations"},{"title":"Data Model","href":"/concepts/data-model"},{"title":"Events","href":"/concepts/events"}]},{"group":"App Guides — Office","pages":[{"title":"Create a Document","description":"Learn how to create a document in Essal Office via the API, set permissions, and upload attachments.","href":"/guides/office/create-document"},{"title":"Collaborate in Real Time","href":"/guides/office/collaborate-in-real-time"},{"title":"Export Formats","description":"Export Essal Office documents to PDF, DOCX, XLSX, and other formats using the async export API.","href":"/guides/office/export-formats"}]},{"group":"App Guides — Access","pages":[{"title":"Set Up SSO","href":"/guides/access/setup-sso"},{"title":"Provision Users","href":"/guides/access/provision-users"},{"title":"Manage Directories","href":"/guides/access/manage-directories"}]},{"group":"App Guides — Sales","pages":[{"title":"Import Contacts","href":"/guides/sales/import-contacts"},{"title":"Manage Pipeline","href":"/guides/sales/manage-pipeline"},{"title":"Track Deals","href":"/guides/sales/track-deals"}]},{"group":"App Guides — Careers","pages":[{"title":"Post a Job","href":"/guides/careers/post-job"},{"title":"Review Applicants","href":"/guides/careers/review-applicants"},{"title":"Manage Hiring Pipeline","href":"/guides/careers/manage-pipeline"}]},{"group":"App Guides — Project","pages":[{"title":"Create a Project","href":"/guides/project/create-project"},{"title":"Manage Tasks","href":"/guides/project/manage-tasks"},{"title":"Track Time","href":"/guides/project/track-time"}]},{"group":"App Guides — Guard","pages":[{"title":"Configure Policies","href":"/guides/guard/configure-policies"},{"title":"View Audit Trail","href":"/guides/guard/view-audit-trail"},{"title":"Threat Alerts","href":"/guides/guard/threat-alerts"}]},{"group":"Integrations","pages":[{"title":"Integrations Overview","href":"/integrations/overview"},{"title":"Webhooks","href":"/integrations/webhooks"},{"title":"OAuth Apps","href":"/integrations/oauth-apps"},{"title":"SSO / SAML","href":"/integrations/sso-saml"},{"title":"Third-Party Integrations","href":"/integrations/third-party"}]},{"group":"Security \u0026 Compliance","pages":[{"title":"Data Privacy","href":"/security/data-privacy"},{"title":"Encryption","href":"/security/encryption"},{"title":"Audit Logs","href":"/security/audit-logs"},{"title":"IP Allowlisting","href":"/security/ip-allowlisting"}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/overview"}]},{"tab":"SDKs \u0026 Tools","pages":[{"title":"SDKs \u0026 Tools","href":"/sdks/overview"}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog/2026-07-01"}]},{"tab":"Support","pages":[{"title":"Support","href":"/support/status"}]}]},"basePath":"","title":"Collaborate in Real Time - Essal Developer Docs","buildId":"dpl_36EDyZCDfRuoUD9af5CH4M1bqY2h","deploymentId":"dpl_36EDyZCDfRuoUD9af5CH4M1bqY2h","dynamics":[],"chunks":[]}