Document Coding Best Practices

Doc Auto Team
Doc Auto Team
  • Updated
To become an expert in document coding, it takes time and practice. Add these tips and tricks to your toolkit to get there faster!
  • Use a familiar test entity: The better you know the data, the easier it will be to find the corresponding variables when you’re first starting out. Complete the missions here to learn how to create entities from scratch - make it fun by personalizing with your favourite pop culture references! A fan favourite at Athennian is taking details from the American legal drama 'Suits' - we've incorporate Pearson Specter Litt LLC many times when testing.
  • Populate your entity with diverse data: Having many different data scenarios to test means your document will perform well from record to record.
  • Master Document Generation Paths: Athennian supports over 40 distinct document generation paths. Using the correct path ensures the specific variables you need are assembled and available for your template.
  • Use the Developer’s Console: Use Console > DXT_Variables (look for the 🍋) to view the new Pristine (V3) variables. If you need Legacy (V2) variables, access them via the Network > Preview > Data tab. Check out this guide on Accessing Athennian Variables Using Developer Tools for more details.
  • Code for Modularity: Centralize your complex logic instead of repeating it across documents. Use custom Assignments (which must end in the ASG suffix) and store them in SubTemplates.
  • Watch Your Quotes: Copying and pasting text can accidentally insert curly quotes (), which will break your conditional logic. Always use straight single quotes (').
  • Master the Function Order: To evaluate correctly, functions must be stacked in the proper sequence: filters (like status or filter) > uniqBy > sorting (orderBy) > counting/limiting (count/limit/grab) > text formatting (like upper).
  • Keep calm and test on: Just because a template generates flawlessly with one entity doesn’t mean it will work for all. Rearrange your test data to make sure your document adapts to different circumstances!