Skip to content

Instantly share code, notes, and snippets.

@zubairov
Created April 8, 2014 13:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zubairov/10120860 to your computer and use it in GitHub Desktop.
Save zubairov/10120860 to your computer and use it in GitHub Desktop.

This document describes generalized approach to describing contacts data based on analyzing various contact data sources.

First version of the generalized contact entity

The initial contacts widget implementation had the following fields:

  • Source.
  • Email.
  • Given name.
  • Family name.

Second version of the generalized contact entity

Analyzing fields returned by existing components shows that:

  • LinkedIn component has the smallest amount of fields. So, if we choose fields other than in his list - these fields will be not available from this component.
  • LinkedIn component has "Phone" and "Address" ("Mailing Address" in SalesForce terms). So, these 2 fields are first candidates to be added.

GoogleContacts item fields

GoogleContacts items are described by the following schema:

    "id": {
        "type": "string",
        "title": "Identifier"
    },
    "updated": {
        "type": "string",
        "title": "Update date"
    },
    "title": {
        "type": "string",
        "title": "Title"
    },
    "content": {
        "type": "string",
        "title": "Content / Notes"
    },
    "name": {
        "type": "object",
        "properties": {
            "fullName": {
                "type": "string",
                "title": "Full Name"
            },
            "givenName": {
                "type": "string",
                "title": "Given Name"
            },
            "familyName": {
                "type": "string",
                "title": "Family Name"
            }
        }
    },
    "nickName": {
        "type": "string",
        "title": "Nickname"
    },
    "fileAs": {
        "type": "string",
        "title": "File As"
    },
    "organization": {
        "type": "object",
        "properties": {
            "name": {
                "type": "string",
                "title": "Organization Name"
            },
            "title": {
                "type": "string",
                "title": "Organization Title"
            }
        }
    },
    "email": {
        "type": "string",
        "title": "Email Address"
    },
    "messenger": {
        "type": "object",
        "properties": {
            "address": {
                "type": "string",
                "title": "IM Address"
            },
            "protocol": {
                "type": "string",
                "title": "IM Protocol"
            }
        }
    }

LinkedIn contact fields

LinkedIn contacts have the following fields:

    "firstName": {
        "title": "First Name",
        "type": "string"
    },
    "lastName": {
        "title": "Last Name",
        "type": "string"
    },
    "phoneNumbers": {
        "title": "Phone Numbers",
        "type": "array",
        "properties": {
            "phoneType": {
                "title": "Phone Type",
                "type": "string"
            },
            "phoneNumber": {
                "title": "Phone Number",
                "type": "string"
            }
        }
    },
    "emailAddress": {
        "title": "E-Mail Address",
        "type": "string"
    },
    "mainAddress": {
        "title": "Address",
        "type": "string"
    }

Xing contact fields

    "first_name": {
        "type": "string",
        "title": "First name",
        "id": "first_name",
        "required": true
    },
    "last_name": {
        "type": "string",
        "title": "Last name",
        "id": "last_name",
        "required": true
    },
    "gender": {
        "type": "string",
        "title": "Gender",
        "id": "gender",
        "required": true
    },
    "active_email": {
        "type": "string",
        "title": "Active Email",
        "id": "active_email",
        "required": true
    },
    "birth_date": {
        "type": "object",
        "properties": {
            "day": {
                "type": "integer",
                "title": "Birth Day",
                "id": "day"
            },
            "month": {
                "type": "integer",
                "title": "Birth Month",
                "id": "month"
            },
            "year": {
                "type": "integer",
                "title": "Birth Year",
                "id": "year"
            }
        }
    },
    "private_address": {
        "type": "object",
        "properties": {
            "street": {
                "type": "string",
                "title": "Private Street",
                "id": "street"
            },
            "zip_code": {
                "type": "string",
                "title": "Private Zip Code",
                "id": "zip_code"
            },
            "city": {
                "type": "string",
                "title": "Private City",
                "id": "city"
            },
            "province": {
                "type": "string",
                "title": "Private Province",
                "id": "province"
            },
            "country": {
                "type": "string",
                "title": "Private Country",
                "id": "country"
            },
            "email": {
                "type": "string",
                "title": "Private Email",
                "id": "email"
            },
            "phone": {
                "type": "string",
                "title": "Private Phone",
                "id": "phone"
            },
            "fax": {
                "type": "string",
                "title": "Private Fax",
                "id": "fax"
            },
            "mobile_phone": {
                "type": "string",
                "title": "Private Mobile",
                "id": "mobile_phone"
            }
        }
    },
    "business_address": {
        "type": "object",
        "properties": {
            "street": {
                "type": "string",
                "title": "Business Street",
                "id": "street"
            },
            "zip_code": {
                "type": "string",
                "title": "Business Zip Code",
                "id": "zip_code"
            },
            "city": {
                "type": "string",
                "title": "Business City",
                "id": "city"
            },
            "province": {
                "type": "string",
                "title": "Business Province",
                "id": "province"
            },
            "country": {
                "type": "string",
                "title": "Business Country",
                "id": "country"
            },
            "email": {
                "type": "string",
                "title": "Business Email",
                "id": "email"
            },
            "phone": {
                "type": "string",
                "title": "Business Phone",
                "id": "phone"
            },
            "fax": {
                "type": "string",
                "title": "Business Fax",
                "id": "fax"
            },
            "mobile_phone": {
                "type": "string",
                "title": "Business Mobile",
                "id": "mobile_phone"
            }
        }
    }

SalesForce module contact fields

SalesForce CRM contact fields

  • Contact Owner;
  • Phone;
  • Name;
  • Home Phone;
  • Account Name;
  • Mobile;
  • Title;
  • Other Phone;
  • Department;
  • Fax;
  • Birthdate;
  • Email;
  • Reports To;
  • Assistant;
  • Lead Source;
  • Web;
  • Asst. Phone;
  • Mailing Address;
  • Other Address;
  • Languages;
  • Level;
  • Created By;
  • Last Modified By;
  • Description.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment