Documentation

LogIn

This API is used to add/update a new deal in the CRM under the company account.
if the Deal found (unique by ID), the info for the deal will be updated not adding a new record.

Method: Get/Post

Base URL : https://hubbucs.com/site/api/crm_add_deal
Mandatory Parameters Sample Description
key 374593457034859 The company account API key, you can get from company settings > API settings


Optional Parameters Sample Description
deal_id 5452 The Deal ID to update an existing deal
external_reference_id Deal656588 A unique external Reference to set/use to update the deal (if the deal_id parameter is sent, this parameter will be ignored)
name Selling Product The Deal name (if the Deal ID parameter exists, it will update the existing deal)
contact_id 65246 the ID of the contact to associate with
contact_name Mike Douglas the name of the contact to associate with, if the contact name doesn't exist and the contact_id not sent, a new contact record will be created, if the contact_id parameter sent, this parameter will be ignored
contact_email [email protected] the Email of the contact to associate with, if the contact Email doesn't exist and the contact_id not sent, a new contact record will be created, if the contact_id parameter sent, this parameter will be used to update the contact email info
send_email_to_contact 1 OR 2 (default value: 2) if 1: will send email to the associated contact including the deal name and deal ID for reference
if 2: will NOT send email to the contact (default value)
send_email_to_contact_subject String/Text Subject of the email to be sent to the associated contact, if empty default subject will be used (New Deal Creation Notification from COMPANY_NAME)
contact_phone 54065486544 the Phone number of the contact to associate with, if the contact Phone number doesn't exist and the contact_id not sent, a new contact record will be created, if the contact_id parameter sent, this parameter will be used to update the contact Phone number info
match_with_email Possible Values (1 OR 2) 1: Yes match with contact email (default value), 2 No: dont match with contact email
match_with_phone Possible Values (1 OR 2) 1: Yes match with contact phone , 2 No: dont match with contact phone (default value)
check_name Possible Values (1 OR 2) if set to 1 : Name will be used to search existing contacts as a unique identifier, if set to 2 or not sent(default value): Name will not be used to check existing contacts as a unique identifier
contact_source campaign1 A Friendly name, you can add to know the source of contact, if not exists in the settings, it will be added automatically
contact_facebook facebook ULR
or Facebook name
The Facebook page or name for the contact
contact_twitter twitter ULR
or twitter name
The twitter account for the contact
contact_skype skype username The skype username account for the contact
contact_linkedin Linkedin username The Linkedin username account for the contact
contact_pinterest pinterest username The pinterest account for the contact
contact_googlePlus googlePlus username The googlePlus account for the contact
contact_instagram instagram username The instagram account for the contact
company_id 952622 the ID of the company to associate with
company_name Hubb UCS Company the name of the company to associate with, if the company name doesn't exist and the company_id not sent, a new company record will be created, if the company_id parameter sent, this parameter will be ignored
company_email [email protected] the Email of the company to associate with, if the company Email doesn't exist and the company_id not sent, a new company record will be created, if the company_id parameter sent, this parameter will be used to update the company email info
company_phone 54065486544 the Phone number of the company to associate with, if the contact Phone number doesn't exist and the company_id not sent, a new company record will be created, if the company_id parameter sent, this parameter will be used to update the company Phone number info
expected_closing_date 2020-09-30 should be in the format YYYY-mm-dd
actual_closing_date 2020-09-30 should be in the format YYYY-mm-dd
expected_closing_amount 523 allowed numbers, spaces and characters (,.)
actual_closing_amount 523 allowed numbers, spaces and characters (,.)
stage stage name if not exists, will create a new stage if the the parameter create_new_stage = 2
create_new_stage 1 OR 2 if 1: will not create a new stage (default value)
if 2: will create a new stage if the stage name doesn't exist
funnel Funnel name if not exists, will create a new funnel if the the parameter create_new_funnel = 2
create_new_funnel 1 OR 2 if 1: will not create a new funnel (default value)
if 2: will create a new funnel if the funnel name doesn't exist
resolution resolution name possible values (open, closed, won, lost)
tags tag1, tag2 Tags you want to add to the deal to use it later on, add as many tags , split by ","
remove_tags tag1, tag2 Tags you want to remove from the deal if the deal already exists , split by ","
notifyToEmail [email protected] If exists, An email will be sent to notify when a new deal added via the API
notifyEmailSubject New Deal Added Subject of the notification email for new deals
owner_email [email protected] Email for the user to be assigned as the owner on the CRM, it must be a valid email for a valid active user under the company account or will be neglected
use_contact_owner possible values 1 or 2 [default value 1] 1: will set the deal owner as in the parameter owner_email or owner_group
2: will set the deal owner to be the same as the contact owner and ignore owner_email paramter
owner_group group name the user group name to assigned to it in a round robin
If the parameter "owner_email" is sent, this parameter will be ignored and "owner_email" will override it
email_notify_owner Possible Values (1 OR 2) if set to 1: a notification email will be sent to the assigned owner, if set to 2: no notification email will be sent to the owner
custom_field custom_field_api_name any value
note_title text text string
note text text string
create_new_deal_score 1 OR 2 if 1: will not create a new deal score (default value)
if 2: will create a new deal score if the score name doesn't exist
deal_score deal score name if not exists, will create a new deal score if the the parameter create_new_deal_score = 2
attachments Array of Files you can submit one or more files as array attachments[], if you want to submit attachment files, Must use POST method and Multi-part
Allowed files type: (JPG, GIF, BMP, Excel, CSV, Word, Powerpoint, PDF, Text, Zipped file)
AND total files size must be less than 100M
if one of the files doesn't match this critria it will be ingonred and not saved
contact_address_street 4806 Reppert Coal Road Contact Street Address
contact_address_city Bloomfield Township Contact City Name
contact_address_zipcode 48302 Contact Zipcode Number

Example:


				

Example :

https://hubbucs.com/site/api/crm_add_deal?key=12134651Gsuid7349[&Optional_parameter1=XXXXX&Optional_parameter2=XXXXX]

Response :

  1. {
  2. "message":"success",
  3. "deal_id":"Deal ID",
  4. "external_reference_id":"External refernce id",
  5. "expected_closing_date":"Expected Close Date in YYYY-mm-dd format example: 2020-09-30",
  6. "actual_closing_date":"Actual Close Date in YYYY-mm-dd format example: 2020-09-30",
  7. "expected_closing_amount":"Expected Close amount",
  8. "actual_closing_amount":"Actual Close amount",
  9. "stage":"The stage which the deal assigned to",
  10. "resolution":"resolution"
  11. }
  12. ------OR------
  13. {
  14. "error_message":"error message"
  15. }