Main Web API Documentation Information
Actual Page/Function Name:
addWebCustomer
Human Readable Name or Caption:
Add Web Customer
Page/Function Description:
This method will add a new customer to the database. Somewhat limited as far as fields and options. See the main addCustomer method for more options.
Page/Function Output Type:
API - JSON or WDDX
Categories:
eComm,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 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 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. Make sure to pass in the table name as customer_types and the optional param as your corp id. Yes
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 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 PAYEE_ID Numeric 0 Pass in the payee user id of the person adding the web 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 STATE String Pass in the two digit state (ex: CO, UT, AZ, etc.) 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 [blank] This assumes that everything went well.
Name Type Description Notes
NEW_CUSTOMER_ID Numeric This is a new id number for a new customer. The database creates a new id number when a new customer is created.
CUSTOMER_TYPE_NAME String This is grabbed from a query for the customer type. This is to populate the customer type associated with an id number. If it can't be found in the query, it defaults to "Web Unknown".
corpSettings Missing the correct corp-wide settings. Unable to proceed. Use your back button and try again. This is returned if no corp-wide settings were queried.
dbZero Unable to get the required corp-wide settings. Missing some data. Use your back button and try again. This is returned if there was an error in querying the default corp type or default customer name.
dataIn Unable to add the [name]. Missing some data. Use your back button and try again. This is returned if the corp id, customer type id, or payee id were not validated.
db Unable to connect to the database. New [name] was not added to the database. Use your back button and try again. This is returned if the address, business name, city, corp id, customer info, etc. could not be queried or inserted.


Samples
Caption Text
JSON
{"API_CALL_FUNCTION_NAME":"addWebCustomer","CORP_ID":53,"CUSTOMER_TYPE_ID":53,"PAYEE_ID":3,"ADDRESS":"123 Main","ADDRESS2":"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"}