Sample data is test data used to preview how your templates will render with actual content. Use it to develop templates without live production data, test edge cases, share examples, and validate entities.
Prerequisites
- Understanding of Placeholders
- Basic knowledge of JSON (for the JSON editor path)
What is sample data?
Sample data allows you to:
- Develop templates without needing live production data
- Test edge cases with controlled data scenarios
- Share examples with team members
- Validate entities against realistic data structures
Sample data sets
Creating a sample data set
There are two ways to create sample data:
1. JSON Editor (Advanced)
For developers comfortable with JSON:
{
"user": {
"name": "John Doe",
"email": "[email protected]",
"role": "Senior Engineer"
},
"ticket": {
"id": "TICK-1234",
"title": "Fix login bug",
"priority": "High",
"status": "In Progress"
},
"tasks": [
{
"title": "Review code",
"assignee": "Alice",
"completed": true
},
{
"title": "Write tests",
"assignee": "Bob",
"completed": false
}
]
}
2. Form Editor (User-Friendly)
For non-developers or when using entities:
- Select an entity from the dropdown
- Form fields auto-populate based on entity schema
- Fill in values
- Add array items with “Add Item” buttons
- Nested objects handled automatically
Sample data properties
Each sample data set has:
- Name: Descriptive identifier (e.g., “Support Ticket Example”)
- Description: What this data represents and when to use it
- Data: The actual JSON data structure
- Visibility: Who can access this data set
- Created by: Original creator
- Created at: When it was created
Visibility options
Organization (Private)
- Only visible to your organization
- Default for new sample data sets
- Good for: Internal testing, confidential data structures
Community (Public)
- Shared across all platform users
- Can be copied by other organizations
- Good for: Examples, common patterns, templates to share
Using sample data with templates
Assigning sample data to a template
Method 1: In Template Editor
- Open your template
- Go to Data tab
- Select a sample data set from dropdown
- Or create new sample data inline
Method 2: Link multiple data sets
- Go to Sample Data page
- Click on a sample data set
- View linked templates
- Click “Link to Template” to connect
Switching sample data
While editing a template:
- Data tab shows current sample data set
- Dropdown lists all available sample data sets
- Select different set to see template with new data
- Changes are immediate in preview
Template-specific sample data
You can embed sample data directly in a template:
Pros: Self-contained, easy to export/share template with data.
Cons: Can’t reuse across multiple templates; harder to maintain if data structure changes.
When to use: Quick prototypes, one-off templates, templates with unique data structures.
Sample data best practices
1. Use realistic data
Good: Realistic and representative
{
"expense": {
"amount": 1234.56,
"category": "Travel",
"merchant": "United Airlines",
"date": "2024-01-15",
"receipt_url": "https://example.com/receipts/001.pdf"
}
}
Bad: Placeholder data
{
"expense": {
"amount": 123,
"category": "test",
"merchant": "foo",
"date": "date",
"receipt_url": "url"
}
}
2. Cover edge cases
Create multiple sample data sets for different scenarios:
Happy path: status: "approved", approver set, notes present.
Error case: status: "rejected", approver set, rejection notes.
Edge case: status: "pending", approver null, empty notes.
3. Use arrays with multiple items
Test directive loops with realistic array sizes; include enough items to exercise maxBlocks behavior when relevant.
Pre-format data for display when it helps (e.g. currency strings, readable dates, status labels).
5. Document your data structure
Use the description field to explain the structure (required vs optional fields, array shapes, nested objects).
Entity-based sample data
Entities provide structure and validation for sample data. Define an entity (e.g. “Expense” with fields and types), then create sample data from it in the form editor so validation and type checking are automatic. Use the same entity across templates for consistency.
See Entities for defining and attaching entities to templates and sample data.
- Finding: Sample Data page → Community Data tab; browse or filter by category.
- Using: Click a community data set → Copy to My Data → edit as needed; it is then owned by your organization.
- Sharing: Edit visibility to “Community”, add a clear description and usage examples.
Managing sample data
Editing sample data
- Go to Sample Data page
- Click on the data set name
- Click Edit
- Modify data, description, or visibility
- Click Save
Editing sample data affects all templates using it.
Deleting sample data
- Find the data set in Sample Data page
- Click delete icon (trash can)
- Confirm deletion
Before deleting: check Templates Using This Data, unlink or reassign templates if needed, and export data if you might need it later.
Duplicating sample data
View existing set → Duplicate → give it a new name → modify the copy. Useful for test vs production versions or organization-specific variants of community data.
Exporting and importing
- Export: View sample data set → Export JSON; use for backup, sharing, or version control.
- Import: Sample Data → Create Sample Data → JSON editor → paste exported JSON → update name and description → Save.
You can also extract sample data from existing templates and save as reusable sets.
Next steps