Resource: agentslog
Reads all specified fields from a given agents log record. All fields listed under parameter data
are valid here and are passed as elements of an array in the parameter data
. A list of kind of actions and action types can be found in enterprise under “Extras >> Settings >> Administration >> Action types”. The german names are valid for the API.
Parameters:
data
ARRAY. Each field is returned with the appropriate value of the record. Entries are sorted antichronologically. Following fields can be queried within thedata
parameter:
Objekt_nr
,Adress_nr
,Aktionsart
,Aktionstyp
,Datum
,created
,Benutzer
,Benutzer_nr
,Datum_bearb
,Kosten
,Bemerkung
,merkmal
,HerkunftKontakt
,dauer
,Beratungsebene
,Absagegrund
. The values forBeratungsebene
(Advisory level) areA Miet-/Kaufvertrag unterzeichnet
,B Schriftliche Miet-/Kaufzusage
,C Im intensiven Gespräch
,D Interessiert, aber noch prüfend
,E Dokumentation erhalten
,F Dokumentation bestellt
,G Absage
. The values forAbsagegrund
(Reason of cancellation) can be found in the administration under Singleselect, Module: Property activities. A reason for cancellation can be specified if the advisory level is “G Absage”.estateid
ARRAY. Return only entries associated with this estate records. Note that multiple IDs can be specified.addressid
ARRAY. Return only entries associated with this address records. Note that multiple IDs can be specified.projectid
INTEGER. Return only entries associated with this project record.filter
OBJECT. Key: field, value: array of objects with filter expressions in the format"Aktionsart": [{"op": "=", "val": "Email"}]
. Withop
you specify the operator. Possible values forop
are the following SQL operators:is or =, >, <, >=, <=, != or <>, between, like, not like, in, not in
For the operator
like
the value % can be specified as a placeholder.With
val
you specify the value which should be applied to the filtering. The individual filter expressions are linked with the AND operation. Multiple values or ranges for operators like IN or BETWEEN are specified in comma separated array notation.
"Aktionsart": [{"op": "IN","val": ["Email","Preisänderung"]}],
"created": [{"op": "BETWEEN","val": ["2020-01-01 00:00:00","2021-04-01 15:00:00"]}]}
listlimit
INTEGER. Maximum number of records returned in the response. Maximum: 500. Default: 20.listoffset
INTEGER. Offset of the list, that means from which data record onwards the list should be output.sortby
OBJECT. Fields to sort by. The field name is used as the key, and the type of sorting as the value. Notation:{"Aktionsart": "ASC", "Aktionstyp": "DESC"}
Possible values for sorting are ASC for ascending, DESC for descending. It is also possible to specify only field names without sort information and usesortorder
together with parameters, e.g."sortby": "Aktionsart"
.sortorder
STRING. Possible values:ASC
orDESC
. Ascending or descending. Only applicable ifsortby
was specified as a string without sorting information, e.g."sortby": "Aktionsart"
.fullmail
BOOLEAN. If true, the associated email will be returned in the response parametermailbody
.tracking
BOOLEAN. Return only entries released for object tracking.
Example:
{ "actionid": "urn:onoffice-de-ns:smart:2.5:smartml:action:read", "resourcetype": "agentslog", "resourceid": "", "identifier": "", "parameters": { "estateid": 2507, "filter": { "Aktionsart": [ { "op": "=", "val": "Email" } ] }, "data": [ "Objekt_nr", "Aktionsart", "Aktionstyp", "Datum", "Bemerkung", "merkmal" ] } }
Response:
(individually)
mailbody
STRING. Mail body of the associated e-mail
{ "status": { "code": 200, "errorcode": 0, "message": "OK" }, "response": { "results": [ { "actionid": "urn:onoffice-de-ns:smart:2.5:smartml:action:read", "resourceid": "", "resourcetype": "agentslog", "cacheable": true, "identifier": "", "data": { "meta": { "cntabsolute": 2 }, "records": [ { "id": 67075, "type": "agentslog", "elements": { "Objekt_nr": [ "2529" ], "Aktionsart": "Email", "Aktionstyp": "Ausgang", "Datum": "2021-02-23 12:28:30", "Bemerkung": "Vertragsunterlagen versendet", "merkmal": null } }, { "id": 67035, "type": "agentslog", "elements": { "Objekt_nr": [ "2529" ], "Aktionsart": "Email", "Aktionstyp": "Ausgang", "Datum": "2021-02-20 15:30:00", "Bemerkung": "Hallo", "merkmal": "|indMulti1780Select8196|" } }, "status": { "errorcode": 0, "message": "OK" } } ] } }
2nd Example: Filter with Beratungsebene
and Absagegrund
{ "actionid": "urn:onoffice-de-ns:smart:2.5:smartml:action:read", "resourcetype": "agentslog", "resourceid": "", "identifier": "", "parameters": { "estateid": 6103, "filter": { "Beratungsebene": [ { "op": "in", "val": [ "G Absage" ] } ], "Absagegrund": [ { "op": "in", "val": [ "Alter", "Lage" ] } ] }, "data": [ "Objekt_nr", "Aktionsart", "Aktionstyp", "Datum", "Bemerkung", "merkmal", "Beratungsebene", "Absagegrund" ] } }