Assignment Rule is the object to help with Templates assignments. This configuration define conditions, by which appropriate documents will be generated for given data.

Assignment Rules allow to generate documents manually (using a button) and automatically (implemented in trigger logic). This approach should be set in Assignment Context field.

As System Administrator open ‘Assignment Rules’ tab and click ‘New’ button.

Choose template, for which assignment rule should be created. Select assignemnt context. Optionally, add description for rule. Click ‘Save’.

Under section ‘Conditions’ define logic to filter Template in generation process. 

Click ‘Save’ to save conditions.

If Admin will not define any condition, rule will assign template to all processed records.