Date:               June 8, 2011

Last Updated: April 17, 2012

Contributors:          


Table Of Contents


Objective/Purpose

Notes/Questions

Introduction

In order to get your platform integrated with the Connector the following steps will occur

Technical Discussion

Connector -> Your System

This section is about the requirements for the Connector to send data to your system.  First off, your system MUST provide some type of API that the Connector can call.  The required calls in order to support integration are listed below.  Once baseline features are agreed upon, work will need to be completed in order to add support to the Connector to make API calls to your system.  Note that the Connector is a Java application and ideally you will provide a Java library which implements your API. 

Getting Started

In order to get your system integrated with the Connector, the following features must be discussed between us, and agreement reached on which of these features will be supported

  1. Prospects - Your API must implement the following methods in order to allow the Connector to create prospects
    1. Create prospect
    2. Update prospect
    3. Note: A single 'Save prospect' method is also acceptable
  2. Members - Your API must implement the following methods in order to allow the Connector to create members
    1. Create member
    2. Update member
    3. Note: A single 'Save member' method is also acceptable
    4. Note: The process of converting a prospect to a member is unique per system. 
  3. Staff Owner for prospects - When receiving prospects, the staff owner can optionally be included.  
    1. Your API must implement the following methods in order for the Connector to sync staff 
      1. Fetch list of staff - The email address must be accessible in order for the Connector to associate certain records together
    2. See below for notes on staff synchronization.  
    3. Note the Connector does NOT attempt to create or update staff in any system due to the high level of complexity and overhead of creating staff (i.e. permissions, etc...)
  4. Lead Sources - When receiving prospects, the lead source can optionally be included.  
    1. Your API must implement the following methods in order for the Connector to sync lead sources
      1. Fetch list of lead sources
      2. Create lead source
      3. Update lead source
    2. See below for notes on lead source synchronization

Your System -> Connector

General Info

The Connector is built on the concept of one fitness club (i.e. one physical location) belonging to one client.  One client may have many clubs (i.e. a 10 location chain).  All of the entities that the Connector works with (prospects, members, staff, lead sources) must belong to one client, and one club within that client.  It is important to note that all communication with the Connector is done using the IDs from YOUR SYSTEM.  While you can track the GUIDs that the Connector returns to you, you should not communicate with the Connector using these GUIDs.  Think of this way, when you make a call to the Connector you are saying: I am 'PROVIDER X', here is a prospect record that has the ID 123456 in my system, and it belongs to club 123 within the client 456.

All calls made to the Connector must include

Working With User Records

URL: http://<domain>/connector/api/2011-11/user

Fields:

Name

Description

Details

<firstname>

First name

  • Mandatory
  • TBD - Restrictions (max length, etc..)

<lastname>

Last name

  • Mandatory
  • TBD - Restrictions (max length, etc..)

<userStatus>

The status of the user

  • Mandatory
  • Must be ‘ACTIVE’ or ‘INACTIVE’

<userType>

The type of the user

  • Mandatory
  • Must be ‘PROSPECT’ or ‘MEMBER’

<birthdate>

Date of birth

  • Must be yyyy-mm-dd format

<gender>

Gender

  • Must be ‘M’ or ‘F’

<address1>               

First address field

  • TBD - Restrictions (max length, etc..)

<address2>

Second address field (not supported in InTouch)

  • TBD - Restrictions (max length, etc..)
  • Note: Currently InTouch only has one address field

<city>

City

  • TBD - Restrictions (max length, etc..)

<zipcode>

Zip Code or Postal Code

  • TBD - Restrictions (max length, etc..)

<state>

State or Province

  • TBD - Restrictions (max length, etc..)

<country>

Country (2 digit ISO code)

<mobile>

Mobile number

  • TBD - Restrictions (max length, etc..)

<email>

Email address

  • TBD - Restrictions (max length, etc..)

<homePhone>

Home phone number

  • TBD - Restrictions (max length, etc..)

<workPhone>

Work phone number

  • TBD - Restrictions (max length, etc..)

<company>

Company

  • TBD - Restrictions (max length, etc..)

Fetching User Records

Fetching a user record simply requires two attributes included in a GET call to the user web service. Example:

http://<domain>/connector/api/2011-11/user?provider=PROVIDER_ID?client_id=xxxx&club_id=xxxx&recordID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
<user>
   <providerInfo>
      <identifier>PROVIDER_ID</identifier>
      <clientID>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</clientID>
      <clubID>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</clubID>
      <recordID>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</recordID>
   </providerInfo>
   <userInfo>
      <firstname>Foo</firstname>
      <lastname>Bar</lastname>
      <birthdate>1972-03-12</birthdate>
      <gender>M</gender>
      <userStatus>ACTIVE</userStatus>
      <userType>PROSPECT</userType>
      <address1>1234 Fake St</address1>
      <address2>Apartment 1a</address2>
      <city>Spuzzum</city>
      <zipcode>12345</zipcode>
      <state>WA</state>
      <country>US</country>
      <mobile>555-555-5555</mobile>
      <email>foo@bar.com</email>
      <homePhone>555-666-6666</homePhone>
      <workPhone>555-777-7777</workPhone>
      <company>Acme Widgets</company>
      <createdBy>INTOUCH</createdBy>
      <createdDate>2012-04-10T04:11:07.023Z</createdDate>
      <modifiedBy>INTOUCH</modifiedBy>
      <modifiedDate>2012-04-10T04:11:07.023Z</modifiedDate>
   </userInfo>
</user>

Saving User Records

Here is a sample piece of XML which should be POST’ed to the user web service

<user>
   <providerInfo>
      <identifier>PROVIDER_ID</identifier>
      <clientID>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</clientID>
      <clubID>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</clubID>
      <recordID>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</recordID>
   </ providerInfo >
   <userInfo>
      <firstname>Foo</firstname>
      <lastname>Bar</lastname>
      <userStatus>ACTIVE</userStatus>
      <userType>PROSPECT</userType>
   </userInfo>
</user>

Details

Result

The following XML is returned from a save call

<response xmlns="http://www.intouchfollowup.com/api/2011-11">
   <uuid>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</uuid>
</response>

The return value contains a <response> element which contains the UUID of the record within the Connector.  Note: Though you may save this ID in your system it is not necessary as all communication with the Connector is done using your own identifiers

Saving Lead/Opportunity Data

For prospects, the Connector allows you to pass in a lead (aka opportunity) owner, as well as a lead source.  The request looks like

<user>
   <providerInfo ... snipped for brevity />
   <userInfo ... snipped for brevity />
   <leadInfo>
      <leadSource>FACEBOOK</leadSource>
      <ownerID>6b85b27e-5028-4b23-a1e2-f3aa5bf3909b</ownerID>
   </leadInfo>
</user>

Staff Are Users Too

The Connector supports the saving of staff as well.  The staff web service has a different URL but is syntactically identical to the user web service with the exception that the <userType> element must be STAFF.

http://<domain>/connector/api/2011-11/staff

Synchronizing Staff

When a new client is launched on the Connector, it is more than likely that they have been using one or more of the systems being integrated for awhile.  This means that each system may already have staff in it.  This presents a problem for systems that support assigning a staff owner to a prospect or a member.  The question is, how do we synchronize the staff list so that the staff in system A are mapped to the staff in system B.  Note that the Connector does not attempt to create staff in any remote system. It only tries to associate existing staff records with each.  The reason for this is the complexity, overhead, and restrictions surrounding staff.  For example, in most system the process of creating staff is not simple and requires setting attributes that the Connector knows nothing about (for example, roles or permissions)

The Connector attempts to associate existing staff records as follows:

Lead Sources

The Connector supports lead sources as well.  

http://<domain>/connector/api/2011-11/leadsource

Synchronizing Lead Sources

Synchronizing lead sources is very similar to synchronizing staff except if there is the ability to create a lead source, the Connector will use it.

Save Lead Source

<leadSource>
   <providerInfo>
      <identifier>PROVIDER_ID</identifier>
      <clientID>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</clientID>
      <clubID>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</clubID>
      <recordID>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</recordID>
   </providerInfo>
   <leadInfo>
      <name>Facebook</name>
      <active>true</active>
   </leadInfo>
</leadSource>
<response xmlns="http://www.intouchfollowup.com/api/2011-11">
   <uuid>cf912bbd-7d10-41a5-b37e-1e11beff4e0c</uuid>
</response>

Fetch Single Lead Source

http://<domain>/connector/api/2011-11/leadsource?provider=INTOUCH&client_id=1111&club_id=11111111-1111-1111-1111-111111111111&identifier=FACEBOOK
<leadSource>
   <providerInfo>
      <identifier>INTOUCH</identifier>
      <clientID>1111</clientID>
      <clubID>11111111-1111-1111-1111-111111111111</clubID>
      <recordID>FACEBOOK</recordID>
   </providerInfo>
   <leadInfo>
      <createdBy>INTOUCH</createdBy>
      <createdDate>2012-04-17T21:58:47.758Z</createdDate>
      <modifiedBy>INTOUCH</modifiedBy>
      <modifiedDate>2012-04-17T21:59:29.673Z</modifiedDate>
      <name>Facebook</name>
      <active>true</active>
   </leadInfo>
</leadSource>

Fetch Lead Sources

http://<domain>/connector/api/2011-11/leadsource?provider=INTOUCH&client_id=1111&club_id=11111111-1111-1111-1111-111111111111
 <leadSources>
   <leadSource>
      <createdBy>INTOUCH</createdBy>
      <createdDate>2012-04-17T21:58:47.758Z</createdDate>
      <modifiedBy>INTOUCH</modifiedBy>
      <modifiedDate>2012-04-17T21:59:29.673Z</modifiedDate>
      <name>Facebook</name>
      <active>true</active>
   </leadSource>
   <leadSource>
      <createdBy>INTOUCH</createdBy>
      <createdDate>2012-04-17T21:58:47.758Z</createdDate>
      <modifiedBy>INTOUCH</modifiedBy>
      <modifiedDate>2012-04-17T21:59:29.673Z</modifiedDate>
      <name>Corporate</name>
      <active>true</active>
   </leadSource>
</leadSources>

Errors

The Connector is build using ReSTful style web services, which is simply regular old HTTP. This means that if you make a request to fetch a user and that user isn’t found you will actually get an HTTP response status of 404 'Not Found'.  Similarly, if any type of error occurrs in the backend, an HTTP response code in the 400-599 range will be returned (these are the error codes).

In regards to real errors: from a high level this type of error should be returned depending on what has happened

<error xmlns="http://www.intouchfollowup.com/api/2011-11">
   <reason>UNKNOWN</reason>
   <errorUUID>cecfeef8-24ef-4107-8d8b-534ce6a999b8</errorUUID>
   <message>additional error details</message>
</error>

Details

 

Appendix

Turnup

This section details what is necessary to get a new client turned-up on the Connector.  The turn-up process for your system may vary slightly from other systems if there are any custom configuration options.

Information required

Security

Additional security features will be built into each version of the Connector.  Future features will include