How to write Document and Proof Rules


By attaching conditions to documents, document sections and proofs, you configure them in such a way that atfinity will ask what needs to be asked, while omitting what can be left out, to guarantee efficiency.


The conditions you set on documents and proofs use boolean logic. If a condition evaluates to 'true', the document or request for proof it relates to will be included in the case, where its fields need to be filled out.

A condition for documents and proofs consists of:


A US citizen wants to open an account at a German bank. The bank's rules state US citizens have to fill out a W9 form to complete the onboarding process.

To make sure this happens, while configuring atfinity, attach this condition to the W9:

ah is AccountHolder, Person
ah.us_person = true

The declaration on line 1 makes the W9 form relevant to account holders who are persons. So the form will not necessarily appear when a US company asks the German bank to open an account.

The expression on line 2 makes sure the W9 form will show up in the system when the condition that the account holder is a 'us_person' is true.

Document Sections

Attach conditions to certain sections of a document, so these sections do not clutter a document when they are not relevant to the case.

A condition for a document section only consists of:

The expression follows boolean logic: if what it describes is true, the section is included on the document. If it is false, the section is omitted. You can only use variables that have previously been declared in the document condition.


p.is_employed = true

This expression is added to the Document Section 'Employer Information'. It ensures the section will only be included when the person this document is about is employed.


Writing the condition for proofs follows the same path as conditions for Documents.


A Swiss bank requires clients who live in Switzerland, but do not have the Swiss nationality, to provide a residency permit as proof they are living in the country legally.

The condition that guarantees this request for proof of legal residency shows up when required, is:

ah is AccountHolder, Person
not ah.nationalities contains ch
ah.domicile = ch

Line 1 holds the declaration, that this request for proof applies to account holders who are persons.

The expression on line 2 makes the request for proof apply only if the accountholder's nationality is not given as 'ch', the country code for Switzerland.

Finally, on line 4 the expression sets the final condition: only if the account holder (who is a person, not of Swiss nationality) has their domicile in 'ch', will the application request for the proof to which these conditions were attached - in this case, a valid residence permit.

The use of the operator and on line 3 means that both elements in the condition have to be 'true', in order for the proof to be requested in the case.