Main Web API Documentation Information
Actual Page/Function Name:
addCustomer
Human Readable Name or Caption:
Add Customer
Page/Function Description:
This method will add a new customer to the database. This method is quite dynamic. There are only a couple of required fields and tons of optional ones. You are welcome to pick and choose which pieces you want to use.
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 ADDRESS String Pass in the main address. No
Arguments ADDRESS_2 String Pass in the address 2. This is usually apartment or suite numbers and other details. No
Arguments ALLOW_DUPS String no There are built in checks to make sure that duplicate records don't get added. Mostly names and address type checks. This setting allows for you to skip the duplicate record validation. Pass in the value no, if you want the duplicate record checks in place (default) or if you want to skip the checks, pass in the value yes. Yes
Arguments BUSINESS_NAME String Pass in the business name. Either a business name or the first and last name of the customer is required. If a business name is used, it always trumps the first/last name combo. Yes
Arguments CELL_PHONE String Pass in the cell phone. No
Arguments CITY String Pass in the city. No
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 COUNTY String Pass in the county. No
Arguments CREDIT_LIMIT Numeric 0 Pass in the credit limit value. This is optional. No
Arguments CREDIT_TYPE_ID Numeric 2 Pass in the credit type id number. 2= Cash Only, 3= Credit Limit, 4= Credit Hold, and 5= Unlimited Credit. The default is 2. No
Arguments CUSTOMER_BIRTH_DATE String Pass in the customer birth date value. If a date is not entered, the current date will be put in as the default. As a note: this field has a buddy tag- USE_CUSTOMER_BIRTH_DATE, which must be 1 to allow CUSTOMER_BIRTH_DATE to be used. If used, it also ties in to CUSTOMER_BIRTH_NUMERIC. No
Arguments CUSTOMER_BIRTH_NUMERIC Numeric 0 Pass in 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. No
Arguments CUSTOMER_END_DATE String Pass in the customer end date value. If a date is not entered, the current date will be put in as the default. As a note: this field has a buddy tag- USE_END_DATE, which must be 1 to allow CUSTOMER_END_DATE to be used. No
Arguments CUSTOMER_SS_NUMBER String Pass in the customer social security number. Pass this value in normally. We will encode it for database storage. No
Arguments CUSTOMER_START_DATE String Pass in the customer start date value. If a date is not entered, the current date will be put in as the default. No
Arguments CUSTOMER_TAX_ID String Pass in the 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. Maximum of 50 characters. No
Arguments CUSTOMER_TYPE_ID Numeric 0 Pass in the customer type id number. This is required, and is set per corporation. You must look these values up. See the getLookUpValues method for details. Yes
Arguments DISCOUNT_CAMPAIGN String Pass in the discount campaign name, if any. A discount campaign is used in coordination with the discount rate, and this automatically gets pulled into the shopping cart when a new customer is used. Examples: Veteran, Family, Member, VIP, etc. No
Arguments DISCOUNT_RATE Numeric 0 Pass in the customer discount rate. This value must be numeric and 0.00 or above. If used, this will automatically pull itself into any new cart where the customer is assigned. Example: 10% for a family discount. This will automatically be applied every time this customer is assigned to a cart. No
Arguments DRIVERS_LICENSE String Pass in the drivers license. No
Arguments EMAIL String Pass in the email address. No
Arguments FAX String Pass in the fax number. No
Arguments FIRST_NAME String Pass in the first name. The first and last name or the business name of the customer are required. If a business name is used, it trumps a first and last name combo. If the person has a middle name that is needed, add it in here as well. Yes
Arguments GENDER String Pass in the gender. Options are Male, Female, or Other. No
Arguments HOME_PHONE String Pass in the home phone number. No
Arguments LAST_NAME String Pass in the last name. The first and last name or the business name of the customer are required. If a business name is used, it trumps a first and last name combo. Yes
Arguments NOTES String Pass in the customer notes. This field accepts up to 65,000 characters. If additional notes or sub notes are needed, you'll want to see either Customer Logs or Elements of Time. No
Arguments OPT_IN_EMAIL Numeric 0 Pass in a 1 for In or a 0 for out. The default is 0 (Out). No
Arguments OPT_IN_TEXT Numeric 0 Pass in a 1 for In or a 0 for out. The default is 0 (Out). No
Arguments PAYEE_ID Numeric 0 Pass in the payee user id of the person adding the customer. This id number will be used for a history message of who added the record. If this is not passed in, it will default to whoever the main payee/user id is that is using the method. Yes
Arguments PERIOD_END_DATE String Pass in the period ending date value. If a date is not entered, the current date will be put in as the default. As a note: this field has a buddy tag- USE_PERIOD_END, which must be 1 to allow PERIOD_END_DATE to be used. As a note, this date if used will turn red inside the system if it has expired as a small flag. No
Arguments PERIOD_START_DATE String Pass in the period starting date value. If a date is not entered, the current date will be put in as the default. As a note: this field has a buddy tag- USE_PERIOD_START, which must be 1 to allow PERIOD_START_DATE to be used. No
Arguments SALESPERSON_ID_1 Numeric 1 Pass in the main salesperson id number (a payee/user id). Use 1 if unknown, this will basically leave the customer unassigned to a specific rep or salesperson. No
Arguments SALESPERSON_ID_2 Numeric 1 Pass in the other salesperson id number (a payee/user id). Use 1 if unknown, this will basically leave the customer unassigned to a specific rep or salesperson. This is a secondary assignment if needed. No
Arguments STATE String Pass in the two digit state (ex: CO, UT, AZ, etc.) No
Arguments STOCK Numeric 0 Pass in the stock number. This helps with options after a successful database action. This is primarily used internally; it mainly just exists as a field. No
Arguments TAX_CATEGORY_ID Numeric 2 Pass in the default tax category. 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. No
Arguments TERMS String Net 15 Pass in the credit terms. Normal values for this field are N/A, Cash, PO Only, Net 10, Net 15, Net 30, Net 45, Net 60, etc. As a side note, sometimes this particular field gets commandeered for other purposes. This field has a max of 50 characters. No
Arguments USE_CUSTOMER_BIRTH_DATE Numeric 0 Pass in a 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 use. No
Arguments USE_END_DATE Numeric 0 Pass in a 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. No
Arguments USE_PERIOD_END Numeric 0 Pass in a 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. No
Arguments USE_PERIOD_START Numeric 0 Pass in a 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. No
Arguments WEB_ADDRESS String Pass in the customer web address. Ex: www.adilas.biz. No
Arguments WORK_PHONE String Pass in the work phone number. No
Arguments ZIP String 00000 Pass in the zip code. This field can contain both alpha and numeric characters, or extended zip codes with the -4 extension. Ex: 81201, 81201-9943, or B73-7. This is required, but it's okay to use five 0's in a row. Yes


Results
RET_STATUS RET_MAIN_MESSAGE RET_SECOND_MESSAGE Redirect Link Description
ok New [name] was successfully added to the database. [message] This assumes that everything went well.
Name Type Description Notes
CUSTOMER_ID Numeric This is the new customer id number. See description.
corpSettings Missing the correct corp-wide settings. Unable to proceed. Use your back button and try again. This is returned if no results were found for the selected corporation.
dbZero Unable to get the required corp-wide settings. Missing some data. Use your back button and try again. This is a catch for any errors that occur while querying the corp-wide settings.
dataIn Unable to add the [name]. Missing some data. Use your back button and try again. This is returned if missing one or more of the required arguments (CORP_ID, CREDIT_TYPE_ID, CUSTOMER_TYPE_ID, PAYEE_ID, SALESPERSON_ID_1, SALESPERSON_ID_2, TAX_CATEGORY_ID, and ZIP).
dataIn2 Unable to add the [name]. Missing some date information. Use your back button and try again. This is returned if the date arguments were not input as dates.
db Unable to connect to the database. New [name] was not added to the database. 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_CALL_FUNCTION_NAME":"addCustomer","CORP_ID":53,"CUSTOMER_TYPE_ID":2402,"ADDRESS":"123 Main","ADDRESS_2":"P.O. Box 123","BUSINESS_NAME":"Business Name","CELL_PHONE":"1234567890","CITY":"Salida","CUSTOMER_TAX_ID":"TaxID123","EMAIL":"email@address.com","FAX":"1234567890","FIRST_NAME":"First","HOME_PHONE":"1234567890","LAST_NAME":"Last","STATE":"CO","WEB_ADDRESS":"adilas.biz","WORK_PHONE":"1234567890","ZIP":"55555","API_CORP_KEY_ID":"PLA-0053","API_USER_NAME":"demo","API_USER_PASSWORD":"1234","API_CURRENT_PAYEE_ID":"3","API_INPUT_OUTPUT_TYPE":"JSON","API_URL_ENCODING":"AUTO","ALLOW_DUPS":"no"}