> For the complete documentation index, see [llms.txt](https://docs.keyfax.biz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.keyfax.biz/integrations/apis/soap/xml-schemas/results-schema.md).

# Results Schema

This section details the export information generated by a Keyfax Repairs Diagnostic request (session), and is intended as a definitive guide to how to parse Keyfax data in a Host Management System or other calling application (Host). This schemas should be used whilst testing Integration scenarios, and as a general reference.

{% hint style="info" %}
**LEGACY** Any XML element which does not have a dedicated OCXproperty, can be accessed by the GetNodeByXPath OCX property. Some of these are described below.
{% endhint %}

| Element                                                                             | Description                                                                                                                                                            |
| ----------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `<?xml version="1.1" encoding="utf-8" ?>`                                           | XML version                                                                                                                                                            |
| `<KeyfaxData>`                                                                      | XML Root (Document Element)                                                                                                                                            |
| `<Call name="Call{n}" type="ROL">`                                                  |                                                                                                                                                                        |
| `<OriginatingSystem>{as passed in startup xml}</OriginatingSystem>`                 |                                                                                                                                                                        |
| `<Company>{as passed in startup xml}</Company>`                                     |                                                                                                                                                                        |
| `<PropertyID>{as passed in startup xml}</PropertyID>`                               | Id of Caller property (was PropertyId)                                                                                                                                 |
| `<CallerID>{as passed in startup xml}</CallerID>`                                   | Id of Caller (was TenantId)                                                                                                                                            |
| `<MainTelephone>{as updated by script}</MainTelephone>`                             | Caller Main Telephone number                                                                                                                                           |
| `<Email>{ as updated by script }</Email>`                                           | Caller Email address                                                                                                                                                   |
| `<LogDate>{dd/MM/yyyy HH:mm:ss}</LogDate>`                                          | Todays date                                                                                                                                                            |
| `<UserCode>{Keyfax userCode}</UserCode>`                                            | Login code of Keyfax user                                                                                                                                              |
| `<ScriptCode>{as passed in startup xml}</ScriptCode>`                               | Code representing the tenure type for the caller                                                                                                                       |
| `<CategoryID>{Keyfax category id}</CategoryID>`                                     | Category selected within Keyfax                                                                                                                                        |
| `<CategoryText>{Keyfax category text}</CategoryText>`                               | Category selected within Keyfax                                                                                                                                        |
| `<TopicID>{Keyfax topic id}</TopicID>`                                              | Topic selected within Keyfax                                                                                                                                           |
| `<TopicText>{Keyfax topic text}</TopicText>`                                        | Topic selected within Keyfax                                                                                                                                           |
| `<CallText>{recorded call description}</CallText>`                                  | Description of the repair/enquiry collected via script                                                                                                                 |
| `<Recharge>{0 = no recharge or 1 = recharge}</Recharge>`                            | Recharge flag                                                                                                                                                          |
| `<RechargeCode>{as captured by Keyfax}</RechargeCode>`                              | Code for Recharge                                                                                                                                                      |
| `<RechargeCost>{total cost ex vat}</RechargeCost>`                                  | Total cost if a Recharge                                                                                                                                               |
| `<CallCategory>{as captured by Keyfax}</CallCategory>`                              | The following set are of general use:                                                                                                                                  |
| `<CallSubCategory>{as captured by Keyfax}</CallSubCategory>`                        |                                                                                                                                                                        |
| `<CallClassification>{as captured by Keyfax}</CallClassification>`                  |                                                                                                                                                                        |
| `<CallSource>{as captured by Keyfax}</CallSource>`                                  |                                                                                                                                                                        |
| `<CallType>{as captured by Keyfax}</CallType>`                                      |                                                                                                                                                                        |
| `<ExpenditureCode>{as captured by Keyfax}</ExpenditureCode>`                        |                                                                                                                                                                        |
| `<JobCode>{as captured by Keyfax}</JobCode>`                                        |                                                                                                                                                                        |
| `<Location>{as captured by Keyfax}</Location>`                                      |                                                                                                                                                                        |
| `<ScheduleId>{Keyfax orderId}</ScheduleId>`                                         |                                                                                                                                                                        |
| `<SiteVisit>{as captured by Keyfax}</SiteVisit>`                                    |                                                                                                                                                                        |
| `<AdditionalInfo>{as captured by Keyfax}</AdditionalInfo>`                          |                                                                                                                                                                        |
| `<Authorisation>{Y/N as defined by Keyfax}</Authorisation>`                         |                                                                                                                                                                        |
| `<SpecialInstructions>{as captured by Keyfax}</SpecialInstructions>`                |                                                                                                                                                                        |
| `<ScriptPath>`                                                                      | Questions and Answers during the script                                                                                                                                |
| `<Question>Q1 = Where is the basin? : A1 = bathroom</Question>`                     | The question and answer structure varies!                                                                                                                              |
| `<Question>Q2 = What type is it?: A2 = pedestal</Question>`                         | **Check specific structure with Omfax before processing ScriptPath content!**                                                                                          |
| `<Question>Q3 = Is it safe?: A3 = Yes</Question>`                                   |                                                                                                                                                                        |
| `<Question>Q4 = How did it happen?: A4 = Tenant action</Question>`                  |                                                                                                                                                                        |
| `</ScriptPath>`                                                                     |                                                                                                                                                                        |
| `<Service name="Service{n}">`                                                       | There can be any number of Service elements, one for each Service recorded by the script.                                                                              |
| `<CompleteBy>dd/MM/yyyy HH:mm:ss</CompleteBy>`                                      | Job complete by date                                                                                                                                                   |
| `<Priority>{priority code configurable in Keyfax}</Priority>`                       | Priority of job                                                                                                                                                        |
| `<ServiceCode>{SOR code configurable in Keyfax}</ServiceCode>`                      | Schedule of Rate code                                                                                                                                                  |
| `<ServiceCodeDesc>{short SOR description}</ServiceCodeDesc>`                        | Schedule of Rate description                                                                                                                                           |
| `<SMV>{SOR Standard Minute Value}</SMV>`                                            | Schedule of Rate Standard Minute Value                                                                                                                                 |
| `<Quantity>{quantity}</Quantity>`                                                   | Quantity required                                                                                                                                                      |
| `<TradeType>{as captured by Keyfax}</TradeType>`                                    |                                                                                                                                                                        |
| `<Contractor>{contractor code for each SOR}</Contractor>`                           |                                                                                                                                                                        |
| `</Service>`                                                                        |                                                                                                                                                                        |
| `<Advice name="Advice{n}">  {details of messages presented to the caller}</Advice>` | Message Code                                                                                                                                                           |
| `<Action name="Action{actionIndex}" type="{actionType}">`                           | Task type                                                                                                                                                              |
| `<ActionCode>TSK001</ActionCode>`                                                   | Task Code                                                                                                                                                              |
| `<ActionCodeDesc>{shortDescription}</ActionCodeDesc>`                               | Task Description                                                                                                                                                       |
| `<Priority>{priorityCode}</Priority>`                                               | Priority of Task                                                                                                                                                       |
| `{taskTemplate}`                                                                    | Typically a [Note](http://help.keyfax.biz/Keyfax%20General%20Help%20and%20Technical%20Data%20HC%206/default.aspx#pageid=export_enquiry_with_note_xml), Email or Letter |
| `</Action>`                                                                         |                                                                                                                                                                        |
| `<SubAction name="SubAction{subActionIndex}" type="{subActionType}">`               |                                                                                                                                                                        |
| `<SubActionKey>{DataboxName}</SubActionKey>`                                        | Returning Databox name-value pairs.                                                                                                                                    |
| `<SubActionValue>{DataboxValue}</SubActionValue>`                                   |                                                                                                                                                                        |
| `{addressXml}`                                                                      | Recorded via Address question types                                                                                                                                    |
| `</SubAction>`                                                                      |                                                                                                                                                                        |
| `<Custom name="Custom{customIndex}">`                                               |                                                                                                                                                                        |
| `<CustomKey>{dataKeyName}</CustomKey>`                                              | Custom export items                                                                                                                                                    |
| \<Value>{value}\</Value>                                                            |                                                                                                                                                                        |
| `</Custom>`                                                                         |                                                                                                                                                                        |
| `<Uploads>`                                                                         | Contains as many File elements as used (since v4.1.4.3)                                                                                                                |
| `<File>Full url to file</File>`                                                     | Files are not retained and must be downloaded immediately                                                                                                              |
| `</Uploads>`                                                                        |                                                                                                                                                                        |
| `</Call>`                                                                           |                                                                                                                                                                        |
| `<ROLDetail>`                                                                       | **NOTE:** *online only where Keyfax appointments are enabled.*                                                                                                         |
| `<Appointments> e.g. Mon 08:00-12:00, Tue 08:00-12:00</Appointments>`               | *Preferred appointment slots are configurable.*                                                                                                                        |
| `</ROLDetail>`                                                                      |                                                                                                                                                                        |
| `<GUID>{as returned from Keyfax Startup}</GUID>`                                    |                                                                                                                                                                        |
| `<Status>1</Status>`                                                                | 1 = completed, 2 = cancelled                                                                                                                                           |
| `</KeyfaxData>`                                                                     |                                                                                                                                                                        |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.keyfax.biz/integrations/apis/soap/xml-schemas/results-schema.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
