Main Web API Documentation Information
|
|
Actual Page/Function Name:
|
addCustomerContact |
Human Readable Name or Caption:
|
Add Customer Contact |
Page/Function Description:
|
This method will add an additional contact for a customer. For instance, say you want to record the owners of a company, where to ship things to, or who might be a cosigner for the business. This is also used to record family members to the main customer. |
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 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 contact business name. | No | |||
Arguments | CELL_PHONE | String | Pass in the cell phone number. | No | |||
Arguments | CITY | String | Pass in the city. | No | |||
Arguments | CONTACT_TYPE_CATEGORY | String | Pass in the contact type. This field is used to help tell you what kind of contact is being made. Here are some common examples: Ship-to Address, Billing Address, Owner, Manager, Spouse, Accounting, Partner, etc. | Yes | |||
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_ID | Numeric | 0 | Pass in the customer id number. This is how the additional contact gets tied to the main customer. This is the primary key from the main customer record. | Yes | ||
Arguments | String | Pass in the email address. | No | ||||
Arguments | FAX | String | Pass in the fax number. | No | |||
Arguments | FIRST_NAME | String | Pass in the contact first name. | No | |||
Arguments | HOME_PHONE | String | Pass in the home phone number. | No | |||
Arguments | LAST_NAME | String | Pass in the contact last name. | No | |||
Arguments | NOTES | String | Pass in the contact notes. | No | |||
Arguments | PAYEE_ID | Numeric | 0 | Pass in the payee user id of the person adding the additional customer contact. 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 | SHOW_ON_INVOICE | Numeric | 0 | Pass in a 1 for yes and a 0 for no. An invoice is able to have more than one customer associated with it, or more than one contact associated per invoice. An example might be a cosigner, or a ship-to address. This may be edited just in time in the cart mode, or if you set the default here it will automatically be added to the cart. | Yes | ||
Arguments | STATE | String | Pass in the two digit state (ex: CO, UT, AZ, etc.) | No | |||
Arguments | WORK_PHONE | String | Pass in the work phone number. | No | |||
Arguments | ZIP | String | Pass in the zip code. | No |
Results
|
||||||||||||
RET_STATUS | RET_MAIN_MESSAGE | RET_SECOND_MESSAGE | Redirect Link | Description | ||||||||
ok | Successfully added the additional [name] contact to the database. | Where can we take you? [links] | This assumes that everything went well. | |||||||||
|
||||||||||||
corpSettings | Missing the correct corp-wide settings. Unable to proceed. | Use your back button and try again. | This is returned if the corporation has no default customer names. | |||||||||
dbZero | Unable to get the required corp-wide settings. Missing some data. | Use your back button and try again. | This is returned if there is an error in querying the corp-wide settings. | |||||||||
dataIn | Unable to add the additional [name] contact. Missing some data. | Use your back button and try again. | This is returned if the contact type, corp id, customer id, or payee id isn't entered. | |||||||||
zero | Unable to find the main [name] information. The additional contact was not added. | Use your back button and try again. | This is returned if the customer id record count is zero. | |||||||||
db | Unable to connect to the database. The new [name] contact was not added to the database. | Use your back button and try again. | This is returned if there is an error in inserting or querying values such as customer id, address, business name, cell phone, city, first name, last name, etc. There are about 15 values here. |
Samples
|
|
Caption | Text |
JSON |
{"API_CALL_FUNCTION_NAME":"addcustomercontact","CUSTOMER_ID":23169,"CORP_ID":53,"PAYEE_ID":3,"CONTACT_TYPE_CATEGORY":"Sales","ADDRESS":"123 Main","ADDRESS_2":"P.O. 123","BUSINESS_NAME":"Business Name","CELL_PHONE":"(123)456-7890","CITY":"Salida","EMAIL":"email@domain.com","FAX":"1234567890","FIRST_NAME":"First","HOME_PHONE":"0987654321","LAST_NAME":"Last","NOTES":"These are the notes for the customer.","SHOW_ON_INVOICE":1,"STATE":"CO","WORK_PHONE":"1324354657","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"}
|