Welcome, Guest Login

Support Centre

Can I import multiple known facts at once?

Last Updated: Jul 18, 2013 04:21PM BST
Note: This article details how to import facts into the database without sending a message. If you are wanting to send a message to multiple addresses at the same time as adding facts, see this article instead.

There are times, especially when first starting out with mkryptor, that you may want to load up the database with a set of existing client details. For this purpose, mkryptor provides a special mailbox.

For mkryptor cloud, the address of this mailbox is: knownfacts@cloud.mkryptor.com.

For private mkryptor server installs, the address is knownfacts@mkryptor.local.

There are 2 different ways to import facts:

  1. Typing them in the email body
  2. Attaching an XML/Excel/CSV document to the message

1. Typing multiple facts directly into the email body

This is done by use of the ##TO tag. Each address is specified using the ##TO tag. The facts immediately following that address will be stored against the address, then use another ##TO tag to start with the next address.
  • Start a new email
  • Address it to knownfacts@mkryptor.local (or for mkryptor cloud users, knownfacts@cloud.mkryptor.com)
  • Put anything you like as th subject (it can be left blank too)
  • Type the ##TO addresses and known facts as the message body. See the example below:
TO: KnownFacts@mkryptor.local
SUBJECT: facts in body example

##To: john.doe@company.com
##Date Of Birth: 01/01/1970
##Post Code: EC2 7BB

##To: AnAddress@somewhereelse.com
## Mother's Maiden Name: Smith
##Your cat's favourite food brand : Whiskers

  • Send the message
  • You should receive a notification back from mkryptor to say that all the addresse/facts were saved successfully

2. Attaching an XML/Excel/CSV file

This method makes use of the ##MERGE tag. You attach a file to the message and then use the ​##MERGE tag to tell mkryptor to read the file

Ignoring for the moment the format of the files (we'll come to that later), to import data from an attachment you simply do the following:
  • Start a new email
  • Address it to knownfacts@mkryptor.local (knownfacts@cloud.mkryptor.com for mkryptor cloud)
  • Attach the file that you wish to import data from to the email
  • The subject can be anything you like (or leave it blank)
  • In the body of the email, type ##merge:filename.ext (where filename.ext is the file that you have attached.
TO: KnownFacts@mkryptor.local
SUBJECT: importing facts from CSV
ATTACHMENTS: customerdata.csv

##MERGE: customerdata.csv ​

File Formats

Now let's take a look at what needs to go inside the file that you're importing...

CSV / Excel (xslx)

Note: Excel files must be in the Excel 2007 (or later) format. The old style Excel files cannot be read.
  • The first row must contain the column headers (i.e., the Known Fact questions)
  • All other rows must contain data (i.e., the Known Fact answers)
  • All column headers that you wish to import must begin with ##
  • There must be a column called ##To. This should contain the email address that the rest of the row refers to
##TO ##First Name ##Post Code
someone@somewhere.com Cedric E3 2NN
you@me.com Sandra CO2 8QQ
john@doe.org John N2 1RJ


While XML files are slightly more complicated, they do offer much greater flexibility. For instance, whereas CSV only allows you to have the same questions for each adress, with XML it is possible to have a completely different set of questions for every recipient address in the file.

The XML format used by mkryptor is as follows:
       <Fact Name="##Email" Value="user1@domain1.com" />
       <Fact Name="Account Number" Value="123456789" />
       <Fact Name="Post Code" Value="N99 2543" />
       <Fact Name="Date Of Birth" Value="01/01/2012" />
       <Fact Name="##Email" Value="user2@domain2.com" />
       <Fact Name="Car registraion number" Value="AB51 G34" />
       <Fact Name="Favourite pet" Value="Hamster" />
  • The file must contain exactly 1 <KnownFacts> element
  • The <KnownFacts> element can contain any number of <Recipient> elements
  • Each <Recipient> contains the data for one recipient address
  • Each <Recipient> Element can contain any number of <Fact> elements
  • Each <Fact> must have a Name and a Value attribute (Where Name is the question and Value is the answer
  • Each <Recipient> must contain a <Fact> with a Name of ##Email and the Value will be the email address that the rest of the <Fact>s in the <Recipient> belong to. 
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
Invalid characters found