‘head’ Node

The 'head' node defines the settings that apply to the entire transaction, and define the transaction flow details. As the elements visibility differs for different upload types, the table contains the visibility of each element in the first line of 'Description' cell.

For activity related uploads, properties mode can also be set defining if all activity properties not being updated should be erased.

The 'head' node contains the following elements:

Head node elements

Name Type Description

upload_type

enum

mandatory for all upload types

type of the transaction

valid values: 'full'; 'incremental'

'full': full activity upload or full inventory upload

'incremental': incremental upload

id

string

optional for all upload types

Can be set if the client wants to identify the transaction, otherwise it can be omitted.

unique transaction identifier

'id' is not used by the application itself but has proved to be useful in particular transaction analysis

recommended to generate it by some unique-string generator such as a Universally Unique Identifier algorithm

date

date

mandatory and meaningful only for Full activity Upload

date of transaction in YYYY-MM-DD format

specifies the date for which the activities should be uploaded

provider_group

string

optional, meaningful only for Incremental Upload

label of a resource property used to divide resources within one company into "groups" and used to determine whether the activity can be moved

Whenever the Inbound API tries to move an existing activity from one resource to another, it first checks if they belong to the same resource group and if they do, the activity is not moved; i.e.

IF: inbound activity's 'external_id' field is specified and valid

AND activity already exists in the database

AND inbound activity 'external_id' is not equal to the existing activity 'external_id'

AND inbound activity date is equal to the existing activity date

AND existing activity resource is in the same resource group as the inbound activity resource

THEN: activity is not moved. Existing activity is updated

valid values: any valid resource property label

default value: empty string

processing_mode

enum

optional, meaningful for Full activity Upload and Full Inventory Upload

defines if activities or inventory will be uploaded:

valid values: 'appointment_only'; 'inventory_only'

default value: 'appointment_only'

default_appointment_pool

string

meaningful only for Incremental Upload (activity commands)

a fallback resource to whom an activity will be assigned, if it cannot be assigned to the resource specified for the activity

valid values: any valid 'external_id' of a resource or a bucket

default value: empty string

allow_change_date

enum

optional, meaningful only for Incremental Upload (with activity-related commands)

specifies, if activities can be re-scheduled to a different date

  • 'yes' then the activity is re-scheduled to a new date

  • 'no' then the activity is ignored and a new activity is inserted in the new date

valid values: 'yes', 'no'; default value: 'yes'

appointment

struct

mandatory for Full Activity Upload and for Incremental Upload (with activity-related commands)

activity-processing settings and list of fields to be used to uniquely identify activities when processed

appointment/keys

struct

mandatory for Full Activity Upload and for Incremental Upload (activity-related commands)

'keys' structure with activity key fields used to identify processed activities by

valid values for 'keys/field' are 'appt_number', 'customer_number' and 'name'

appointment/action_if_completed

enum

optional, meaningful for Full activity Upload and for Incremental Upload (activity-related commands)

Please see section 'action_if_completed' Meanings for details.

specifies processing flow for 'started', 'cancelled' by user, 'completed' and 'notdone' activities

valid values: 'ignore', 'update''create_if_reassign_or_reschedule'; 'create'

default value: 'create_if_reassign_or_reschedule'

Note: if the command value contradicts the value set in the 'appointment' structure for specific command, the meaning defined for the command should take precedence.

inventory

struct

mandatory for all upload types

For Full Inventory Upload and for Incremental Upload (with inventory-related commands) – relates to resource inventory, and for Full activity Upload and for Incremental Upload (with activity-related commands) – relates to customer inventory of the activity.

Contains inventory-specific settings including a list of key fields to be used to uniquely identify resource inventories when processing.

inventory/keys

struct

mandatory for all upload types

For Full Inventory Upload and for Incremental Upload (with inventory-related commands) – relates to resource inventory, and for Full activity Upload and for Incremental Upload (with activity-related commands) – relates to customer inventory of the activity.

'keys' structure with inventory key fields used to identify processed resource inventory by

valid values for 'keys/field' are:

'invsn'– inventory serial number

'invtype'– inventory type

invtype_label – inventory type label, same meaning as 'invtype'

inventory/upload_type

enum

optional and meaningful for all upload types

For Full Inventory Upload and for Incremental Upload (with inventory-related commands) – relates to resource inventory, and for Full activity Upload and for Incremental Upload (with activity-related commands) – relates to customer inventory of the activity.

valid values:

'full': when inventory is updated, all existing inventory is deleted and inventory specified in the command is set

'incremental': inventory specified in the request are added to the existing inventory; existing inventory is not deleted

default value: 'full'

properties_mode

optional and meaningful only for Full activity Upload and Incremental Upload (with activity-related commands)

valid values:

'replace': when activity is updated, all existing properties are erased and properties from request are added instead

'update': when activity is updated, properties from request are added to existing properties; the existing properties are not deleted

default value: for 'update_activity' command type the default value is 'replace', for other types it is 'update'

Note: please note, that if the user has no rights to change the property, it will not be deleted or changed, regardless of the request setting