One moment please...
 
 
Exact Synergy Enterprise   
 

DocumentFlow service in Exact Synergy Enterprise

Introduction

The mobile version of Exact Synergy Enterprise uses the DocumentFlow web service for document functionality. This webservice provides better service to support security, customisation and enable document functionality in the mobile app. The following operations are available:

What version are you using?

The information in this document is based on product update 266.

Roles and rights

Not applicable.

Technical information

The DocumentFlow web service uses the following targets:

  • Exact.Services.REST.ESE.Shared.dll
  • Exact.Services.REST.ESE.DocumentFlow.dll
  • Exact.DocumentFlow.dll
  • Exact.DocumentFlow.data.dll
  • Exact.DocumentFlow.REST.svc (Services folder)

These are used as follows:

API usage and support

General

All service calls start with the endpoint services/Exact.DocumentFlow.REST.svc, are of type POST and have the following headers:

  • Content-Type : application/json;odata=verbose
  • Accept : application/json;odata=verbose
  • DataServiceVersion : 3.0

OpenNew

The OpenNew service can be called to create a default document with prefilled values based on the document type. It will also fill up the required fields with properties so the document can be initialized for use. Details of this service as follows:

URL: http://<synergyUrl>/services/Exact.DocumentFlow.REST.svc/OpenNew

Body:

{"InputMessage":{"DocumentType":29}}

DocumentType here is the action input parameter. Based on this value, the available fields, default values, etc. are returned.

Output: Expected return is the pre-filled document or an exception in case user is not allowed to create the document with that particular document type. The following structure is expected:

  • Action (all available actions in this state)
    • results - [Action], Name and Caption
  • DocumentHeader (contains all document-related info)
  • Document (List of document Fields)
    • results - [Document field] : data such as rights, caption, type (string, integer, boolean, etc.), selection options, browser info, etc.

RetrieveAll

The RetrieveAll service can be called to retrieve properties of an existing document. It returns a list of possible actions, such as 'Save', 'Draft', 'Checkin', 'Checkout', etc. It also returns whether the user has rights to view the document. Details of this service as follows:

URL: http://<synergyUrl>/services/Exact.DocumentFlow.REST.svc/RetrieveAll

Body:

{"InputMessage":{"DocumentID":"575ef7ab-cf75-4bbd-899d-e2394ee5dd40"}}

DocumentID is the ID number of the document to be retrieved.

Output: Expected return is the document information. The following structure is expected:

  • Action (all available actions in this state)
    • results - [Action], Name and Caption
  • DocumentHeader (contains all document-related info)
  • Document (List of document Fields)
    • results - [Document field] : data such as rights, caption, type (string, integer, boolean, etc.), selection options, browser info, etc.

Action

The Action service can be used together with OpenNew and RetrieveAll. Details of this service as follows:

URL: http://<synergyUrl>/services/Exact.DocumentFlow.REST.svc/Action

Body: This starts with

{"Name": "<Action>","InputMessage":[]}

Based on the Action used, different parameters are added. For example, if a Save operation is used, the following structure is added in the array:

{"Name": "<FieldName","Value": "<Value"}

As a result, the complete structure of the above example can be:

{"Name": "Save","InputMessage":[{"Name": "ID","DataType": "Guid","Value": "<Value"},{"Name": "ProjectNumber","Value": "PSA"}]}

Browse

The Browse service can be called to retrieve browser results of various document fields. Details of this service as follows:

URL: http://<synergyUrl>/services/Exact.DocumentFlow.REST.svc/Browse

Body:

{
"BatchSize": 20,
"LeadingFieldsValues": [],
"SearchColumns": [],
"PropertyName": "LanguageID",
"DocumentType": 2,
"SessionID": 0,
"DocumentID": "8ed1db22-7d62-4ec7-81df-933234d3d9a9"
}

Following are more details on the parameters:

  • BatchSize: This tells the service how many rows to return.
  • LeadingFieldsValues: This informs the server whether the browser field has dependency on another field. For example, if you browse on a contact, a leading field can be the AccountID.
  • SearchColumns: This provides the filter criteria to the browser to filter on the browse result.
  • PropertyName: This must match a FieldName in the document definition which you have retrieved with an OpenNew or a RetrieveAll.
  • DocumentType: The ID of the document type.
  • SessionID: This can be used for paging. If you fill in a SessionID, the server knows which page to return.
  • DocumentID: This must be provided to tell which document we are browsing a Field on.

     
 Main Category: Attachments & notes  Document Type: Online help main
 Category:  Security  level: All - 0
 Sub category:  Document ID: 30.495.054
 Assortment:  Date: 11-01-2022
 Release:  Attachment:
 Disclaimer