Criteria for importing a contact

The criteria object specifies the contact to import and optionally the target database.

The criteria object has two main properties: Type and Data. These are described in the following table. Properties enclosed in brackets are optional.

Note: All string values in the object are Unicode.

Table: Criteria object properties

Property

Description

Type

Value

criteria.Type

Specifies the type of contact information to import. This is always "Contact".

string

Possible values:

  • "Contact"

criteria.Data

Specifies the contact to import.

object

Object with the properties specified below

[criteria.Data.DBUri]

Specifies the contacts database to which the contact is imported.

If this property is not specified, the default database is used. If the default database does not exist, a new database is created and the contact is imported there.

string

 

criteria.Data.SourceFile

Specifies the full path and file name of the source file from which the contact is imported.

Note:

  • The source file must in vCard format. For an example of this format, see below.

  • The source file can have any file extension or no extension. Typically, the extension is .vcf.

string

The string cannot exceed 256 characters.

vCard format example

BEGIN:VCARD
VERSION:2.1
N:Smith;John
FN:John Smith
ORG:Company Inc.
TITLE:CEO
TEL;WORK:VOICE:(555) 111-1111
TEL;HOME;VOICE:(555) 222-2222
ADR;WORK:;;Wall Street;New York City;NY;12345;United States of America
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:Wall Street=0D=0ANew York City, NY 12345=0D=0AUnited States of America
ADR;HOME:;;Broadway;New York City;NY;12345;United States of America
LABEL;HOME;ENCODING=QUOTED-PRINTABLE:Broadway=0D=0ANew York City, NY 12345=0D=0AUnited States of America
EMAIL;PREF;INTERNET:[email protected]
REV:2008042T195243Z
END:VCARD