Search

May 30, 2025

ElseIf

In legal document automation, many clauses depend on the answers given by the user in the interview. Jurisdiction, party roles, matter types, and fee arrangements often require the insertion of specific clauses or wording. In cases where only one outcome applies, XpressDox’s ElseIf command is a simple but powerful way to structure that logic.

Instead of writing multiple separate If statements, ElseIf allows you to write clear, linear rules that are easy to read, maintain, and expand. Below are a few practical legal use cases where ElseIf is particularly effective, with a single End command!

 

Use Case 1: Governing Law Clause Selection

Many legal agreements require the governing law clause to reflect the jurisdiction chosen by the parties. Since only one jurisdiction applies, ElseIf is ideal for this situation.

«If(Jurisdiction = "Delaware")»
This Agreement shall be governed by and construed in accordance with the laws of the State of Delaware.
«ElseIf(Jurisdiction = "New York")»
This Agreement shall be governed by and construed in accordance with the laws of the State of New York.
«ElseIf(Jurisdiction = "California")»
This Agreement shall be governed by and construed in accordance with the laws of the State of California.
«Else()»
This Agreement shall be governed by and construed in accordance with the applicable laws.
«End()»

 

Use Case 2: Signature blocks

Signature blocks can change depending on both the entity type and the role of the person signing. Whilst it may sometimes be unavoidable, ElseIf allows you to handle these combinations without nesting multiple If statements unnecessarily.

«If(EntityType = "Company")»

Signed for and on behalf of «CompanyName»
«If(SignatoryCapacity = "Director")»
By: ______________________  
Director
«ElseIf(SignatoryCapacity = "Authorized Signatory")»

By: ______________________  
Authorized Signatory
«Else()»
By: ______________________  
Authorized Representative
«End()»
«ElseIf(EntityType = "Trust")»
Signed by «TrusteeName» in his/her capacity as «SignatoryCapacity» of the «TrustName»
By: ______________________

«ElseIf(EntityType = "Individual")»
Signed by «IndividualName»
By: ______________________


«End()»

 

Use Case 3: Fee Schedule Based on Matter Type

Engagement letters often include different fee structures depending on the type of matter. ElseIf simplifies the logic for inserting the correct fee wording.


«If(MatterType = "Litigation")»
Our professional fees for litigation matters are charged at an hourly rate of $350.

«ElseIf(MatterType = "Conveyancing")»
For conveyancing transactions, our fees are calculated as a fixed amount of $1,500 per transaction.

«ElseIf(MatterType = "Family Law")»
For family law matters, we charge a retainer of $5,000, with additional fees billed monthly.

«Else()»
Our fees will be discussed and agreed upon based on the nature of your matter.
«End()»

 

Rule of Thumb: When to Use ElseIf vs Nested If

  • Use ElseIf when conditions are mutually exclusive i.e. only one applies.
  • Use nested If when conditions are dependent i.e. one condition must be true before evaluating another.
  • ElseIf makes your template logic more maintainable and easier for future authors to understand.

 

 

Conclusion

The ElseIf command is a simple, effective tool for many document automation scenarios. It keeps your XpressDox templates clean, logical, and scalable, particularly when only one clause or wording option should appear based on the user’s input. Mastering ElseIf allows you to handle a wide variety of legal drafting situations with ease and confidence.

 

Note that this feature is available from v16 onwards.