# Sync objects from onOffice

<Lead>
The object sync imports your properties from onOffice into the platform's
central object database. Once set up it runs automatically every day, and all
tools work with the same object inventory.
</Lead>

You find this area under **Settings → Integrations → onOffice**, in the
**"Objects from onOffice"** frame. It requires an existing connection (see the
<DocLink href="/help/integrations/onoffice/verbindung">connection guide</DocLink>).

## What the sync does

<Steps>
<Step title="Read objects">
The platform reads your objects from onOffice page by page (100 per page). Even
large inventories are processed in full: the first run fetches as many pages as
possible immediately, the rest continues in the background.
</Step>
<Step title="Map fields">
Each onOffice field is imported into the matching platform field per your field
mapping (title, object type, price, area and so on). The status is detected
automatically (see below).
</Step>
<Step title="Link owners">
The owner relation (object to address) is read along the way, so an object and
its owner contact belong together without duplicate work.
</Step>
<Step title="Create or update">
New objects are created, already imported ones updated. The sync is repeatable:
it never duplicates and updates existing objects on every run (status changes
such as "sold" keep flowing in).
</Step>
</Steps>

<Info title="The entire inventory is imported">
**All** objects are imported, not just active ones. Sold and reserved objects
come in with their correct status. You then filter by status in the object
gallery instead of missing objects.
</Info>

## Prerequisite: object rights of the API user

For every object to arrive, the onOffice API user must be allowed to **read**
objects, including the unpublished ones:

<Checklist>
<ChecklistItem>Read objects (all) is enabled.</ChecklistItem>
<ChecklistItem>The checkbox "can only read objects published on the website" is **disabled**.</ChecklistItem>
</Checklist>

<Warning title="Most common cause of missing objects">
If "only published objects" is still active, onOffice returns only some of your
objects. Disable it in onOffice under
**Extras → Settings → Users → your API user → Rights**.
</Warning>

## The status is detected automatically

This is the most important part. You do **not** need to map the status by hand:
the platform derives it from onOffice's reliable standard fields.

<DefinitionList>
<DefItem term="verkauft = yes">Object status becomes **Sold**.</DefItem>
<DefItem term="reserviert = yes">Object status becomes **Reserved**.</DefItem>
<DefItem term="onOffice field 'status' = active">Object status becomes **Active**.</DefItem>
<DefItem term="onOffice field 'status' = inactive">Object status becomes **Draft**.</DefItem>
</DefinitionList>

Order: "sold" beats "reserved" beats the active flag. A sold object is therefore
always **Sold**, whatever else is set.

If your onOffice uses a **custom status value list** (often a field named
`Status2` with values like "Active marketing", "Reserved", "Sold, sole sale"),
you can map it in addition. Your mapping then takes precedence whenever it
resolves a value. See the
<DocLink href="/help/integrations/onoffice/status">status guide</DocLink>.

## Photos are imported automatically

After the object data is synced, the platform fetches the **object photos** from
onOffice and stores them in the platform. The gallery and object detail then
show real images instead of the gradient placeholder.

<DefinitionList>
<DefItem term="Order">The onOffice title image becomes the platform title image (first position).</DefItem>
<DefItem term="Quality">The title image is stored in good quality, the rest web-optimized (to save storage). Originals stay in onOffice and are fetched at full resolution on demand.</DefItem>
<DefItem term="Names">The label you maintain on the image in onOffice comes along ("Wohnzimmer", "Blick nach Süden"). If none is set, the caption or the uploaded file name is used. If both are empty, photos are named "Titelbild", "Foto 2", "Foto 3" so they stay distinguishable. Photos imported before this change are renamed by a background pass; names you gave yourself are left alone.</DefItem>
<DefItem term="When">The photo import starts automatically once the object sync finishes and continues in the background.</DefItem>
<DefItem term="Non-destructive">Existing or manually uploaded images are never overwritten. Objects with no photo in onOffice keep the placeholder. A property is reserved before its first photo is fetched, so an interrupted run never creates a second copy.</DefItem>
<DefItem term="Storage limit">If the plan storage is full, the photo import stops and you get a notification. After an upgrade or cleanup the remaining photos load on the next sync.</DefItem>
</DefinitionList>

### Loading images at full quality

The small preview images are fine for browsing, not for working. As soon as you
need a photo for a brochure, for homestaging or for your website, open the
property and click **In voller Qualität laden** above the gallery. The platform
then fetches that property's originals from onOffice and replaces the previews.

Next to it you see roughly how much storage this takes. The button deliberately
covers one property at a time: at full resolution a single property quickly runs
to a few dozen megabytes, and across several hundred properties that would be
more storage than your plan provides.

<Note title="The photo import takes a moment">
With many objects the photos are fetched gradually (each object has several
images), so it can take a few minutes for all title images to appear. A repeated
sync fetches photos that were still missing after the first run.
</Note>

## Field mapping

Sensible default mappings (title, object type, marketing type, address, areas,
rooms, prices, energy) ship out of the box. Review and extend them in the
collapsible **"Field mapping"** area. After saving it collapses again to keep
the page calm; reopen it via **"Show"**.

Details, custom fields and value translation are covered in the
<DocLink href="/help/integrations/onoffice/feldzuordnung">field mapping guide</DocLink>.

<Note title="No data is lost">
Unmapped fields are not lost: all raw data read is kept in full in the object
details. You can add a mapping later and re-sync without changing anything in
onOffice.
</Note>

## Start the first sync

<Steps>
<Step title="Review the field mapping">
Open the "Field mapping" area, review the defaults and save. (For the standard
case you need not change anything.)
</Step>
<Step title="Sync now">
Click **"Sync now"**. The first run fetches your inventory; the result arrives
as a notification ("X new, Y updated").
</Step>
<Step title="Review the result">
Open **Objects** in the platform. You see your properties with the correct
status and filter as needed.
</Step>
</Steps>

After that the sync runs **automatically every day**. Status changes and new
objects flow in on their own.

## Two common symptoms and their cause

<Faq>
<FaqItem q="Only ~100 objects are ever imported, the rest stays 'skipped'.">
This was a bug in the first-import filter (only "active" objects were created).
It is fixed: the entire inventory is now imported. If the message persists,
restart the sync once and check the object rights (disable "only published
objects").
</FaqItem>
<FaqItem q="All objects show 'active', although many are sold or reserved.">
The cause was that the status was wrongly set to "active" on insert when no
status mapping resolved. The status is now derived from sold / reserved / the
active flag. On the next sync, already imported objects correct themselves
automatically. See the
<DocLink href="/help/integrations/onoffice/status">status guide</DocLink>.
</FaqItem>
</Faq>

## Next

<CardGrid>
<Card href="/help/integrations/onoffice/status" title="Detect status correctly" eyebrow="Deep dive">
How the object status is determined and how to map a custom status value list.
</Card>
<Card href="/help/integrations/onoffice/feldzuordnung" title="Field mapping" eyebrow="Deep dive">
Standard fields, custom fields, value translation and how unknown fields are
handled.
</Card>
<Card href="/help/integrations/onoffice/problembehebung" title="Troubleshooting" eyebrow="Help">
Fixes for the most common sync problems.
</Card>
</CardGrid>
