One moment please...
 
Exact Synergy Enterprise   
 

AccountFlow service in Exact Synergy Enterprise

Menu path

Not applicable

Introduction

The AccountFlow service can be used to support extended functionalities for accounts. The architecture and structure is based on the existing RequestFlow service, which supports requests in the Mobile Apps. We support the following in the AccountFlow service:

  • View mode (Retrieve All)
  • Open new with default values
  • Actions - Save, Delete, and UploadPicture
  • Browse

What version are you using?

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

Roles and rights

Not applicable

Technical information

Targets

The following targets are used:

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

Exact.Services.REST.ESE.Shared

This is needed to keep the shared logic which is currently used in Exact.Service.REST.ESE.Requestflow, Exact.Services.REST.ESE.Documentflow, and Exact.Services.Accountflow. All the shared logic of these targets is located here.

Globally, this target contains the scaffolding, for instance oData Linq, to support the base logic of the Data Service and the update provider.

Exact.Services.REST.ESE.Accountflow

This contains the AccountFlow logic and uses OpenNew, Retrieveall, and Action (currently only available for save, and delete) service endpoints. It is based on (inherits) the Exact.Services.REST.ESE.Shared target.

Exact.Accountflow.data.dll

This contains the data contract of the AccountFlow service.

Exact.Accountflow.dll

This contains the AccountFlow actions that defines the security and it is where the meta data and values of the account will come from.

API Usage and support

The API can be tested with a REST client. The RequestFlowClient.exe now also supports the AccountFlow webservice.

Currently, the following calls are supported:

  • OpenNew
  • RetrieveAll
  • Action

General

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

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

  • Accept: application/json;odata=verbose

  • DataServiceVersion: 3.0

OpenNew

This can be used to open an account with pre-filled values and all the fields with properties so the account can be used in a new state.

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

Body: {"InputMessage":{"AccountType":"C"}}

Here, the AccountType field is the action input parameter. Based on the AccountType value, the available fields, default values, and others are returned.

Output: The pre-filled account or an exception in case the user is not allowed to create the account with that particular account type.

It has the following structure:

  • Actions (all available actions in this state).
    • results - [Action], Name and Caption.
  • Header (contains generic account related information such as created, modified, type, and others).
  • Fields (list of the account fields).
    • results - [List of Field]: data such as rights, caption, type (string, integer, boolean, and others), selection options, browser information.
  • Addresses - For each address type, it may consist various fields including Line1(Field), Line2(Field), Line3Field, PostalCode, City, County, Country, and State.
  • Monitors - For every monitor, it states whether it is visible or not. Based on this, you can configure whether to show or hide monitors in an app.

RetrieveAll

This can be used to open an existing account. It gives you a list with possible actions such as Save, and Delete. It also returns whether the user has rights to view the account.

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

Body: {"InputMessage":"AccountID":<GUID>} where AccountID is the ID of the account to be retrieved.

Output: This is the account information with the following structure (similar to OpenNew):

  • Actions (all the available actions in this state).
  • Header (contains all the account related information).
  • Fields (list of the account fields) data such as rights, caption, type (string, integer, boolean, and others), and selection options such as browser information.
  • Addresses: List of address types with the linked fields such as line1, line2, city, country, and others.
  • Monitors: List of monitors and whether these should be displayed or not.

Actions

This can be executed based on the following:

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

Body: starts with {"Name": "<Action>","InputMessage":[]}.

Based on the action, different fields are added.

To save, you have to add the structure in an array: {"Name": "<FieldName","Value": "<Value"}.

To save the full body, you can use {"Name": "Save","InputMessage":[{"Name": "ID","DataType": "Guid","Value": "<Value"},{"Name": "FirstName","Value": "Jan"}]}.

Browse

This is a special action which has the following structure:

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

BODY:

{
"BatchSize": 20,
"LeadingFieldsValues": [],
"SearchColumns": [],
"PropertyName": "Manager",
"AccountType": "C",
"SessionID": 0,
"AccountID": "<GUID>",
}

The BatchSize value is to let the service know how many rows to return.

The LeadingFieldsValues are fields which are related. For example, if you browse on a cost centre, the leading field can be the division.

The PropertyName value must match a FieldName value in the account definition which you have retrieved with OpenNew or RetrieveAll call.

The SessionID value can be used for paging. If you fill in the SessionID field, the server knows which page to return.

The AccountID value must be provided so that we know which field of the account we are browsing.

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