Open navigation

Configure the Aico document template for staging

Modified on Tue, 18 Feb at 10:44 AM

When the staging process creates the Aico documents from the customer data sent through the staging API, you must define which Aico document template should be used. This is defined in the staging client (described below) however you must first configure the Aico document template to behave in the desired way for those documents to be created correctly.  All the existing functionality of an Aico document template will still work in the normal way. For example, if you have configured a header to be set using a formula, then this will still run even when the document is created from the staging process. 


Some of the key considerations here include:

  1. Which headers and rows are going to receive data from the staging process
  2. Typically these will be those that a User would have to enter if the document was being created manually.
  3. Are certain headers or rows mandatory in which case is it mandatory to send the data through the API ?
  4. Should the document pass certain “minimal” validations in order to be successfully saved.
  5. Do you want to send the document forward in the workflow once it has been created via the staging service. 


Modification and validation tasks

The staging process uses a new action event type called Staging Import which the staging process will run when it is trying to save Aico documents from the staging “data”. It will first run any modification tasks and then any validation tasks that are configured in this action event type. 


Where the Aico document passes the validation tasks it is saved as a VALID document, where it fails the validation tasks it is saved as an INVALID document. Note however that to be saved as an invalid document the staging client must be configured to allow the saving of invalid documents. See the configure staging clients section below. 


Workflow

Once the Aico document is saved it is in the “Created” workflow status and you can configure that the staging process then sends it forward in the workflow.  For example you might say that it should be sent to the approval phase in which case it would be set as Waiting for approval.  It is important to understand that, when sending it through the workflow the system user will be the actor on the document and it will run all modification AND validation tasks that you have configured on each workflow phase.  


If the document fails any of the subsequent validations configured on any interim phases then the workflow will stop at the last workflow status prior to the failure. For example, if you have asked for the document to be sent to Approval 2 and the modifications or validations fail on Send to Approver 2 then the document will remain in Waiting for Approval (Approver 1). 


If you have allowed the saving of invalid documents this ONLY relates to the staging import validations. Invalid documents will be saved in the Created status and no workflow actions will be attempted on these invalid documents.


The Target Workflow Phase is determined by setting the target value in the “targetWorkflowPhase” header which will be evaluated by the staging process when it is run.  This header can be setting using any of the normal techniques (e.g. a formula or a modification task).  You can also map this in the client and send the target value as part of the data being sent via the staging API. 


The Target Workflow Phase is an integer and should be set with a value between 0 and 7.  


 

ValueWorkflow phaseWorkflow status
0CreationCreated
1PreparationWaiting for preparer
2Approval 1Waiting for approval
3Approval 2Waiting for second approval
4Approver 3Waiting for third approval
5HandlingWaiting for handler
6Not usedNot used
7CompletionCompleted



If this value is not set then it will use the default set on the client (see below) and if it is empty it will assume 0 and set a status message. 


Transfer

The transfer will be triggered based on the template configuration i.e. you do not explicitly tell the staging service when to start the transfer.  The transfer will follow the configuration and it will check for the last opportunity to transfer the document based on which roles have the transfer right and whether Auto transfer after final approval is configured on the integration.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article