Business Entity with Custom UI Component - Organisation Profile
Description
This entity demonstrates the integration of custom UI components within entity definitions. The Organisation entity shows how to incorporate specialized input components like ABN (Australian Business Number) lookup, handle image uploads for branding, manage social media links, and establish multiple one-to-many relationships. The custom ABN lookup component provides real-time validation and business information retrieval from external services, showcasing how Stack9 can integrate specialized business logic into form fields.
Use Case
Used in a membership and recruitment platform for the landscaping industry to manage organization profiles. Companies can maintain their business information, upload logos, track membership applications, and create business profiles for different service offerings. The ABN lookup ensures valid business registration and auto-populates company information.
Key Features
- Custom UI component for ABN lookup with external validation
- Image upload field with multiple format support for company logos
- Multiple one-to-many relationships (business profiles, membership applications)
- Boolean flag for membership status tracking
- Social media profile field management
- Indexed fields for improved search performance
- Public file access for company logos
JSON Definition
{
"head": {
"name": "Organisation",
"key": "organisation",
"pluralisedName": "Organisations",
"allowComments": true,
"allowTasks": true,
"isActive": true
},
"fields": [
{
"label": "Company name",
"key": "company_name",
"placeholder": "",
"description": "Legal registered company name",
"validateRules": {
"required": true,
"minLength": 1,
"maxLength": 255
},
"index": true,
"behaviourOptions": {},
"typeOptions": {},
"type": "TextField"
},
{
"label": "Trading name",
"key": "trading_name",
"placeholder": "",
"description": "Optional trading name",
"validateRules": {
"required": false,
"minLength": 0,
"maxLength": 255
},
"index": true,
"behaviourOptions": {},
"typeOptions": {},
"type": "TextField"
},
{
"label": "ABN",
"key": "abn",
"description": "Australian Business Number",
"validateRules": {
"required": true,
"maxLength": 11
},
"behaviourOptions": {},
"typeOptions": {
"component": "ABNLookupInput"
},
"type": "CustomUIComponent"
},
{
"label": "Email",
"key": "email",
"description": "Primary contact email",
"validateRules": {
"required": true
},
"index": true,
"behaviourOptions": {},
"typeOptions": {},
"type": "TextField"
},
{
"label": "Company Logo",
"key": "company_logo",
"placeholder": "Your Company Logo",
"description": "Add a company logo to boost brand authority, improve user trust.",
"validateRules": {},
"behaviourOptions": {},
"typeOptions": {
"accept": [
"image/*",
"image/jpg",
"image/jpeg",
"image/png",
"image/webp",
"image/heic",
"image/svg+xml",
"image/bmp",
"image/tiff",
"image/x-jp2"
],
"isPublic": true
},
"type": "FileField"
},
{
"label": "Website",
"key": "website",
"description": "Company website",
"validateRules": {},
"behaviourOptions": {},
"typeOptions": {},
"type": "TextField"
},
{
"label": "Facebook",
"key": "facebook",
"description": "Facebook profile",
"validateRules": {},
"behaviourOptions": {},
"typeOptions": {},
"type": "TextField"
},
{
"label": "Instagram",
"key": "instagram",
"description": "Instagram profile",
"validateRules": {},
"behaviourOptions": {},
"typeOptions": {},
"type": "TextField"
},
{
"label": "Is active",
"key": "is_active",
"description": "Current membership status",
"validateRules": {
"required": false
},
"behaviourOptions": {},
"type": "Checkbox"
},
{
"label": "Business profiles",
"key": "business_profiles",
"validateRules": {},
"behaviourOptions": {},
"relationshipOptions": {
"ref": "business_profile"
},
"typeOptions": {
"relationshipField": "organisation_id"
},
"type": "Grid"
},
{
"label": "Membership applications",
"key": "membership_applications",
"validateRules": {},
"behaviourOptions": {},
"relationshipOptions": {
"ref": "membership_application"
},
"typeOptions": {
"relationshipField": "organisation_id"
},
"type": "Grid"
}
],
"hooks": []
}
Notes
- The CustomUIComponent type allows integration of React components for specialized functionality
- The ABNLookupInput component provides real-time validation against Australian business registries
- Image files support multiple formats including modern formats like HEIC and WebP
- Public file access (
isPublic: true) allows logos to be displayed without authentication - Multiple Grid fields establish parent-child relationships with related entities
- Indexed fields (company_name, trading_name, email) improve query performance
- Field descriptions provide contextual help for users