This document describes how you can make your organization's online donation system compatible with TntConnect. The technical details are spelled out so that you can provide your own custom solution. It requires a knowledge of computer programming.
If you'd like to use an existing cloud service so that you can become TNT-compatible more quickly:
How can my organization become "TNT-compatible"?
Once you are TntConnect-compatible, your staff will be able to use TntConnect to connect to your system to:
- Download contribution details
- Download names and addresses of donors
- Be notified of their staff account balance
Not only will your staff be able to use these features, but their application will be branded with your organization's logo. Also, while they are using the "Web Input" features of TntConnect, you can display your own advertisement/announcement banner.
This is an example of the logo you can provide:
This is an example of the advertising banner you can provide:
What it takes...
- Query INI file
- Account Balance Query
- Donations Query
- Addresses Query
- Addresses By IDs Query
- Profiles Query (Optional) <new for TntConnect 2.0>
- Designations Query (Optional) <future: TntConnect 3.2>
Query INI File
You need to provide a Query INI File. This file will provide the web address and parameter template needed to download the results of the query. Below is an example. Notice it is based on a standard Windows INI file format.
[APPLICATION] MinimumVersion=1.5.0 RecommendedVersion=1.5.0
[ORGANIZATION] RedirectQueryIni= Name=Your Organization Name Abbreviation=MyOrg WebLogo-JPEG-470x120=http://www.myorg.org/WebLogo.jpg AccountHelpUrl=http://www.myorg.org/staffaccounthelp.html BannerAdUrl-468x60=http://www.myorg.org/bannerad.html MinimumWebGiftDate=1/1/1990 Code=MyOrg-USA QueryAuthentication=0 MinPidLength=0 OrgHelpEmail=help@myorg.org OrgHelpUrl=https://www.myorg.org/help.htm OrgHelpUrlDescription=Click here to report this issue over the Web! OrgHelpOther=You may also reach the CCC Call Center at 407-826-2948. RequestProfileUrl=https://www.myorg.org/requestprofile.htm StaffPortalUrl=http://myorg.org/staffportal.html DefaultCurrencyCode=USD AllowPassiveAuth=True
[ACCOUNT_BALANCE] Url=https://www.myorg.org/cgi-bin/StaffAccountApp/ Post=Action=TntBalance&Username=$ACCOUNT$&Password=$PASSWORD$
[ACCOUNT_BALANCE.2] Post=Action=TntBalance&Username=$ACCOUNT$&Password=$PASSWORD$&ProfileCode=$PROFILE$
[DONATIONS] Url=https://www.myorg.org/cgi-bin/StaffAccountApp/ Post=Action=TntDonList&Username=$ACCOUNT$&Password=$PASSWORD$&DateFrom=$DATEFROM$&DateTo=$DATETO$
[DONATIONS.2] Post=Action=TntDonList&Username=$ACCOUNT$&Password=$PASSWORD$&ProfileCode=$PROFILE$&DateFrom=$DATEFROM$&DateTo=$DATETO$
[ADDRESSES] Url=https://www.myorg.org/cgi-bin/StaffAccountApp/ Post=Action=TntAddrList&Username=$ACCOUNT$&Password=$PASSWORD$&DateFrom=$DATEFROM$
[ADDRESSES.2] Post=Action=TntAddrList&Username=$ACCOUNT$&Password=$PASSWORD$&ProfileCode=$PROFILE$&DateFrom=$DATEFROM$
[ADDRESSES_BY_PERSONIDS] Url=https://www.myorg.org/cgi-bin/StaffAccountApp/ Post=Action=TntAddrList&Username=$ACCOUNT$&Password=$PASSWORD$&Persons=$PERSONIDS$
[ADDRESSES_BY_PERSONIDS.2] Post=Action=TntAddrList&Username=$ACCOUNT$&Password=$PASSWORD$&ProfileCode=$PROFILE$&Persons=$PERSONIDS$
[PROFILES.2] Url=https://www.myorg.org/cgi-bin/StaffAccountApp/ Post=Action=Profiles&Username=$ACCOUNT$&Password=$PASSWORD$
[DESIGNATIONS.3] Url=https://www.myorg.org/cgi-bin/StaffAccountApp/ Post=Action=TntDesigs&Username=$ACCOUNT$&Password=$PASSWORD$&ProfileCode=$PROFILE$
|
Now let me explain the meaning of each value...
[APPLICATION] /// Minimum and recommended versions of TntConnect MinimumVersion=1.5.0 RecommendedVersion=1.5.0
[ORGANIZATION] /// Very first thing TntConnect checks, allows for permanent redirection of TntConnect to new query.ini url RedirectQueryIni=
/// Specify the name of your organization here. Name=Your Organization Name
/// Specify a short abbreviation of your organization here. Abbreviation=MyOrg
/// URL of where your logo can be downloaded (JPEG only). WebLogo-JPEG-470x120=http://www.myorg.org/WebLogo.jpg
/// URL to help your staff get setup with an account. AccountHelpUrl=http://www.myorg.org/staffaccounthelp.html
/// URL of your banner ad. BannerAdUrl-468x60=http://www.myorg.org/bannerad.html
/// Boundary of how back your online donation system provides data for. (DATE) MinimumWebGiftDate=1/1/1990
/// Unique code to represent your ministry internally to TntConnect. (25 chars max! User never sees this.) Code=MyOrg-USA
/// Set this to "1" if you want the queries to use basic HTTP authentication QueryAuthentication=0
/// TntConnect internally removes leading zeros from numeric donor account ids. Specify the minimum number /// of digits a donor id should be, and TntConnect will add leading zeros when returning them back in the /// "Addresses By IDs Query" query. MinPidLength=0
/// Specify an email address where users can report errors with your download process. OrgHelpEmail=help@myorg.org
/// Specify a url where users can report errors with your download process. OrgHelpUrl=https://www.myorg.org/help.htm
/// Specify the text users will see for OrgHelpUrl. OrgHelpUrlDescription=Click here to report this issue over the Web!
/// Specify alternative text for how users can get help with downloading information. OrgHelpOther=You may also reach the CCC Call Center at 407-826-2948.
/// Specify the url where users can request new user profiles. RequestProfileUrl=https://www.myorg.org/requestprofile.htm
/// Specify the url where users can view a staff portal. StaffPortalUrl=http://myorg.org/staffportal.html
/// <new for TntConnect 2.1.68> indicates if TntConnect can attempt logging in while user types password. AllowPassiveAuth=True
/// <new for TntConnect 3.1> Specify the assumed base currency code (ISO 4217 3-char) for gifts DefaultCurrencyCode=USD
/// The rest of these sections describe Web Queries. A Web Query has a Url and a Post. /// The Url is where TntConnect requests data. /// The Post is a template of query encoded parameters that get POST-ed to the URL. /// More information is provided below to describe the details.
[ACCOUNT_BALANCE] Url=https://www.myorg.org/cgi-bin/StaffAccountApp/ Post=Action=TntBalance&Username=$ACCOUNT$&Password=$PASSWORD$
[ACCOUNT_BALANCE.2] [DONATIONS] [DONATIONS.2] [ADDRESSES] [ADDRESSES.2] [ADDRESSES_BY_PERSONIDS] [ADDRESSES_BY_PERSONIDS.2] [PROFILES.2] [DESIGNATIONS.3]
|
Some values in the query.ini are undocumented above becuase they have been deprecated. This means that they are no longer supported. Here's a list of these values:
- [ORGANIZATION] WebLogo-JPEG-476x100
- [ORGANIZATION] WebPortalUrl-470x120
The benefit of keeping the instructions in this file is that if you later change the URL or POST template of your query, you can just edit the Query INI File and make a seamless transition. The staff using the program will never know it changed.
TntConnect-version specific sections <new for TntConnect 2.0>
TntConnect 2.0 and newer support version specific sections. For example a client running TntConnect 3.0 will search for the "DONATION" section by using the first out of this list that it finds first with the requested value:
- [DONATIONS.3.1]
- [DONATIONS.3]
- [DONATIONS.2.1]
- [DONATIONS.2.0]
- [DONATIONS.2]
- [[DONATIONS]
The Queries
--Placeholders--
Each query has a URL and a POST. The URL specifies your online donation server object (CGI object, for example). The POST specifies the data to send with the HTTP POST transaction. The POST is in a template form. These placeholders are key words that will be substituted by the appropriate string based on the user's input in TntConnect:
$ACCOUNT$ |
The user name of the staff logging in to the donation system. |
$PASSWORD$ |
The password of the staff logging in to the donation system. |
$PROFILE$ |
<new for TntConnect 2.0> The profile code of the staff logging in to the donation system. If the Profiles query is not supported, this will always be blank. Note: The $PROFILE$ placeholder is never provided in the Profiles Query itself. |
$DATEFROM$ |
The specified beginning date. (M/D/YYYY) (I'll explain later where and how this is used.) |
$DATETO$ |
The specified ending date. (M/D/YYYY) (I'll explain later where and how this is used.) |
$PERSONIDS$ |
A comma separated list of donor IDs. (I'll explain later where and how this is used.) |
So for example, if I defined my Post value by:
Post=Action=TntBalance&Username=$ACCOUNT$&Password=$PASSWORD$
And if my user name was "JohnDoe", and my password was "abc123" then the following data would be send with the HTTP POST transaction:
Action=TntBalance&Username=JohnDoe&Password=abc123
--Standard Response--
Each query should return its results as CSV text. I will describe the
field names expected for each query.
--Error Response--
Each query should handle invalid conditions (such as an invalid username) by
returning two lines of text. The first line of text should be "ERROR".
The second line of text is the error description. Here are a couple of
examples to give you the general idea.
ERROR Server is down for maintenance.
|
Note for anyone consuming this api, some existing legacy servers may return errors using a different format, such as BAD_PASSWORD instead of ERROR, with a multi-line error description.
Account Balance Query
The purpose of this query is to simply return the staff account balance of the staff member submitting the request. It only uses the $ACCOUNT$, $PASSWORD$ and $PROFILE$ placeholders.
Example result:
EMPLID |
ACCT_NAME |
BALANCE |
12345678 |
Doe, John & Jane |
1225.30 |
Result in it's raw form just in case you are not familiar with the CSV format:
EMPLID,ACCT_NAME,BALANCE 12345678,"Doe, John & Jane",1225.30 |
Field Descriptions:
FieldName |
Description |
EMPLID |
Comma separated list of designation ids (A18) associated with this user/profile. |
ACCT_NAME |
List of designation account names (A50) associated with this user. Each name is delimited by carriage returns and line feeds (vbCrLf or #13#10), and correlates to designation ids found in EMPLID. |
BALANCE |
(Text) Custom text that describes the user's account balance. |
Donations Query
The purpose of this query is to return all donation detail data for the staff member within a certain date range. In addition to the usual $ACCOUNT$, $PASSWORD$ and $PROFILE$ placeholders, it also uses $DATEFROM$ and $DATETO$. Keep in mind that these placeholders come in the (M/D/YYYY) format. The $DATEFROM$ and $DATETO$ placeholders describe the beginning and ending dates of the query. You should include donation data for all dates between and including these dates. The beginning date will be limited by the "MinimumWebGiftDate" value in the Query INI file.
Here's an example result:
"PEOPLE_ID","ACCT_NAME","DISPLAY_DATE","AMOUNT","DONATION_ID","DESIGNATION","MOTIVATION" "921875429","Smith, Dave J & Julie J","08/23/2002","60","J5INQ","0455770","Z01000" "332812300","Pine Hills Christian Church","08/22/2002","50","J5E2S","0455770","Z01000" "220389751","Fryerson, Sue","08/22/2002","40","J5EGE","0455770","Z01000"
|
Field Descriptions:
FieldName |
Type |
TntConnect Version |
Description |
PEOPLE_ID |
A18 |
|
Donor Code/ID |
ACCT_NAME |
A50 |
|
Donor full name |
DISPLAY_DATE |
DATE |
|
Date of contribution |
AMOUNT |
FLOAT |
|
Amount of contribution |
DONATION_ID |
A18 |
|
Donation Code/ID |
DESIGNATION |
A18 |
|
What account this donation is designated for (normally same as employee id) |
MOTIVATION |
A18 |
|
(Optional) If you track this in your donation system you may include this code here. |
PAYMENT_METHOD |
A18 |
3.0 |
(Optional) Payment method of this donation. |
MEMO |
MEMO |
3.0 |
(Optional) Any comments associated with this gift. |
TENDERED_AMOUNT |
FLOAT |
3.1 |
(Optional) Amount of donation as tendered by donor. You may leave this blank if it is tendered in the same as currency code defined in the query.ini file. |
TENDERED_CURRENCY |
A3 |
3.1 |
(Optional) Currency code (ISO 4217 3-char) of donation as tendered by donor. You may leave this blank if it is the same as the default currency code from the query.ini file. |
BASE_CURRENCY |
A3 |
3.1 |
(Optional) Base currency code (ISO 4217 3-char) of donation as represented by AMOUNT. The only case where it is valid to provide a value for this field is when importing a DataSync file without an [Organization] section. Apart from this exception, this field is not to be used. Instead, "DefaultCurrencyCode" should be defined once in the [Organization] section. |
PERSONAL |
BOOL |
3.2 |
(Optional) Blank implies "FALSE". Indicates if the gift is intended to be a personal gift for the staff member (which usually means it's not tax deductible). |
Addresses Query
The purpose of this query is to return detailed name, address and phone data for the staff member's donors. In addition to the usual $ACCOUNT$, $PASSWORD$ and $PROFILE$ placeholders, it also uses $DATEFROM$. Keep in mind that this parameter comes in the (M/D/YYYY) format. The $DATEFROM$ placeholder limits the address list to only those that have changed since the given date. If the given date is blank, the user is requesting ALL addresses.
Note: You may simply ignore the $DATEFROM$ parameter and return all addresses every time if you wish. But keep in mind that this will generally increase the download time for the user.
All fields are optional (column header must exist, but data can be blank) except PEOPLE_ID and ACCT_NAME.
Here's an example result:
"PEOPLE_ID","ACCT_NAME","ADDR1","ADDR2","ADDR3","ADDR4","CITY","STATE","ZIP",... "921875429","Smith, Dave J & Julie J","630 Pine St",,,,"Hickleman","SD","18372-2637",... "332812300","Pine Hills Christian Church","1212 Elm Cir",,,,"Orlando","FL","32828-1868",... "220389751","Fryerson, Sue","900 S Sarmon Dr",,,,"Mitchell","SD","57302-9244", ...
|
Field Descriptions:
FieldName |
Type |
TntConnect Version |
Description |
PEOPLE_ID |
A18 |
|
Donor Code/ID |
ACCT_NAME |
A50 |
|
Donor full name |
INFO_URL |
MEMO |
3.0 |
URL to view/edit donor information. |
RELATED_IDS |
MEMO |
3.0 |
A comma seperated list of related donor codes/ids. |
DECEASED |
BOOL |
3.0 |
Blank implies "FALSE". Is the donor deceased? |
PERSON_TYPE |
A1 |
|
"O" or "P" (Organization or Person) |
LAST_NAME_ORG |
A50 |
|
Last Name or Organization Name |
ORG_CONTACT_PERSON |
A50 |
3.0 |
[PERSON_TYPE="O"] Contact person for this organization. |
TITLE |
A25 |
|
[PERSON_TYPE="P"] Title (Mr., Mrs.) |
FIRST_NAME |
A25 |
|
[PERSON_TYPE="P"] First Name |
MIDDLE_NAME |
A25 |
|
[PERSON_TYPE="P"] Middle Name |
SUFFIX |
A25 |
|
[PERSON_TYPE="P"] Suffix (Jr., Sr.) |
SP_TITLE |
A25 |
|
[PERSON_TYPE="P"] for spouse |
SP_FIRST_NAME |
A25 |
|
[PERSON_TYPE="P"] for spouse |
SP_MIDDLE_NAME |
A25 |
|
[PERSON_TYPE="P"] for spouse |
SP_LAST_NAME |
A25 |
|
[PERSON_TYPE="P"] for spouse |
SP_SUFFIX |
A25 |
|
[PERSON_TYPE="P"] for spouse Note: If provided, it is concatenated with a space to SP_LAST_NAME. |
ADDR1 |
MEMO |
|
Street Address (Line 1) |
ADDR2 |
MEMO |
|
Street Address (Line 2) |
ADDR3 |
MEMO |
|
Street Address (Line 3) |
ADDR4 |
MEMO |
|
Street Address (Line 4) |
CITY |
A50 |
|
City |
STATE |
A50 |
|
State |
ZIP |
A25 |
|
Postal Code |
COUNTRY |
A3 |
|
(A3) ISO 3166 Alpha 3 country code <new in TntConnect 2.0> ISO 3166 Alpha 2 country codes are supported in TntConnect 2.0. |
CNTRY_DESCR |
A50 |
|
Name of country. |
ADDR_CHANGED |
DATE |
|
When the address was last changed. |
PHONE |
A50 |
|
Phone number. |
PHONE_CHANGED |
DATE |
|
When the phone was last changed. |
MOBILE_PHONE |
A50 |
3.0 |
Mobile phone number. |
MOBILE_PHONE_CHANGED |
DATE |
3.0 |
When the mobile phone was last changed. |
SP_MOBILE_PHONE |
A50 |
3.0 |
Spouse mobile phone number. |
SP_MOBILE_PHONE_CHANGED |
DATE |
3.0 |
When the spouse mobile phone was last changed. |
EMAIL |
MEMO |
3.0 |
Email address. |
EMAIL_CHANGED |
DATE |
3.0 |
When the email address was last changed. |
SP_EMAIL |
MEMO |
3.0 |
Spouse email address. |
SP_EMAIL_CHANGED |
DATE |
3.0 |
When the spouse email address was last changed. |
MEMO |
MEMO |
3.0 |
A note regarding the donor. |
Addresses By IDs Query
This Query only differs from the Addresses Query in that it uses the $PERSONIDS$ parameter instead of the $DATEFROM$ parameter. The $PERSONID$ parameter is substituted by a comma separated list of donor IDs. These donor IDs are obtained from donations in the Donations Query. TntConnect will never submit a request with more than 200 donor IDs.
Note: You may simply ignore the $PERSONIDS$ parameter and return all addresses every time if you wish. But keep in mind that this will generally increase the download time for the user.
Profiles Query (Optional) <new for TntConnect 2.0>
The purpose of this query is to return a list of different profiles associated with the user. This allows a user to have different "modes" for downloading information, without having to setup different username/passwords for each mode. This works especially well in a Single Sign On (SSO) environment.
Example result:
PROFILE_CODE |
PROFILE_DESCRIPTION |
|
Staff Account (Default) |
MIN1 |
Operating Account #1 |
MIN2 |
Operating Account #2 |
Field Descriptions:
FieldName |
Description |
PROFILE_CODE |
(A18) A code to identify this profile. A blank profile code would be the default profile associated with the account. Note: The Field Name "ROLE_CODE" was supported at one time, but is now deprecated for new work. |
PROFILE_DESCRIPTION |
(A50) A description of the profile. This is what the user sees. Note: The Field Name "ROLE_DESCRIPTION" was supported at one time, but is now deprecated for new work. |
Designations Query (Optional) <future: TntConnect 3.2>
The purpose of this query is to simply return the designations of the staff member submitting the request. It only uses the $ACCOUNT$, $PASSWORD$ and $PROFILE$ placeholders.
Example result:
DESIG_ID |
DESIG_NAME |
ORG_PATH |
12345678 |
Doe, John & Jane |
/CAMPUS/STAFF/ |
Field Descriptions:
FieldName |
Description |
DESIG_ID |
(A18) Designation id associated with this user/profile. |
DESIG_NAME |
(A50) Designation account name associated with this user. |
ORG_PATH |
(Text) Where this designation fits in the organizational tree. |
Data Types Explained
-
A25, a text column with a maximum of 25 characters
-
MEMO, a text column with no predefined length limits
-
DATE, a date formatted as M/D/YYYY (or <new in TntConnect 3.1> the YYYY-MM-DD format).
-
BOOL, a boolean as "TRUE" or "FALSE"
-
FLOAT, a floating point number. Currency symbols or thousands separators are not allowed. The decimal separator must be a period.
(Note: for all types, leading and trailing spaces are removed from the value. So " ABC " is always trimmed down to just "ABC".)
Case Insensitivity
TntConnect will store designation ids, donor ids and donation ids exactly as it is received. (Leading zeros will be removed from numeric donor ids.) But internally when TntConnect is syncing incoming data, it will match up these ids in a case insensitive way. So a donation id of "ABC" and "abc" are the same from TntConnect's perspective. Sending your staff two donations with an id of "ABC" and "abc" respectively will either result in a "duplicate id error" in TntConnect or it will overwrite the one donation with the other.
Testing your compatibility with TntConnect
To test your online donation system's compatibility with TntConnect, pull up the "Gift Input from Web" screen. Where it has you choose your Organization, hold the "Shift" key down while you drop down the list and then choose "Custom". Then you can simply type in the URL of your Query INI File. That is all there is to it!
Making it easy for your staff to connect...
If you want to include your organization in the drop down list where you choose the Organization, just send me an email. (troy@tntware.com) Be sure to include your organization's name, and the URL of your Query INI File. I can update the list on my website, and your organization will automatically appear in the list.
Then when your staff member tries to do "Gift Input from Web" for the first time, they can just select your organization's name in the list. It couldn't be much easier!