Main Web API Documentation Information
Actual Page/Function Name:
simpleCustomerSearch
Human Readable Name or Caption:
Simple Customer Search
Page/Function Description:
Allows user to make basic customer search by specifying the database field to search and the value to search by.
Page/Function Output Type:
API - JSON or WDDX
Categories:
customer
Extra Page/Function Notes:


Parameters
Scope Name Type Default Description Required Alternates Known Values
Arguments CORP_ID Numeric 0 Pass in the corp id number. This is your corporation ID or your business world number. This is required and will be validated. The default is 0, but will be checked for a real number. Yes
Arguments SEARCH_FIELD String Database field user wishes to limit the query by. User may use any of the following: customer_id, first_name, last_name, business_name, zip, state, email, cell_phone, home_phone, work_phone, terms, customer_tax_id, external_alternative_id, drivers_license Yes
Arguments SEARCH_VALUE String The value that you wish to search the SEARCH_FIELD by. Yes
Arguments SEARCH_FROM Numeric 0 Allows user to specify on which record to begin search. Also requires the use of SEARCH_TO parameter. No
Arguments SEARCH_TO Numeric 0 Allows user to specify on which record to end search. Also requires the use of SEARCH_FROM parameter. No


Results
RET_STATUS RET_MAIN_MESSAGE RET_SECOND_MESSAGE Redirect Link Description
ok Successfully retrieved [number of records] from the customer database. This assumes that everything went well and at least 1 record was found.
Name Type Description Notes
QRY_CUSTOMER_INFO_ARRAY Array This is the main data array. This array will have a separate piece for each part number or item number. Here are some of the values that will be returned along with this array:
- ADDRESS - Customer's main address.

- ADDRESS_2 - Customer's address 2. This is usually apartment or suite numbers and other details.

- BUSINESS_NAME - Customer's business name.

- CELL_PHONE - Customer's cell phone number.

- CITY - Customer's city.

- COUNTY - Customer's county.

- CREDIT_LIMIT - Customer's credit limit value.

- CREDIT_TYPE_ID - Credit type id number. 2 = Cash Only, 3 = Credit Limit, 4 = Credit Hold, and 5 = Unlimited Credit.

- CUSTOMER_BIRTH_DATE - Customer's birth date.

- CUSTOMER_BIRTH_NUMERIC - This is the numeric conversion for the customer birth date. This is a value that combines a one digit month and a two digit day. Example: 6/22/1980 would be 622.

- CUSTOMER_END_DATE - Customer's end date. As a note: this field has a buddy tag- USE_END_DATE, which must be 1 to allow CUSTOMER_END_DATE to be used

- CUSTOMER_ID - Customer's id.

- CUSTOMER_START_DATE - Customer's start date.

- CUSTOMER_TAX_ID - This is customer tax id number. This field has a dynamic corp wide setting, and is usually renamed within the system. It is very common to see membership numbers, special license numbers, and other special state or industry specific identifiers.

- CUSTOMER_TYPE_ID - Customer type id.

- DISCOUNT_CAMPAIGN - Discount campaing, if any.

- DISCOUNT_RATE - Customer discount rate. This value must be numeric and 0.00 or above. This field will show up in cart mode as a reminder to the sales staff of the customer discount rate.

- DRIVERS_LICENSE - Customer's driver's license.

- EMAIL - Customer's email.

- EXTERNAL_ALTERNATE_ID - Customer's external alternate id.

- FAX - Customer's fax number.

- FIRST_NAME - Customer's first name.

- HOME_PHONE - Customer's home phone number.

- LAST_DATE_MODIFIED - The last date the customer info was modified.

- LAST_NAME - Customer's last name.

- NOTES - These are optional notes about the customer.

- OPT_IN_EMAIL - 0 for normal or a 1 for opt out.

- OPT_IN_TEXT - 0 for normal or a 1 for opt out.

- PERIOD_END_DATE - Period ending date value. This field has a buddy tag- USE_PERIOD_END, which must be 1 to allow PERIOD_END_DATE to be used.

- PERIOD_START_DATE - Customer's start date. This field has a buddy tag- USE_PERIOD_START, which must be 1 to allow PERIOD_START_DATE to be used.

- SALESPERSON_ID_1 - Main salesperson id.

- SALESPERSON_ID_2 - Other salesperson id.

- STATE - Customer's state.

- TAX_CATEGORY_ID - The default is 2, which is Taxable. There are a number of other settings. Use the getLookUpValues method and pass in the table name of tax_categories to get other categories.

- THUMBNAIL - Customer's photo

- USE_CUSTOMER_BIRTH_DATE - 1 for use and a 0 for don't use. This is a buddy tag with the CUSTOMER_BIRTH_DATE field. This is the use or don't use flag. The default is 0 or don't us.

- USE_END_DATE - Customer's end date. 1 for use and a 0 for don't use. This is a buddy tag with the CUSTOMER_END_DATE field. This is the use or don't use flag. The default is 0 or don't use

- USE_PERIOD_END - 1 for use and a 0 for don't use. This is a buddy tag with the PERIOD_END_DATE field. This is the use or don't use flag. The default is 0 or don't use

- USE_PERIOD_START - 1 for use and a 0 for don't use. This is a buddy tag with the PERIOD_START_DATE field. This is the use or don't use flag. The default is 0 or don't use.

- WEB_ADDRESS - Customer's web address.

- WORK_PHONE - Customer's work phone number.

- ZIP - Customer's zip code.
dataIn Unable to get customer data requested. Missing some data. Use your back button and try again. This is returned if missing one or more of the required arguments (corpId, searchField, and searchValue).
dataIn2 Unable to get customer data requested. Missing a valid search field. Use your back button and try again. This is returned if we do not have a valid search field.
db Unable to connect to the customers database. Missing a list of customers that matched your search. Use your back button and try again. This is a catch for any errors that occur while accessing the database.


Samples
Caption Text
JSON
{"API_URL_ENCODING":"AUTO","API_CURRENT_PAYEE_ID":3,"API_CORP_KEY_ID":"PLA-0053","API_USER_PASSWORD":1234,"API_CALL_FUNCTION_NAME":"simplecustomersearch","API_INPUT_OUTPUT_TYPE":"JSON","API_USER_NAME":"demo","CORP_ID":53,"SEARCH_FIELD":"last_name","SEARCH_VALUE":"Jones"}