3. Create and Configure a Document
For our scenario, we need a document that becomes part of a case as soon as a person would like to open a new account, or in other words, as soon as we deal with a contract and a person. On it we will place all the information necessary to open an account.
Let's start by first creating a new document and then configure it step by step:
We know what to do by now: We give the document a key and a name in order to create it. Let's write 'individual_account_opening_form' for the key and 'Form for opening an individual account' for the name.
In Atfinity, there are three document types. The PDF type uses an actual PDF-Form, which is uploaded, as a template. Information that has been collected in a case will be printed on the PDF-Form at the positions we defined. A Smart Document also prints the collected information. However, it only prints the information which is available and formats itself accordingly. A Group Documents is used to bundle several documents.
For our process, we choose Smart Document as document type.
Next we need to define a template for the smart document. It acts as the background on which the information will be printed.
We now have to specify under what condition the document should come into action. For our scenario, we write the following condition:
c is Contract
p is Person
This means that whenever we open an account and create a new contract with a person who is the account holder, the condition is met and all the information placed on the document will be asked.
So far we have a document which will come into action once we start a new account opening process. Now we need to make sure that we place the information we have created on that document. Only then will we be asked to provide the actual information like first and last name.
When we add a box to the document we choose it to be of type text. Every box we add needs a reference which points to the information we would like to have on the document. For our first information 'First Name', we write
pis an ontology reference and stands for 'Person', the ontology the information belongs to. We have defined it in the document condition. And
first_nameis the key of the information we are referring to.
Let's do the same for the other information 'Last Name' (
p.last_name) and 'Date of birth' (
That's it. Our document is now ready. Every time a person becomes part of a case, this document will become part of the case as well and all the information on it will be asked.