Keyfax
  • 📋What is Keyfax?
  • Product Suite
    • Keyfax Administrator Tools
      • System Requirements
      • Installation
      • Logging On
      • Navigation
      • Exclusive Mode
      • Script Levels
        • Master Scripts
          • Category Editing
          • Topic Editing
          • Self-Service Categories
        • System Scripts
          • Cancel
          • Priority Justifications
          • Results
          • Special Instructions
          • Startup
        • Script Sets
          • Category Properties
          • Setting up Topics
          • Topic Properties
          • Loading Script Sets
      • Script Editing
        • Script Editing - The basics
        • References
        • Testing your changes
        • Script Flows
      • Script Entities
        • Databoxes
          • Script Data
            • Host-specific notes
          • SQL Query
            • Testing SQL Query Databoxes
          • Import XML
          • Export XML
          • System Values
          • Company Data
          • Testing Databoxes & Expressions
          • Databox Read
          • Databox Write
          • Databoxes in Messages & Tasks
        • Questions
          • Address
          • Checklist
          • Date/Time
          • Dynamic Lists
            • Testing Dynamic Lists
            • Dynamic List Examples
          • External Forms (eForms)
            • External Forms - Technical
          • File Upload
          • List
          • Numeric
          • Text
          • Video Call
        • Asset Data
        • Markers
        • Messages
          • Testing Messages
        • Services
          • Host-specific notes
        • Priorities
        • Tasks
          • Enclosures & Attachments
          • Continuations
          • Host-specific notes
      • Reports
      • Databox Examples
        • Business Days
        • Working Hours
        • Time of day
        • Higher priority jobs
        • Script Duration
        • How did it happen?
        • Repair Description
        • Concatenating CSV
        • Tenant Handbook
        • Multi-line Addresses
        • Priority / Response Days
        • Contains Text
      • Databox Expressions
        • Text Expressions
          • CSV
          • Entry
          • Exists
          • FieldMerge
          • Index
          • IndexOf
          • InList
          • Item
          • Len
          • ListTidy
          • Lower
          • PadLeft
          • Replace
          • Row
          • RowMerge
          • SubStr
          • Trim
          • Upper
          • WCase
        • Numeric Expressions
          • Abs
          • AsNum
          • Between
          • Int
          • Mod
          • Number
          • Result
          • Round
        • Date Expressions
          • After
          • AsDate
          • Before
          • BetweenDates
          • DateAdd
          • Day
          • Month
          • Now
          • Today
          • WeekDay
          • Year
        • Number Formatting
        • Operators And Literals
        • Logical Expressions
        • Additional Functions
          • Ds
      • Users
        • Finding active users
        • Keyfax SSO – via Microsoft Entra ID Support
      • Advanced
        • Base Task Templates
          • Email Task Templates
          • Letter Task Templates
          • Note Task Templates
          • SMS Task Templates
          • VoiceSage Task Templates
          • Host-specific notes
        • Export & Import
        • Communications Queues
      • Host Operations
        • ActiveH Operations
          • Introduction
          • Actions
          • Databoxes & UDEs
          • Emails
          • Mail Merge Letters
          • Populating CallType
          • Populating JobType
          • Repairs Inspection Task
          • Repairs Interface
        • Fast Lean Smart
      • Best Practices
        • Extracting XML from Keyfax tables
        • Script Performance
        • Handling multiple rows from SQL
        • HTML Editor
        • Writing SQL Queries
      • Known Issues
        • Startup Messages
        • Running but not Visible
        • Error 1001 During Install
        • Stopped Working
    • Keyfax Staff
      • System Requirements
      • Advisor Feedback
      • Priority and Quantity
    • Keyfax Self-Service
      • System Requirements
      • Browser Support
    • KeyNamics
      • Model Driven Apps
      • Power Pages Portals
      • Installation
        • System Requirements
        • Solution Import
        • Basic Setup
        • Known Issues
      • Embedding
        • Model Driven Apps
        • Power Pages Portals
      • Configuration
        • Settings
        • Mappings
          • Creating Mappings
          • Minimum Mapping Requirements
          • Mapping Entity Form Fields
          • Mapping Lookup fields
          • Mapping Examples
        • FetchXML
          • Creating FetchXML queries
        • Logging
        • Test
      • Advanced
        • Mode Translation Rules
        • Customising Launch Button
        • Extending Export Data
        • Mapping Dump Fields
        • Mapping JSON Results
        • Enabling Help Panes
        • Mobile Operation
        • Handling uploaded content
      • Technical
        • Topology
        • Copying Environments
        • Keyfax Startup Data
        • Keyfax Export Data
    • Keyfax Client
      • Installation
        • Getting Started
        • Launch Tester
        • Uninstall / reinstall
        • Known Issues
    • Keyfax Cloud
      • Uptime Guarantee
      • Business Continuity
  • General
    • General FAQs
      • General Questions
      • Installation Questions
      • Migration Questions
      • Security Questions
      • Test & Training Questions
    • Keyfax FAQs
      • Keyfax Administrator Tools
      • Keyfax Staff
      • Keyfax Self-Service
      • KeyNamics
      • Keyfax Client
      • Keyfax Cloud
    • Issues & Solutions
      • Emails not working
    • Release Notes
      • Keyfax
        • 4.4.7
        • 4.4.6
        • 4.4.5
        • 4.4.4
        • 4.4.3
        • 4.4.2
        • 4.4.1
        • 4.4.0
        • Previous Releases
      • Keyfax Client
        • 4.0.0.44
        • 4.0.0.43
        • 4.0.0.42
        • Previous Releases
      • KeyNamics
        • 3.0.0.0
        • 2.0.0.13
        • Previous Releases
      • Older Releases
        • Staff
  • Integrations
    • API Docs
      • REST API
        • Quick Start
        • Deep Dive
        • API SDKs
          • .NET SDK
          • JavaScript SDK
          • Start-Up Data
          • Processing Results
        • API Reference
      • SOAP API
        • Quick Start
        • Error Handling
        • Status Codes
        • XML Schemas
          • Startup Schema
          • Results Schema
          • Results with Note
          • Cancelled Schema
          • Address data
      • Legacy APIs
        • Active X
        • Asynchronous Pluggable Protocols
        • XmlHttp
    • Integrations
      • Aareon
        • Introduction
        • Launching Keyfax Repairs
        • Launching Keyfax Enquiries
        • Configuration
        • SOAP based integration
        • QL Message fields
        • Known problems
      • Accuserve
      • ActiveH Desktop
        • Introduction
        • ActiveH Repair Interface
        • Known Problems
        • Keyfax Configuration
          • MISExchange.xml
          • Example Settings
          • Retrieving Block Codes
        • MIS Configuration
          • Exchange Process
          • Exchange Elements
          • User Permissions
          • User Security
          • UDE Interface
          • UDE Configuration
          • Settings
          • Desktop Configuration
          • Priorities Configuration
          • Populating Job Type
          • Populating Assigned To
          • Populating Call Classification
          • Configuring Log Call
            • Launching Keyfax from Response Repairs
          • Workflow Integration Actions
        • MIS interface Objects
          • CRM Gateway
          • Desktop Task
          • System Task Email Addressee
          • Desktop Task Action
          • Repair Request
          • Repair Request Inspection
          • Repair Request Task
      • ActiveH Portal (TIPS)
        • Introduction
        • Settings
        • Known Issues
      • ActiveH Web
      • Breeze IT
      • Caltech
      • Capita
        • Capita Housing / Academy
          • Host Table Usage
          • Troubleshooting
        • Open Housing
      • Civica
        • Civica CX
          • Introduction
          • Mappings
          • Start Up Data
          • Inspections
          • Known Issues
        • Civica CM
          • Known problems
        • Servitor
          • Example Import XML
          • Example Export XML
      • ContactView
      • Dynamics
      • Kirona
      • Lagan
      • MIS
      • MRI
      • Northgate
        • Launching Keyfax
        • Exchange process
        • XML/Field mappings
      • OneServe
      • ROCC
      • Total Mobile
        • Launching Keyfax (TASK)
        • TotalView Configuration
      • SDM
    • Best Practices
      • Integration Considerations
      • Displaying Keyfax Self-Service
  • Technical
    • General
      • Keyfax Architecture
      • Clearing Cache
    • Cloud Operation
      • Microsoft Azure
      • Amazon Web Services
    • Configuration Settings
      • Introduction
      • Paths Element
    • Developer Zone
      • eForm Technical Details
    • SQL Server
      • Freeing Space
      • Maintaining Indexes
      • Maintenance Plan
      • Restoring Live into Test
  • Links
    • Our Web Site
    • Our Blog
    • Try Keyfax
    • Contact Us
Powered by GitBook
On this page
  • Sending a Defects Period to Keyfax
  • Using a 'Customer' DataType
  • Returning Values from Keyfax
  1. Product Suite
  2. KeyNamics
  3. Configuration
  4. Mappings

Mapping Examples

Example mappings to help demonstrate KeyNamics mappings.

PreviousMapping Lookup fieldsNextFetchXML

Last updated 1 year ago

Sending a Defects Period to Keyfax

This example demonstrates how to create a Mapping in order to send data to Keyfax and the accompanying Import XML Databox that is necessary to access that data within your scripts. Assuming there is a Defects Period date field on the current form which you wish to access within your scripts. You will need to create an entity level (in this case 'MainCase', or Global Mapping (for all entities) similar to that below. THe name of the form field is cust_defectsperiod:

This Mapping will store the Defects Period in the startup data that is sent to Keyfax. In Keyfax Admin Tools, you will need to create an Import Databox (and any related Expressions) to reference this data:

Using a 'Customer' DataType

The Customer DataType is a Lookup field that you can use to specify a customer, which can be an Account or Contact. In previous releases of Dynamics 365 Customer Engagement (on-premises), several out-of-the-box entities such as the Case, Lead, and Opportunity entities, included a special kind of lookup field that represented a customer. Using this lookup field you could choose between two entities: Account or Contact.

With this new capability, you can add the Customer field to any system or custom entity. You can use the Customer field in more entities to track the customer's information in the same way you've used the Customer field in the Case, Lead, and Opportunity entities.

Let's look at an example as to how you might use a Customer data type within KeyNamics...

The requirement is that you need to set up KeyNamics Mappings to send either the Account or Contact name and address details (from the selection in the current Form's Customer Datatype field) to Keyfax in a single CSV string. You will need to set up the following Mappings and FetchXml queries, six items in all: To retrieve the name and address when the selection in the Customer field is the Account:

  1. 'Bookmark' Mapping to access the accountid on the current Form; this is used by the FetchXml query below

  2. FetchXml query to retrieve Account details and concatenate the results into a CSV string

  3. Mapping entry that invokes the FetchXml above and sends the data to Keyfax.

In much the same way, to retrieve the name and address when the selection in the Customer field is the Contact:

  1. 'Bookmark' Mapping to access the contactid on the current Form; this is used by the FetchXml query below

  2. FetchXml query to retrieve Contact details and concatenate the results into a CSV string

  3. Mapping entry that invokes the FetchXml above and sends the data to Keyfax.

Clearly, only one 'set' of mappings will work depending on what is currently selected in the Customer field. As such, it's important that no Default value is supplied in either of the above mapping entries (points 3 and 6). You may ask why? The reason is that if an Account record is currently selected on the Form and the Contact has a Default setting, this will override the Account details when sending data to Keyfax as no data wil be found. Similarly, if a Contact record is currently selected and the Account mapping has a Default setting the COntact details will be overridden by the Default. The whole premise of handling Customer fields is that one of the attempts to locate details will fail.

If no selection has been made, nothing will be sent to Keyfax.

Looking further into the Account example, the first thing to do is create a Mapping entry that accesses the Id of the Account. To retrieve this from the current form, see the Source field below. Also note that the Target is set to null and this prevents the mapping entry from being sent to Keyfax. It's a good idea to make clear this Mapping entry is merely used as a BookMark by naming it appropriately:

Next, create the FetchXml Statement to access fields as required. The example below retrieves name and address details. Notice that Bookmark #1 points at the Account Id derived from the Mapping above:

Finally, create the Mapping that invokes the FetchXml above and actualy sends the data to Keyfax. The account (or contact) name and address ends up in the Target, i.e. the 'Tenant' node, to be sent to Keyfax:

You will need to repeat the above to handle the selection of a Contact from the Customer field.

Returning Values from Keyfax

In the below example we demonstrate how to use a "Receive from Keyfax" mapping to access a specific value within the Keyfax results XML and populate an entity form field named keyfax_receive_category with this value.

Let's say we wanted to access the Fault_Category returned by Keyfax as shown below...

To access the Fault_Category value create a new mapping within KeyNamics using the following XPath query to select the Fault_Category value as highlighted above...

Fault[@name='Fault1']/Fault_Category

You can see an example of the full KeyNamics mapping below...

To identify the name of entity form fields on your entity form as used within the target value above please see the "Discovering Field Names" section within Mapping Entity Form Fields.

NOTE The "Default" value of 0 above will be used if the Fault_Category value is not returned or found within the Keyfax results XML. You can review the Keyfax results XML via the "Log" or "Results" links within the KeyNamics model driven app.