Relations

Resource type: relation

Hereby relations between 2 data sets can be modified. In enterprise, there are many ways to link two records together. In case that the relation does not exist, an error will be generated. Many relations cannot be modified, but they can be created and deleted.

Each relation type determines which of the two records is the “parent” record and which is the “child” record. The names of the constants always contain first the name of the parent record, then the child record. Last element is a short description of the relation. The type of relation is given according to the following scheme:

urn:onoffice-de-ns:smart:2.5:relationTypes:<parent-type>:<child-type>:<description>

Parameters:

  • parentid
    INTEGER. Estate ID
  • childid
    INTEGER. Address ID
  • relationtype
    STRING. Description of the link. Relation types which can be modified are:

    'urn:onoffice-de-ns:smart:2.5:relationTypes:address:contact:address' Contact address for address (adress = parent record, address = child record).
    'urn:onoffice-de-ns:smart:2.5:relationTypes:address:estate:contacted' Contacted (Adressen) (adress = parent record, estate = child record).
    'urn:onoffice-de-ns:smart:2.5:relationTypes:address:estate:matching' immo-matching entry (address = parent, estate = child).
    'urn:onoffice-de-ns:smart:2.5:relationTypes:address:estate:offer' Offer (Angebot) (adress = parent record, estate = child record).
    'urn:onoffice-de-ns:smart:2.5:relationTypes:user:address:birthday' user-address-birthday (user = parent, address = child).
    'urn:onoffice-de-ns:smart:2.5:relationTypes:user:address:birthday' user-address-birthday (user = parent, address = child).
    'urn:onoffice-de-ns:smart:2.5:relationTypes:calendar:address' An appointment is linked to an address. calendar-address (calendar = parent, address = child).
    'urn:onoffice-de-ns:smart:2.5:relationTypes:estate:address:interested' An estate is assigned to the address of an interested party. All interested persons of estate (estate = parent, address = child).
    'urn:onoffice-de-ns:smart:2.5:relationTypes:estate:address:matching' estate/address matching (estate = parent, file = child).

  • relationinfo
    STRING. Further informations about a relation can be modified by the parameter relationinfo. For now, only the confirmation status of an appointment can be modified by relationinfo.
    Syntax: "relationinfo": {"statusTerminbestaetigung": "gecancelt"}.
    Options are: bestätigt (confirmed), gesendet (sent), gecancelt (cancelled), nicht gesetzt (not set). See also example below for usage.

Example:

...
"actions":[ 
{
    "actionid": "urn:onoffice-de-ns:smart:2.5:smartml:action:modify",
    "resourceid": "",
    "identifier": "",
    "resourcetype": "relation",
    "parameters": {
        "relationtype": "urn:onoffice-de-ns:smart:2.5:relationTypes:calendar:address",
        "parentid": 671,
        "childid": 153,
        "relationinfo": {
            "statusTerminbestaetigung": "gecancelt"
        }
    }
}
...