Importing occupancies
This topic describes how to import occupancies by using Enterprise Talk.
When adding an occupancy it is not sufficient to add a reference to the workspace since the workspace is reference-date-aware and unique with its workspace details. As also described in Importing workspaces, workspace details should always be added to the workspace to uniquely identify it.
* 
When importing an occupancy for a workspace that has multiple time-aware workspace details (records created by ending/resuming a workspace), you need to set the reference date on the Enterprise talk document to import an occupancy. By doing so, it will be possible to import a single time-aware workspace on the given reference date.
The following example displays a sample XML for adding an occupancy (so including the workspace and workspace detail). Make sure to correctly set all Part of ID fields in the Enterprise Talk definition.
Import XML sample
<?xml version='1.0' encoding='utf-8'?>
<document>
<businessobjects>
<Occupancy>
<CostCentreRef>030000</CostCentreRef>
<DepartmentRef>03.01</DepartmentRef>
<EndDate></EndDate>
<Rate>100.00</Rate>
<PersonPositionRef>56</PersonPositionRef>
<RequiredArea>16.00000000000000</RequiredArea>
<BeginDate>2016-01-01</BeginDate>
<WorksOnFriday>True</WorksOnFriday>
<WorksOnMonday>True</WorksOnMonday>
<WorksOnSaturday>False</WorksOnSaturday>
<WorksOnSunday>False</WorksOnSunday>
<WorksOnThursday>True</WorksOnThursday>
<WorksOnTuesday>True</WorksOnTuesday>
<WorksOnWednesday>True</WorksOnWednesday>
<PersonRef>032</PersonRef>
<WorkSpace>
<Code>WS_2.23_19</Code>
<BeginDate>2004-04-01</BeginDate>
<AvailableArea>1</AvailableArea>
<WorkSpaceDetails>
<BeginDate>2004-04-01</BeginDate>
<Space>
<Code>2.23</Code>
<Floor>
<Code>02</Code>
<Property>
<Code>14</Code>
</Property>
</Floor>
</Space>
</WorkSpaceDetails>
</WorkSpace>
</Occupancy>
</businessobjects>
</document>
After import: an occupancy starting on 01-01-2016 is added to Planon for workspace WS_2.23_19, space 2.23, floor 02, property 14.