Template Creation Tutorial
Learn how to create document processing templates using Parselyze's visual template editor. Templates define what data to extract from your documents and are required for API usage.
Templates must be created through the web interface before you can use them with the API. This tutorial will guide you through the process step by step.
What You'll Learn
- How to create a new template from scratch
- Configure template fields with various data types
- Work with nested fields and arrays
- Test your template with sample documents
- Get your template ID for API usage
Prerequisites
- A Parselyze account
- Access to the web dashboard
- Sample documents to test your template
Step 1: Access the Template Editor
- Log in to your Parselyze account
- Navigate to the "Dashboard"
- Click "Create Template" button
You'll see the template creation interface with a comprehensive progress indicator showing your completion status across different areas.
Step 2: Template Information
Basic Configuration
Template Name (Required)
- Enter a descriptive name for your template
- Example: "Standard Invoice Template" or "Medical Report Processing"
- This helps you identify the template later and appears in the marketplace
Category Selection (Required) Choose the appropriate category for your document type:
- Invoice - For invoices and billing documents
- Receipt - For receipts and payment confirmations
- ID Document - For identity documents and cards
- Contract - For contracts and agreements
- Medical Record - For medical documents and reports
- Resume - For CV and resume processing
- Custom - For specialized document types
Description (Optional but Recommended) Add a description to help others understand:
- What this template is for
- When to use it
- Any special considerations
- Example use cases
Step 3: Template Fields
This is the core of your template - defining what data to extract from documents.
Adding Fields
- Click "Add field" to create a new extraction field
- Configure each field using the expandable field editor
- Use the Guide button for detailed field configuration help
Field Configuration
Each field can be configured with these options:
Basic Field Properties
Field Name (Required)
- Unique identifier for the data (e.g., "invoice_number", "total_amount")
- Use descriptive names that make sense for your API consumers
- Avoid spaces and special characters
Field Type (Required) Choose the appropriate data type:
- String - For text data like names, addresses, descriptions
- Number - For numerical values like amounts, quantities, IDs
- Date - For dates and timestamps
- Boolean - For yes/no, true/false values
- Object - For nested data structures
- Array - For lists of items (like invoice line items)
Description (Optional)
- Explain what this field represents
- Provide examples of expected values
- Document any special formatting requirements
Advanced Field Types
Object Fields For complex data structures containing multiple sub-fields:
- Select "Object" as the field type
- Add nested fields using the "Add property" button
- Configure each sub-field with its own type and properties
- Example: Customer information with name, address, and contact details
Array Fields For lists of similar items:
- Select "Array" as the field type
- Choose the array item type (string, number, date, boolean, or object)
- For object arrays, define the structure of each item
- Example: Invoice line items with product, quantity, and price
Field Management
Field Actions Each field provides several management options:
- Duplicate - Copy field configuration for similar fields
- Reset - Restore field to default values
- Delete - Remove field from template
Step 4: Template Preview
The preview section provides real-time feedback on your template:

Step 5: Testing Your Template
Sample Data Generation
The system automatically generates sample data based on your field configuration:
- Preview the expected JSON output structure
- Validate field types and nested structures
- Ensure the template meets your requirements
Template Testing
- Review the generated sample to verify structure
- Check field types and nesting levels
- Validate required fields are properly configured
- Test with actual documents using the API once saved
Live Testing
Premium users can test their templates directly within the editor without consuming their API quota. This allows you to validate your template's accuracy before deploying it in production. See Template Testing documentation for detailed instructions.
Step 6: Saving and Using Your Template
Save Your Template
- Click "Create" (for new templates) or "Update" (for existing ones)
- Template ID will be generated automatically
- Copy the Template ID using the "Copy ID" button
API Integration
Template Management
- Edit templates anytime from the Templates list
- Delete templates you no longer need
- Share templates with the community via the Publish feature
Best Practices
Field Naming
- Use clear, descriptive names
- Follow consistent naming conventions
- Avoid spaces and special characters
- Use snake_case or camelCase
Template Organization
- Group related fields logically
- Use objects for complex data structures
- Leverage arrays for repeated items
- Keep the structure intuitive
Testing and Validation
- Test with multiple document samples
- Validate all field types work correctly
- Ensure required fields are properly marked
- Check nested structures are complete
Marketplace Sharing
- Write comprehensive descriptions
- Include usage examples
- Follow naming best practices
- Test thoroughly before publishing
Troubleshooting
Common Issues
Template Not Saving
- Check all required fields are filled
- Verify field names are unique
- Ensure valid data types are selected
API Integration Problems
- Confirm template ID is correct
- Check API key permissions
- Verify document format compatibility
Field Configuration Errors
- Review field type selections
- Check nested field structures
- Validate array item types
Getting Help
- Use the Guide button in the template editor for contextual help
- Review template examples in the marketplace
- Check the API documentation for integration details
- Contact support for complex template requirements
Next Steps
- Explore the Template Marketplace to discover ready-to-use templates
- Learn about Template Publishing to share your templates with the community
- Review Template Testing for advanced testing techniques
Templates are the foundation of successful document processing with Parselyze. Take time to design them thoughtfully for the best results.