Example Settings
Example Keyfax configuration settings for use with ActiveH Desktop.
Configuration settings are published for information purposes only. Unless express consent has been granted, changes to configuration settings must only be made by Omfax Systems/Touch-Base Ltd technicians or their representatives.
Example 1 (put current user code in startup.xml)
<MapIn>
<MISRequest
obj="CGateway"
target="UserName"
type="NA"
source="UserID"
sql="SELECT Username_VC FROM Shared_Users_T (nolock) WHERE User_ID = [value]" />
</MapIn>This example does following:
Get the value contained in the
UserIDproperty of theCGatewayobject.Use this value in the WHERE clause of the SQL statement replacing the [value] bookmark.
Execute the SQL statement against the SQL ActiveH SQL Server database.
Put the returned value in the
<UserName>element of the Keyfax start-up XML.
Example 2 (get SOR code from export.xml and assign the ScheduleID property of a CRQTask object)
<MapOut>
<MISTask
obj="CRQTask"
target="ScheduleID"
dtype="int"
length="4"
type="RD"
KFparent="Repair"
KFsource="RepairCode"
KFsourceType="MIS_REPAIR"
sql="SELECT SOR_ID FROM dbo.Shared_SORs_T WHERE SOR_Code_VC = '[value]'" />
</MapOut>This example does following:
Get the value contained in the
<Fault><Repair><RepairCode>element of the export XML.Use this value in the WHERE clause of the SQL statement replacing the [value] bookmark.
Execute the SQL statement against the SQL ActiveH SQL Server database.
Put the returned value in the
ScheduleIDproperty of a newCRQTaskobject in the MIS-AMS Repairs Request object.
Example 3 (get the description from the export.xml ActionCodeDesc and FaultText and use as a Repair Request Inspection description)
<MapOut>
<!-- MIS REPAIR INSPECTION -->
<MISTask
obj="CRQInspection"
target="Description"
dtype="varchar"
length="1500"
type="RD"
KFparent="Action"
KFsource="ActionCodeDesc"
KFsourceType="MIS_INSPECTION"
sql="" />
<MISTask
obj="CRQInspection"
target="Description.APPEND"
dtype="varchar"
length="1500"
type="RD"
KFparent=""
KFsource="FaultText"
KFsourceType="MIS_INSPECTION"
sql="" />
</MapOut>This example does following:
Get the value contained in the
<Fault><Action><ActionCode>element of the export XML.Put the returned value in the Description property of a
CRQInspectionobject in the MIS-AMS Repairs Request object.Get the value contained in the
<Fault><FaultText>element of the export XML.Append the returned value to the Description property of a CRQInspection object in the MIS-AMS Repairs Request object.
Example 4 (write a constant value to a CRM Desktop Task object)
<MapOut>
<!-- MIS EMAIL TASK -->
<MISTask
obj="CTSKTask"
target=""
dtype=""
length=""
type="FL"
KFparent="Action"
KFsource="ActionCode"
KFsourceType="MIS_EMAIL"
sql="">
<MISTask
obj="CTSKTask"
target="SystemTask"
dtype="bit"
length="1"
type="FL"
KFparent=""
KFsource="1"
KFsourceType="VALUE"
sql="" />
</MISTask>
<MISTask ...... />
</MapOut>This example does following:
As with all CRM tasks, there may be multiple Task objects to create, therefore
<MISTask>elements need to be nested.A new
CTSTaskobject is created with the<MISTask>element (by using without a target property) for each created Keyfax "Enquiry.Action".All first generation
<MISTask>child elements instruct Keyfax to write to the current CTSTask object.The SystemTask property of the current CTSTask object is set to a constant value (defined by the
KFsourceType="VALUE") which is supplied in the KFsource parameter (KFsource="1").
Example 5 (write to the SetGatewayValue method of a CRM Desktop Task object)
<MapOut>
<!-- MIS EMAIL TASK -->
<!-- These are the UDEs -->
<MISTask
obj="CTSKTask"
target=""
dtype=""
length=""
type="FL"
KFparent="Action"
KFsource="ActionCode"
KFsourceType="MIS_EMAIL"
sql="">
<MISTask
obj="CTSKTask"
target="SetGatewayValue"
dtype=""
length=""
type="FL"
KFparent="SubAction"
KFsource="SubActionValue"
KFsourceType="MIS_GATEWAY_VALUE"
sql="">
<MISTask
obj="CTSKTask"
target="SetGatewayValue.FieldName"
dtype="varchar"
length="256"
type="FL"
KFparent="SubAction"
KFsource="SubActionKey"
KFsourceType="MIS_GATEWAY_VALUE"
sql="" />
<MISTask
obj="CTSKTask"
target="SetGatewayValue.Value"
dtype="varchar"
length="255"
type="FL"
KFparent="SubAction"
KFsource="SubActionValue"
KFsourceType="MIS_GATEWAY_VALUE"
sql="" />
</MISTask>
</MISTask>
</MapOut>This example does following:
As with all CRM tasks, there may be multiple Task objects to create therefore MISTask elements need to be nested.
A new CTSTask object is created with the
<MISTask>element (by using without a target property) for each created Keyfax "Enquiry.Action".All "first generation"
<MISTask>child elements instruct Keyfax to write to the current CTSTask object.The SetGatewayValue method of the current CTSTask object requires two parameters these are defined in additional
<MISTask>child elements.The "second generation"
<MISTask>child elements instruct Keyfax to write to the current CTSTask SetGatewayValue method parameters.The first "second generation"
<MISTask>child element gets the value contained in the<Enquiry><SubAction><SubActionKey>element of the export XML, then writes it to the SetGatewayValue.FieldName parameter.The second "second generation"
<MISTask>child element gets the value contained in the<Enquiry><SubAction><SubActionValue>element of the export XML, then writes it to the SetGatewayValue.Value parameter.
Example 6 (write to the SetGatewayValueEx method of a CRM Repair Request Task)
<MapOut>
...
...
<!-- These are the UDEs -->
<MISTask obj="CRQTask" target="SetGatewayValue" dtype="" length="" type="RD" KFparent="Repair" KFsource="" KFsourceType="MIS_GATEWAY_VALUE" sql="">
<MISTask obj="CRQTask" target="SetGatewayValue.FieldName" dtype="varchar" length="256" type="RD" KFparent="" KFsource="HealthAndSafety" KFsourceType="MIS_GATEWAY_VALUE" sql="" />
<MISTask obj="CRQTask" target="SetGatewayValue.Value" dtype="bit" length="1" type="RD" KFparent="Fault" KFsource="//Nominal_Code" KFsourceType="MIS_GATEWAY_VALUE" sql="" />
</MISTask>
...
...
</MapOut>This example does following:
The
SetGatewayValuemethod of the currentCRQTaskobject requires two parameters these are defined in additional<MISTask>child elements. In reality, just for the Repairs Request object this calls a methodSetGatewayValueEx(this does not need to be considered when setting up the exchange parameters above!).In the example above,
HealthAndSafetyis the name of the target (despite being held in theKFsourceattribute) within the GatewayNominal_Codehappens to be a re-use of an export element; the contents of this (one or zero) will be stored in theHeathAndSafetyfield.
Last updated