> ## Documentation Index
> Fetch the complete documentation index at: https://support.fieldko.com/llms.txt
> Use this file to discover all available pages before exploring further.

# FieldKo Data Model

> See how FieldKo's visits, tasks, surveys, orders, ranging, and attendance objects relate to each other and to your accounts.

FieldKo stores field work in Salesforce objects that link to each other and to your accounts. Knowing how they relate helps you build reports, design custom report types, write flows, and load data. This page describes the core objects by the labels you see in Setup, and how each one connects to the others.

To find these objects, from Setup, click **Object Manager**, and then search for the label. To export them, see [Export FieldKo Data and Photos](/admin/export-data).

## The Core Objects at a Glance

```mermaid theme={null}
flowchart LR
  U[User: Sales Representative] --> CC[Call Cycle]
  A[Account] --> V[Visit]
  CC --> V
  U --> V
  VT[Visit Template] --> V
  V --> T[Task]
  TT[Task Type] --> T
  FC[Field Campaign] --> T
  T --> TS[Task Survey]
  S[Survey] --> TS
  TS --> TSA[Task Survey Answer]
  Q[Question] --> TSA
  V --> VN[Visit Note]
  V --> O[FieldKo Order]
  O --> OL[FieldKo Order Line Item]
  V --> R[Ranging]
  R --> RL[Ranging Line Item]
  AT[Attendance] --> V
  V --> I[Incident]
  V --> P[Pack Out]
```

In words: each arrow points from a parent record to the records that link to it. A rep (a user) has call cycles. Each visit links to an account, a call cycle, a sales representative, and optionally a visit template. A visit has tasks, and each task links to a task type and, for campaign work, a field campaign. A task that opens a survey has a task survey, which links to the survey and holds one task survey answer per question. A visit can also have visit notes, FieldKo orders with order line items, ranging records with ranging line items, incidents, and pack-outs. Each visit also links to the rep's attendance record for that day.

## Visits, Tasks, and Surveys

| Object | What It Holds | Key Relationships |
| - | - | - |
| **Call Cycle** | A planning period for one rep | **Sales Representative** (user) |
| **Visit** | One planned or completed store visit, with check-in and check-out details | **Account**, **Call Cycle**, **Sales Representative** (user), **Visit Template**, **Contact**. FieldKo Native adds **Attendance**. |
| **Task** | One piece of work on a visit, such as a shelf check | **Visit**, **Task Type**, **Account**, **Field Campaign**, **Account Objective**, **FieldKo Product** |
| **Task Type** | A reusable task definition | **Default Survey** (survey) |
| **Task Survey** | One survey completed on one task | Master-detail to **Task**. Lookups to **Survey** and **Visit**. |
| **Task Survey Answer** | One answer to one question | **Task Survey**, **Question Definition** (the question), **Parent Answer** (for follow-up answers) |
| **Survey** and **Question** | Survey definitions and reusable questions | **Survey Question** joins them, with master-detail relationships to both. **Followup Question** links a parent question to the question shown next. |
| **Visit Note** | A note recorded on a visit | Master-detail to **Visit**. Lookup to **Account**. |
| **Next Visit ToDo's** | Tasks and notes left for the next visit to an account | **Account**, **Assign To** (user), **Representative** (user). Child records: **Next Visit Entry** and **Note From Last Visit**. |

A visit's sales representative decides which rep gets the visit in the app, and FieldKo sets the visit's owner to that rep. See [Visit Rules Enforced by Salesforce](/admin/call-cycles-and-visits#visit-rules-enforced-by-salesforce).

## Planning Objects

| Object | What It Holds | Key Relationships |
| - | - | - |
| **Visit Template** | A reusable set of tasks and surveys | Child **Visit Template Entry** records (master-detail), each with a **Task Type** and **Survey** |
| **Field Campaign** | A set of visits with the same tasks across many accounts | **Visit Template**. **Field Campaign Visit** records join each campaign to its visits. Tasks created by a campaign link to it through **Field Campaign**. |
| **Account Objective** | Tasks assigned to accounts without a visit | **Visit Template**. The tasks it creates link back through **Account Objective**. |
| **Objective** | A rep's target count for a task type in a call cycle | **Call Cycle**, **Objective Type** (task type) |
| **Target** | Product targets for an account and rep | **Account**, **Sales Representative** (user). Child **Target Line Item** records (master-detail) link to **FieldKo Product**. |
| **Recurrence Pattern**, **Account Set** | How often to visit accounts, and saved lists of accounts | **Account Set Entry** joins an account set to its accounts |

## Orders and Ranging

| Object | What It Holds | Key Relationships |
| - | - | - |
| **FieldKo Order** | An order placed for an account | **Account**, **Visit**, **FieldKo Pricebook**, **Ship To Contact** |
| **FieldKo Order Line Item** | One product on an order | Master-detail to **FieldKo Order**. Lookup to **FieldKo Pricebook Entry**. |
| **Ranging** | One core ranging check for an account | **Account**, **Visit** |
| **Ranging Line Item** | One product's result in a ranging check, such as present and quantity | Master-detail to **Ranging**. **Product Name** links to **FieldKo Product**. |

Products, price books, contracts, and product sets decide what reps can order and range. For how they connect to accounts, see [How the Objects Relate](/admin/products-ordering-ranging#how-the-objects-relate).

## FieldKo Native Objects

The FieldKo Native package adds these objects, which the FieldKo Atlas app fills in:

| Object | What It Holds | Key Relationships |
| - | - | - |
| **Attendance** | One record per rep per day, with login, logout, and time worked | **Sales Representative** (user). Visits and pack-outs link to it. |
| **Incident** | An incident a rep logs at a store | **Account**, **Visit** |
| **Pack Out** | A pack-out with before and after photos | **Account**, **Visit**, **Attendance**, **Sales Representative** (user) |
| **Sync Detail** | One record per sync, plus error details | **Sales Representative** (user). See [Sync Details](/admin/support-diagnostics#sync-details). |

FieldKo Native also has **Object Metadata** and **Profile Metadata** objects, which hold what the Metadata Collector stores for the app. Don't edit or report on them.

## Why Relationship Types Matter

* **Sharing:** A child in a master-detail relationship, such as a task survey, visit note, or order line item, has no sharing of its own. Users who can see the parent can see the child. Lookup children, such as tasks and task survey answers, follow their own org-wide default. See [Security Model and Sharing](/platform/access/security-model).
* **Deletion:** Deleting a master record deletes its detail records. Deleting a visit deletes its visit notes, and deleting a task deletes its task surveys.
* **Reporting:** A report type can follow relationships from parent to child. To report across objects that FieldKo's report types don't join, create a custom report type. See [Report Folders, Sharing, and Custom Report Types](/platform/reports/folders-and-report-types).

## See Also

* [Key Concepts](/getting-started/key-concepts)
* [Export FieldKo Data and Photos](/admin/export-data)
* [Design Surveys and Tasks for Reporting](/platform/customize/design-surveys-for-reporting)
* [Control What Syncs to the App](/admin/offline-data)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.