Not applicable
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:
The information in this document is based on product update 500.
The following targets are used:
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.
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.
This contains the data contract of the AccountFlow service.
This contains the AccountFlow actions that defines the security and it is where the meta data and values of the account will come from.
The API can be tested with a REST client. The RequestFlowClient.exe now also supports the AccountFlow webservice.
Currently, the following calls are supported:
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
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:
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):
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"}]}.
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.