Survey
Represents a survey or questionnaire that can be attached to any entity via polymorphic reference (entity + entityId). Supports structured data collection through questions, responses, and answers with configurable time boundaries and anonymity settings.
Properties
| Property | Type | Mode | Description | Required |
|---|---|---|---|---|
| title | string | stored | Title of the survey displayed to respondents Example: | Required |
| description | string | stored | Detailed description explaining the purpose of the survey | Optional |
| entity | KernelModel | stored | Reference to the entity type this survey is attached to | Required |
| entityId | string | stored | Identifier of the specific entity record this survey is attached to Example: | Required |
| startDate | DateTime | stored | Date when the survey becomes available for responses | Optional |
| endDate | DateTime | stored | Date when the survey closes and no longer accepts responses | Optional |
| isAnonymous | boolean | stored | Whether responses are collected anonymously without tracking respondent identity | Optional |
| allowMultipleResponses | boolean | stored | Whether the same respondent can submit multiple responses | Optional |
| owner | Person | stored | Person who created or owns this survey | Optional |
| organization | Organization | stored | Organization that owns this survey | Optional |
| metadata | json | stored | Additional survey configuration and metadata | Optional |
| questions | SurveyQuestion[] | calculated | List of questions in this survey | Optional |
| responses | SurveyResponse[] | calculated | List of responses submitted for this survey | Optional |
| questionCount | number | calculated | Number of questions in this survey | Optional |
| responseCount | number | calculated | Number of responses received | Optional |
| isOpen | boolean | calculated | Whether the survey is currently open for responses (within date range) | Optional |
Examples
Example 1
{
"@type": "Survey",
"title": "Customer Satisfaction Survey",
"description": "Help us improve by sharing your experience with your recent order",
"entity": {
"@type": "KernelModel",
"name": "Order"
},
"entityId": "order-2024-001",
"startDate": "2024-11-01T00:00:00Z",
"endDate": "2024-12-31T23:59:59Z",
"isAnonymous": false,
"allowMultipleResponses": false,
"owner": {
"@type": "Person",
"givenName": "Marie",
"familyName": "Dupont"
},
"organization": {
"@type": "Organization",
"name": "Acme Commerce"
}
}Example 2
{
"@type": "Survey",
"title": "Employee Engagement Survey Q4 2024",
"description": "Annual survey to measure employee satisfaction and engagement",
"entity": {
"@type": "KernelModel",
"name": "Organization"
},
"entityId": "org-acme-001",
"startDate": "2024-10-01T00:00:00Z",
"endDate": "2024-10-31T23:59:59Z",
"isAnonymous": true,
"allowMultipleResponses": false,
"organization": {
"@type": "Organization",
"name": "Acme Corporation"
}
}Example 3
{
"@type": "Survey",
"title": "Event Feedback",
"description": "Share your thoughts on the conference",
"entity": {
"@type": "KernelModel",
"name": "Event"
},
"entityId": "event-conf-2024",
"isAnonymous": false,
"allowMultipleResponses": false
}Example 4
{
"@type": "Survey",
"title": "Vehicle Inspection Checklist",
"description": "Pre-trip safety inspection form",
"entity": {
"@type": "KernelModel",
"name": "Vehicle"
},
"entityId": "veh-truck-042",
"isAnonymous": false,
"allowMultipleResponses": true
}