Triggering Document Actions using Web Applications

This section explains how external web applications can trigger document actions within the DeskClient.

If an external web application is integrated in the DeskClient via 'Tools' (see here) or browser tab (see here), hyperlinks in the format <a "sophora://..."> will trigger (document) actions within it. The following actions also work within the preview view of a document inside the DeskClient.

Triggering the Document Actions

These URIs are only working when the page is called within a browser in the DeskClient. Technically the DeskClient's browser implementation intercepts URIs starting with the prefix sophora:// and performs the action defined by the URI's suffix. The following table shows all currently available actions. If an error occurs because invalid parameters were passed, an exception is thrown. If an error occurs while performing the action, an error dialog is displayed.

URIParametersActionExample
sophora://document/openInEditoruuid: The UUID of the document to be opened in the editor.Opens a document in the DeskClient's editor.sophora://document/openInEditor?uuid=d70df790-17f1-44e2-b052-997235f6f7a5
sophora://document/publishuuid: The UUID of the document to publish.Publishes a document.sophora://document/publish?uuid=d70df790-17f1-44e2-b052-997235f6f7a5
sophora://document/deleteuuid: The UUID of the document to delete.Deletes a document without showing a confirmation dialog.sophora://document/delete?uuid=d70df790-17f1-44e2-b052-997235f6f7a5
sophora://document/setPropertyuuid: The UUID of the document the specified property should be set to.
property: The name of the property which should be set.
value: The value which should be set for the passed property.
publishImmediately: Defines whether document should be published immediately after property was set. Allows 'true' or 'false'. Optional, default is 'false'.
Sets value to property of the specified document. Additionally, the document can be re-published if it was published before, has no working version and publishImmediately is set to 'true'.

Please note: The property can only be modified when the document is not locked by a user. A dialog may appear asking you to break the lock prior modification of the property.
sophora://document/setProperty?uuid=0c03b298-3e68-47e6-9a0f-c4b84887b3ba&property=sophora:teletextText
&value=test&publishImmediately=true
sophora://document/
registerForDocumentChanged
uuid: The UUID of the document to register for.
remove: Whether to add or remove registration. Allows 'true' or 'false'. Optional, default is 'false'.
Allows to register for "document changed" events. To use, call this URL with remove=false. You must implement the following JavaScript function in your page, which is invoked whenever a document change occurs:

function
sophora_documentChanged(uuid, stateChange)
{
// ... do something...
}
sophora://document/registerForDocumentChanged?uuid=d70df790-17f1-44e2-b052-997235f6f7a5