PUT: CLIENT SALES INQUIRY

Type: PUT

Method: clientinquiry

Parameters:

a = 0 or 1 save client as 'prospect' in database
b = 1, 2, or 3 inquiry e-mail recipient identifier
c = username or e-mail inquiry e-mail recipient username or defined e-mail

URL Examples:

https://www.bizstim.com/api/clientinquiry
https://www.bizstim.com/api/clientinquiry/{a}
https://www.bizstim.com/api/clientinquiry/{a}/{b}
https://www.bizstim.com/api/clientinquiry/{a}/{b}/{c}

Response Example:
{
    "status": "success",
    "code": 1,
    "response": "E-mail success. Client previously added to database."
}

Element Properties:
ELEMENT TYPE DESCRIPTION
status string success or failure
code integer

The code is the return response from the API and identifies what happened with respect to the client being added to the database, and an e-mail sent to the receiver.

0 e-mail sent | client not added to the database
1 e-mail sent | client already in database
2 e-mail sent | failure adding client to database
3 e-mail sent | client added to the database
4 e-mail send error | [database outcome message]
5 validation errors

We recommend you use the return code to craft your own messages for the initiator of the client inquiry.   The return response is best suited for internal communications; e-mails or logs to track success and failures.  

response string

Possible responses are:

  • E-mail success.
  • E-mail success. Client previously added to database.
  • E-mail success. Error adding client to database.
  • E-mail success. Client added to database.
  • E-mail send error. Client previously added to the database.
  • E-mail send error. Error adding client to database.
  • E-mail send error. Client added to database.
  • E-mail send error. Client was not added to database.
  • An unordered list (ul) of validation errors

Information on Parameters

Parameter 1 Do you want to create a client record within the CRM software and assign them as a prospect?   Options are 0 : do not create a client record, 1 : create a client record, or {blank} (do not provide a parameter): do not create a client record.   If you do not provide a 0 or 1 for this parameter, you may not provide additional parameters.   In this case, only an e-mail will be sent to the admin.   The software will use the e-mail address stored for the admin user, NOT the business e-mail.   You may define an e-mail address using parameter 3.
Parameter 2 Who receives via e-mail the client inquiry?   Options are 1 : admin, 2 : staff, or 3 : defined e-mail.   To set a parameter 2, you must have a parameter 1.  
Parameter 3 If parameter 2 = 2 , provide the username of the staff user.   If parameter 2 = 3 , provide an e-mail address you want the client inquiry sent to.   The e-maill address must be constructed in a specific way.   For example: sending an e-mail to sales@mysite.com must be written as sales_mysite~com .   Replace the @ symbol with an _ (underscore), and replace the . (dot) symbol with a ~ (tilda).   The software will convert the e-mail address and check to ensure it is properly formatted.   If the e-mail is incorrectly formatted, the admin user will be notified instead.
When you specify a staff user to receive the e-mails, the staff user must be of ' active ' status, have permission to manage clients, manage the sales manager , and have an e-mail address on record.   If the staff user does not meet these requirements, the software will send the inquiry e-mail to the admin user.  

Possible API URL's

  1. https://www.bizstim.com/api/clientinquiry
    https://www.bizstim.com/api/clientinquiry/0
    https://www.bizstim.com/api/clientinquiry/0/1
    send e-mail to admin
  2. https://www.bizstim.com/api/clientinquiry/1
    https://www.bizstim.com/api/clientinquiry/1/1
    send e-mail to admin and create client record in db
  3. https://www.bizstim.com/api/clientinquiry/0/2/johngreen
    send e-mail to staff with username = johngreen
  4. https://www.bizstim.com/api/clientinquiry/1/2/johngreen
    send e-mail to staff with username = johngreen and create client record in db
  5. https://www.bizstim.com/api/clientinquiry/0/3/sales_mysite~com
    send e-mail to a defined e-mail of sales@mysite.com
  6. https://www.bizstim.com/api/clientinquiry/1/3/sales_mysite~com
    send e-mail to a defined e-mail of sales@mysite.com and create client record in db

Integration Information

When a new client is added to the database, their message is added to the sales manager.   You can access the sales manager by navigating to CLIENTS > SALES MANAGER.   From the table, choose the client you want to review and select Adv. Sales Manager from the dropdown menu.   The client inquiry message will appear in the list of messages.  
If your web site is powered by WordPress, you can use our WordPress plugin to integrate this API method effortlessly.   Our WordPress plugin will be available as of September 2018.