Using Objects
Objects let you extract complex, nested data from documents β such as tables, repeating groups, and multi-level structures.
When Do You Need Objects?
Use Objects when your document contains repeating groups of related fields. For example:
| Document | The repeating group | Fields within each group |
|---|---|---|
| Timesheet | Each row entry | Day, Date, Description, Time In, Time Out, Hours |
| Annual Report | Each board director | Name, Designation, Years of Experience, Profile |
| Corporate Phone Bill | Each phone number | Number, Data Usage |
| Report Card | Each subject | Subject Name, Score, Grade |
| Resume | Each work experience | Company Name, Job Title, Start Date, End Date |
| Invoice | Each line item | Item Name, Quantity, Unit Price |
If you tried to use separate List fields for each column (e.g., one List for βall namesβ and another for βall phone numbersβ), the lists might not match up β some entries could be missing a value, breaking the association between related data. Objects solve this by keeping related fields grouped together.
What Is an Object?
An Object is a logical group of related fields. Think of it as a row in a table, or a record in a database.
For example, a Person Object might contain:
- Person Name
- Person Age
- Person Education
A Timesheet Entry Object might contain:
- Day
- Date
- Time In
- Time Out
You can define anything as an Object, and include any number of fields within it, as long as the fields are logically related.
How to Set Up Objects in the Web Portal
The pattern is always: List β Object β Object Fields
Step-by-Step
- Click βAdd Promptβ
- Set the Data Type to List
- Write a prompt describing what the list contains (e.g., βTimesheet entries for each rowβ)
- In the Nested fields section that appears, click β+ Add Fieldβ
- Set this nested fieldβs Type to Object and give it a label (e.g., βTimesheet Entryβ)
- Write a prompt for the object (e.g., βEach timesheet entry rowβ)
- In the Object fields section that appears, click β+ Add Fieldβ to add each sub-field
- Define each sub-field with a label, type (usually Text, Number, or Date), and prompt
Example 1: Timesheet
Goal: Extract all rows from a daily timesheet log.
Structure:
Timesheet List (List)
ββ Timesheet Entry (Object)
ββ Day (Text) β "Extract the day of the timesheet"
ββ Date (Text) β "Extract the date of the timesheet"
ββ Description (Text) β "Extract the work description"
ββ Time In (Text) β "Extract the clock-in time"
ββ Time Out (Text) β "Extract the clock-out time"
ββ Hours (Number) β "Extract the number of hours worked"Portal setup:
| Level | Data Label | Type | Prompt |
|---|---|---|---|
| Top | Timesheet List | List | Timesheet List |
| Nested | Timesheet Entry | Object | Timesheet Entry |
| Object field | Day | Text | Extract the day of the timesheet |
| Object field | Date | Text | Extract the date of the timesheet |
| Object field | Description | Text | Extract the work description |
| Object field | Time In | Text | Extract the clock-in time |
| Object field | Time Out | Text | Extract the clock-out time |
| Object field | Hours | Number | Extract the number of hours worked |
Example 2: Annual Report β Board of Directors
Goal: Extract details of every board director from an annual report.
Structure:
List of Directors (List)
ββ Director Object (Object)
ββ Director Name (Text) β "Return the director name. For example, Mr Tan Ah Kow"
ββ Years of Experience (Text) β "Return the stated years of experience. For example, 5."
ββ Profile (Text) β "Return a 100 word summary of the Director's Profile"Example 3: Corporate Phone Bill
Goal: Extract each mobile number and its associated data usage.
Structure:
Number Data Pairs (List)
ββ Number_Data (Object)
ββ Phone Number (Text) β "Return the phone number"
ββ Local Data Usage (Text) β "Return the local data usage, e.g. 5kb. If none, return 0."Combining Objects with Normal Fields
You donβt have to choose between simple fields and Objects β use both in the same extraction.
Example: Full Timesheet Extraction
A timesheet has simple fields (Name, Department) at the top and repeating rows in the table. Extract everything together:
Name (Text) β "Extract the Name on the TimeSheet"
Department (Text) β "Extract the Department on the TimeSheet"
Timesheet List (List)
ββ Timesheet Entry (Object)
ββ Day (Text)
ββ Date (Text)
ββ Time In (Text)
ββ Time Out (Text)In the Excel export, the simple fields (Name, Department) appear as regular columns. The List of Objects gets expanded so each entry appears on its own row.
More Examples
Report Card
Name (Text)
Student ID (Text)
Attendance Rate (Number)
Subject List (List)
ββ Subject (Object)
ββ Subject Name (Text)
ββ Score (Number)
ββ Grade (Text)Resume
Executive Summary (Text)
Skills (List)
Resume Summary (Text)
Experiences List (List)
ββ Experience (Object)
ββ Company Name (Text)
ββ Job Title (Text)
ββ Start Date (Date)
ββ End Date (Date)Tips
- Identify whatβs repeating β If you see rows in a table, entries in a list, or profiles in a section, thatβs your Object
- Keep Object fields focused β Only include fields that are logically part of the same group
- Use descriptive prompts β Even within Objects, give examples and context in your field prompts
- Test with a single file first β Verify the structure is correct before processing in bulk