SoProtocol
SOProtocol is a standard for defining URL short-cuts to SuperOffice entities. It lets you control the user interface without scripting and send users directly to the desired screen.
Why use SoProtocol
- No scripting is needed, although scripts can invoke an soprotocol URL.
- Works with the integrated web browser (webpages can control the CRM client user interface).
- Works with both web and Windows (legacy) clients.
- Security, it's primarily for navigation and cannot write data into the database.
How is an SoProtocol URL defined
SOProtocol URLs have multiple parts, and can be either opened:
Directly in the browser:
https://{{environment}}.superoffice.com/{{tenant}}/default.aspx?{{WHERE}}?{{WHAT}}
invoker through a script:
soprotocol:{{WHERE}}?{{WHAT}}
Through a JavaScript with
postMessage({ command: "soprotocol", arguments: "{{WHERE}}?{{WHAT}}" })
The {{WHERE}}
tells SuperOffice which page to display, and what tabs to select. See the SoProtocol targets reference for a list of soprotocol targets.
The {{WHAT}}
tells SuperOffice what data to display on the page, such as a specific contact or project by ID.
Examples:
https://{{environment}}.superoffice.com/{{tenant}}/default.aspx?target-screen.upper-tab.lower-tab.mini-card?[entity]_id=id
soprotocol:target-screen.upper-tab.lower-tab.mini-card?[entity]_id=id
postMessage({ command: "soprotocol", arguments: "target-screen.upper-tab.lower-tab.mini-card?[entity]_id=id" })
SoProtocol and SuperState
SoProtocol drives the SuperState, meaning when you set an [entity]_id equal to a value, the current representation of that entity is set by the ID. The SuperState is defined by the SoProtocol URL together with the values of SuperState history. If no SoProtocol is given, the last valid SuperState history will be used.
Find current state
To get the SOProtocol link that reflects the current state of the application, use the browser's address bar to view the current page information and copy the address. Alternatively, use the Copy Shortcut option in the Task button when available to get the current SoProtocol.
SCIL
Working with soprotocol
in SCIL-pages are similar to the old pagebuilder
, so existing soprotocol-requests should still work. The only exception is [dialog=...]
, which is deprecated and will no longer have any effect.
CrossMessaging
To simplify executing soprotocol
through a webpanel hosted inside of SuperOffice, there is a helper-library on GitHub that can be used by developers. Under the hood this uses postMessage({ command: "", arguments: "" })
.