API integration


About integration

You can integrate your system with the WorkZone for Office add-in, access the existing files, and create new documents via the API. To do this, you must use the wzfo.integration.js javascript module. The module includes asynchronous methods that return jQuery promises. Use the promises to track the status of asynchronous operations.

When you install the WorkZone for Office Server, the installer adds the wzfo.integration.js file to the WorkZone Server.


Available API methods

Method Description
initialize

Optional method. Determines language settings of the integration module. It receives the cultureName argument in the format like da-DK or da.

isWordEnabled

Returns true if Microsoft Word and WorkZone for Office add-in for Word are installed. Otherwise, the method returns false.

isExcelEnabled

Returns true if Microsoft Excel and WorkZone for Office add-in for Excel are installed. Otherwise, the method returns false.

isPowerpointEnabled

Returns true if Microsoft PowerPoint and WorkZone for Office add-in for PowerPoint are installed. Otherwise, returns false.

isOutlookEnabled

Returns true if Microsoft Outlook and WorkZone for Office add-in for Outlook are installed. Otherwise, returns false.

openEmail

Opens a requested email. This method requires WorkZone record Id.

{recordId:<id>}

replyDocument

Creates a new Microsoft Word document that is linked to an existing document. This method requires a document ID of the existing document.

{recordId:<id>}

createEmail

Creates a new email with the following parameters:

  • Subject
  • Body
  • Recipients:
    • To
    • Cc
    • Bcc.

    {Subject:"<Test subject>",Body:"<test body>",
    Recipients:{To:"<to@lmdom.local>",
    Cc:"<cc@lmdom.local>",Bcc:"<bcc@lmdom.local>"}}

attachDocuments

Creates a new email with an attachment. This method requires the following parameters:

  • ids – Specify the IDs of the documents that must be attached to this email.
  • asPdf – This defines the file format of the attached files. Set this parameter to false to attach the documents in the original file format. Set this parameter to true to attach the documents as PDF files.

If there is no PDF file of the requested document on the server, neither the PDF nor the original file will be attached.

{ids:[<id>,<id>],asPdf:false}

createProcessOverviewFolder

Creates a new folder in Microsoft Outlook. This folder is located in Process Views -> My Views. This method requires the following parameters:

  • name – Specify a name for the new folder.
  • folderUrl – Specify an address for the content to be displayed in the folder.

{name:"<name>",folderUrl:"<URL>"}