PieSync Integration

What PieSync integration do?

PieSync is a software that syncs all your contacts between different cloud apps. Once integrations are setup PieSync works in the background to sync contacts in real time. Providing consistencey of data across different apps.

 

Connect CompanyHub PieSync using this link

 

PieSync syncs allows you to connect with popular apps like Google Contacts, Zendesk, Mailchimp, Marketo, Campaign and many more. You can see all the supported apps here.

What does PieSync integration enable?

PieSync smartly connects CompanyHub with other apps for an automatic 2-way contact sync. Everytime contacts is created or modified in your CompanyHub account, it is autoamtically synced with all other apps and vice versa – Eliminating manual data entry and import/export.

 

 

 

How this will benefit?

PieSync syncs all your contacts bidirectionally across your favorite cloud apps, so you only have to enter customer data once, in your CompanyHub account. Keeping CompanyHub up to date and the center of your Growth Stack means all your apps have updated contacts thanks to PieSync.

Need help in getting started?

To get started, We strongly recommend going through the following link before you start using CompanyHub and PieSync integration : https://help.piesync.com/connector-apps/company-hub

Support:

This integration is created by PieSync team, in case of any issues or doubts Customers can reach out to them for support.

 

Support Contact: Sanne Stevens, Captain of Customer Success, support@piesync.com

Sales Contac: Mawghan McCabe, Director of Partner Alliances, mawghan@piesync.com

Abhishek A Agrawal
May 23, 2018

UTron – Send a Sequence of Mails to New Clients

Design of UTron Flow

Type : Scheduled UTon

Suppose you want to send a sequence of emails to new clients. One mail every week.

 

We need a way to identify new clients so that these emails should only be sent to them. We can do this using a custom field ‘Is New Client’ of type Yes/No. To add a client to this sequence, we mark this as Yes. After sequence is complete, we again mark this as No so that the contact is no longer selected after this.

 

We need to know at which stage of the sequence each contact is so we can send them the right mail accordingly. We create a field ‘Onboarding stage’ of type ‘Select single value’ and add a value for each stage. We use current stage to decide which mail to send and also change the stage to next.

 

For simplicity, we will only send 2 mails in this example but you can easily add more. You can also create tasks for sales person instead of sending mails.

Logical Steps
  • Find all contacts marked as new client
  • For each client, check the current onboarding stage

    • If stage is not set, send first mail and set stage to stage 1
    • If stage is stage 1, send second mail, set stage to stage 2 & set Is New Client to No.
Steps in UTron
  • Select Contacts
    Where ‘Is New Client’ is True
  • For every new client:

    • Add ‘Check condition’ step – ‘Onboarding Stage’ is ‘Having Value’?
    • If (a) is no, i.e. no mail sent yet, send 1st mail and set Onboarding Stage = Stage
    • If (a) is yes,i.e. 1st mail is already sent, send 2nd mail, set Onboarding Stage = Stage 1 and set ‘Is New Client’ = False

sequence-of-mails-flow-1
flow-img-arrow

This is how your flow will look.

Implementation

Make sure you have done both the Get Started tutorials before this :

Get Started – Part 1

Get Started – Part 2

To create UTron, you must be admin. Go to UTrons And choose “Scheduled UTron”.

  1. Select Records : We need to select Contacts, that are new clients.

    • Select Table ‘Contact’
    • Select Field : Is New Client
    • Select Condition : Yes

    Click ‘Continue’. Then it will ask you to choose action. We don’t want to do any of these. So click ‘Skip’.

    A flow with Select Contacts & a List Flow will be automatically created for you. Add below step(s) inside this List Flow. Selected records will be passed to this List Flow one by one and the operations will be performed on each record.
  2. Check other field(s) of selected records: To add a client to the sequence, sales person will just set the field ‘Is New Client’. So ‘Onboarding Stage’ will not not be set by default. If it is not having value, means no mail is sent yet. If its Stage 1, means 1st mail is sent. So now we need to check value of ‘Onboarding Stage’ field to decide which mail to send.

     

    Add step of Type ‘Check Conditions’ to compare other fields of already selected records

    • Select Field : ContactRecord -> Onboarding Stage
    • Select Condition : Having Value

    Under ‘NO’, i.e. if ‘Onboarding Stage’ is NOT Having Value, add these 2 steps:

    • Send 1st Mail:

      • Select sender : Select your email account from which you would like to send email. You need to have at least 1 email account added.
      • Select recipient : Select Contact’s Email field.
      • Subject & Email content : Compose the mail. You can also add fields and they will be replaced by actual values when sending.
    • Update ‘Onboarding Stage’ to ‘Stage 1’ using operation ‘Modify Record’

      • Select record : ContactRecord
      • Set field : Onboarding Stage = Stage 1 (no need to set other fields)

    Under ‘YES’, i.e. if ‘Onboarding Stage’ Is Having Value, add these 2 steps:

    • Send 2nd Mail:

      • Select sender : Select your email account from which you would like to send email. You need to have at least 1 email account added.
      • Select recipient : Select Contact’s Email field.
      • Subject & Email content : Compose the mail. You can also add fields and they will be replaced by actual values when sending.
    • Modify Record & set ‘Is New Client’ to ‘No’ to stop the sequence for this client. Also update ‘Onboarding Stage’ to ‘Stage 2’.

      • Select record : ContactRecord
      • Set fields : Is New Client = False & Onboarding Stage = Stage 2
      sequence-of-mails-flow-2
      flow-img-arrow

      This is how your flow will look.

  3. Test the UTron

  4. Schedule the UTron to run once a week.

Abhishek A Agrawal
March 18, 2018

UTron – Send Details of All Won Deals

Design of UTron Flow

Type : Scheduled UTon

 

Everyday we need to find Deals that were won yesterday, and send their details to Head of Sales. That’s why we create a scheduled UTon and schedule it to be activated everyday.

Logical Steps
  • Find all deals that were won yesterday
  • Send a mail to Head of Sales with Deal details.
Steps in UTron
  • Select Deals
    Where Deal Stage is Closed Won
    AND Close Date is Yesterday
  • Send Mails

send-won-deals-flow
flow-img-arrow

This is how your flow will look.

Implementation

Make sure you have done both the Get Started tutorials before this :

Get Started – Part 1

Get Started – Part 2

To create UTron, you must be admin. Go to UTrons And choose “Scheduled UTron”.

  1. Select Records : We need to select Deal won yesterday.

    • Select Table ‘Deals’
    • Select Field : Deal Stage
    • Select Condition : Closed Won.
    • Add another condition. Select Field : Close Date
    • Select Condition : Period – Date -> Yesterday
    If you are not using wizard, and instead adding steps to flow, a List Flow will be automatically added to your flow after above step. Add below step(s) inside this List Flow. Selected records will be passed to this List Flow one by one and the operations will be performed on each record.
  2. Select Action: Send Email

    • Select sender : Select your email account from which you would like to send email. You need to have atleast 1 email account added.

    • Select recipient : Select Enter input value. Set the email address on which you would like to notify.

    • Subject & Email content : Compose the mail. You can also add Deal fields and they will be replaced by actual values when sending.

  3. Continue. Your UTron Flow will be automatically created for you. You can add more steps if needed.

  4. Test the UTron

  5. Schedule the UTron to run daily by selecting all days of the week.

Abhishek A Agrawal

UTron – Find Contacts of a Company & Create a Task for Each Contact

Find all Contacts of a Company & create a task for each Contact

Go to UTrons (Only admins can create / manage UTrons). Choose One Time Changes UTron (We don’t need to do this repeatedly.)

 

You will see a wizard. You created your first UTron using wizard. For this tutorial, click Skip.

 

You create a flow (similar to flowchart) by adding steps (operations, conditions, etc.) to tell UTron what to do. When we use wizard, it creates an initial flow for us, which we can modify. In this case, you will see an empty flow.

  1. Click ‘+’ to add your first step. Since you can’t do anything before selecting records, it will only one option of ‘Select Records’. Click that.


  2. Select Records

    • We need to select records of type Contacts. So select table ‘Contact’.

    • Now we need to tell which Contacts we want to select.

      Here, usually, we give conditions like Source = ‘Web’, Country = ‘US’ etc. So all records that match these conditions get selected.

       

      We need choose all Contacts of a Company by giving condition Contact Company Name = (some value here).

      • Click ‘Select field & its condition’

      • Select field ‘Company Name’

      • It shows you different values of that field from your records. So if you choose field city, you might see options like New York, Paris, etc. So you can easily select your criteria. For now, select one of the companies that you see. The company should have atleast 1 contact else no contact will be selected and no task will be created. Remember the name. Click apply. Then click continue.


  3. Now you will see few more items on the flow. Lets understand them.

    • SelectedRecords: Notice the small tag just below Select Records. Select Records returns a list of records and further steps operate on these records. If you use Select Records multiple times, you will have multiple lists. So the operations need a way to tell which list they are referring to. So each list is given a name. By default it is similar to SelectedContacts. You can change this when adding Select Records (plural).

    • List Flow We are referring to the big block below Select Records. Once we have selected records, we need to act on these records one by one. You might even check some conditions and do different operations on different records. So records are passed, one by one, to the operations in List Flow. Most of your operations / logic will be inside this List Flow.

    • Current Record Notice the small tag at the start of List Flow. Just like we need a name to refer to list of selected records, we also need a name to refer to the record that is currently passed to List Flow. So, in operations, we can refer to its fields. You might be seeing ‘ContactRecord’. By default it is derived from ‘Singular’ in Select Records. You can change it by clicking the box indicating start of List Flow.

  4. Action – Create Task

    • Above step will select records that match given criteria. In our case it will be contacts of selected company. Now we need to tell what we want to do with each of the selected records. Click ‘+’ inside List Flow. Click ‘More’. Select operation ‘Create Task’,.

    • Set Task details

      • Task : My first UTron
      • When is it due : (leave as it is)
      • Category : Call
      • Who’s responsible : (select your name)
      • Related to : ContactRecord (associate with contact that is currently passed to List Flow)

    • Click ‘Save’

      Flow of your UTron is ready!

    • Click Test & Execute

    • It should show you preview of Tasks that are about to be created, under success.


    • Click Continue. Read & accept the conditions. And then execute.

    • After execution, your Tasks will be created. You can verify by going to Tasks page.

    Congrats on building a UTron flow on your own!

Abhishek A Agrawal
March 17, 2018

UTron – Create task for a Contact

Create task for a Contact

Go to UTrons (Only admins can create / manage UTrons). Choose One Time Changes UTron (We don’t need to do this repeatedly.)

In most cases, your need will be –

  • Find records (contacts / companies / deals etc.) that match certain criteria

  • Then do some operations on these records like send mail, create task, etc.

 

UTron is capable of doing lot more. But to easily cover the common needs, we show you a wizard (except in Data Changes UTron) in start which lets you easily do these two steps.

See the intro slide of wizard and click Continue.

  1. Select Records

    • We need to select records of type Contacts. So select table ‘Contact’.

      select-table
    • Now we need to tell which Contacts we want to select.

      Here, usually, we give conditions like Source = ‘Web’, Country = ‘US’ etc. So all records that match these conditions get selected.

       

      For this exercise, for simplicity, we will choose a particular Contact by giving condition Name = (some value here).

      • Click ‘Select field & its condition’ Select field ‘Contact Name’

      • Select field ‘Contact Name’

      • It shows you different values of that field from your records. So if you choose field city, you might see options like New York, Paris, etc. So you can easily select your criteria. For now, select the first contact name that you see. Remember the name. Click apply. Then click continue.


  2. Action – Create Task

    • Above step will select records that match given criteria. In our case it will be single record with selected name. Now we need to tell what we want to do with each of the selected records. Click ‘Create Task’.

    • Set Task details

      • Task : My first UTron
      • When is it due : (leave as it is)
      • Category : Call
      • Who’s responsible : (select your name)
      • Related to : ContactRecord (more details about this later)
    • Click ‘Save’

      Then we generate the flow for you.

      task-flow

      The flow can be read & understood as:

      • Select Contacts (that match criteria).
      • Lets give a name to this list – SelectedContacts
      • Pass every contact in SelectedContacts to List Flow one by one:

        • Lets call the current contact being passed as ‘ContactRecord’
        • Create Task for ContactRecord (every contact in list)

      Once wizard creates the flow, its possible to add more operations to the flow.

    • Click Test & Execute

    • It should show you preview of Task that is about to be created, under success.

      task-test-result
    • Click Continue. Read & accept the conditions. And then execute.
    • After execution, your Task will be created. You can verify by going to Tasks page.

    Congrats on building your first UTron!

    Now lets make the second UTron without using wizard

Abhishek A Agrawal

UTrons – Get Started

Learn to Design a UTron from Examples

utron-purple

What is UTron?

UTron is a sales bot that any non technical person can create in just clicks. You can automate your sales processes by creating UTrons.

How people use UTrons?

  • Send reminders / follow-ups to clients
  • Send notifications / reminders / alerts to sales people
  • Create task when deal stage changes
  • Check & disallow Duplicates
  • Automatically create deal, when company is created
  • Update customer status when deal is won
  • Send Alert If Quote Product Discount Exceeds 40%

And many more. Possibilities are endless.

Types of UTrons:

  • scheduled-utron-icon

    Scheduled UTron

    These are used to periodically (every day, once a week etc.) find records that match certain conditions (Quotes expired, Followups missed etc.) and act accordingly – like send reminder mail.

    You can have multiple scheduled UTrons, that are activated at different times. You can also do multiple things in same UTron if they have to be done at same times.

  • one-time-change-utron-icon

    One Time Changes UTron

    These are use for occasional needs like transfer contacts of one sales person to another. These can also be saved and used again in 1 click.

  • data-changes-utron-icon

    Data Changes UTron

    These are activated when records are created / modified. Most of the examples above are of this type.

    There can be only 1 Data changes UTron for each table (Contact, Company, Deal etc.). It is activated when any record of that type is created / modified.

    You can implement multiple use case in single UTon by adding steps. See example.

    (Coming Soon)

Get started

Lets create 2 very simple UTons (Must!)

Create task for a Contact

You don’t need a UTron for this but will really help in understanding UTrons!

Type : One time changes UTron

Logical Flow:

  • Find the contact
  • Create task associated with that contact.

See & repeat steps for this UTron (Imp – Don’t miss this. Approx. time – 2 min)

Find all Contacts of a Company & create a task for each Contact

Example of finding list of records that match certain criteria and performing some operations on them.

Type : One time changes UTron

Logical Flow:

  • Find all contacts of a particular company
  • Create tasks associated with each of these contacts.

See & repeat steps for this UTron(This is important too! I won’t force after this. Promise!)

See More Use Cases with Step by Step…

Send birthday mails

Everyday we need to find Contacts, whose birthday is today, and send them mail. That’s why we create a scheduled UTon and schedule it to be activated everyday.

Type : Scheduled UTon

Logical Flow:

  • Find all contacts whose birthday is today
  • Send a mail to each such contact.

See steps for this UTron

Everyday, send details of all won Deals to Head of Sales

Everyday we need to find Deals that were won yesterday, and send their details to Head of Sales. That’s why we create a scheduled UTon and schedule it to be activated everyday.

Type : Scheduled UTon

Logical Flow:

  • Find all deals that were won yesterday
  • Send a mail to Head of Sales with Deal details.

See steps for this UTron

Send a sequence of mails to new clients

Type : Scheduled UTon

Suppose you want to send a sequence of emails to new clients. One mail every week.

Logical Flow:

We need a way to identify new clients so that these emails should only be sent to them. We can do this using a custom field ‘Is New Client’ of type Yes/No. To add a client to this sequence, we mark this as Yes. After sequence is complete, we again mark this as No.

 

We need to know at which stage of the sequence each contact is so we can send them the right mail accordingly. We create a field ‘Onboarding stage’ of type ‘Select single value’ and add a value for each stage. We use current stage to decide which mail to send and also change the stage to next.

 

For simplicity, we will only send 2 mails in this example but you can easily add more. You can also create tasks for sales person instead of sending mails.

  • Find all contacts marked as new client
  • For each client, check the current onboarding stage

    • If stage is not set, send first mail and set stage to stage 1
    • If stage is stage 1, send second mail, set stage to stage 2 & set Is New Client to No.

See steps for this UTron

Abhishek A Agrawal
March 16, 2018

UTron – Send Birthday Mail

Assumption : There is a custom field ‘Birthday’ of type ‘Date’ in Contact Table

Design of UTron Flow

Type : Scheduled UTon

 

Everyday we need to find Contacts, whose birthday is today, and send them mail. That’s why we create a scheduled UTon and schedule it to be activated everyday.

Logical Steps
  • Find all contacts whose birthday is today
  • Send a mail to each such contact
Steps in UTron
  • Select contacts
    Where Birthday is Today (Ignore year)
  • Send Mails

automation-send-birthday-mail-flow
flow-img-arrow

This is how your flow will look.

Implementation

Make sure you have done both the Get Started tutorials before this :

Get Started – Part 1

Get Started – Part 2

To create UTron, you must be admin. Go to UTrons And choose “Scheduled UTron”.

  1. Select Records : We need to select Contact records (filter) whose Birthday is today.

    • Select Table ‘Contact’
    • Select Field : Birthday (custom field)
    • Select Condition : Period – Date Today (Ignore Year).
    If you are not using wizard, and instead adding steps to flow, a List Flow will be automatically added to your flow after above step. Add below step(s) inside this List Flow. Selected records will be passed to this List Flow one by one and the operations will be performed on each record.
  2. Select Action: Send Email

    • Select sender : Select your email account from which you would like to send email. You need to have atleast 1 email account added.

    • Select recipient : Select Contact’s Email field

    • Subject & Email content : Compose the mail. You can also add fields and they will be replaced by actual values when sending.

  3. Continue. Your UTron Flow will be automatically created for you. You can add more steps if needed.

  4. Test the UTron

  5. Schedule the UTron to run daily by selecting all days of the week.

Abhishek A Agrawal
March 14, 2018

Get Started

Get Started

  • How to Import Data 2:08

  • How to Sync Email 1:19

  • Lead Management 2:07

  • Task and Appointments 1:34

  • Deal Pipeline 1:49

  • Customize for Your Industry 7:06

  • Reports 2:23

  • Quotes 2:35

Abhishek A Agrawal
January 18, 2018

API Documentation

Authentication

Authenticate your account when using the API by including your secret API key and your CompanyHub subdomain in the request. You can see/manage your API keys from SettingsIntegrations. You can have maximum of 5 API keys. Your API keys carry many privileges, so be sure to keep them secret! Do not share your secret API keys in publicly accessible areas such your source control if it is public, client-side code, and so forth.

 

Authentication to the API is performed via custom authentication. You will have to provide your CompanyHub Subdomain and any of the API keys in Authorization header for authentication.

Versioning

Currently, CompanyHub is in v1 of API. So base API url is https://api.companyhub.com/v1/

Pagination

All top-level API resources have support for pagination. For instance you can list contacts, list companies, and list deals. These list API methods share a common structure, taking at least these two parameters: start, limit.

 

You get Total property in response to calculate no of pages and then decide the values of start and limit parameters. Start parameter skips the page whilst limit parameter limits the no of records per page.

Errors

CompanyHub uses conventional HTTP response codes to indicate the success or failure of an API request. In general, codes in the 2xx range indicate success and codes in the 5xx range indicate an error with CompanyHub’s servers (these are rare!).

 

Not all errors map cleanly onto HTTP response codes, however, you will get the error in the errors section of the response. You can check errors section if Success property in response is false.

You must have to send Content-Type header in the requests. The only value currently supported is application/json.

For each error, you will get a generalized error in Message property of response. You can check fieldwise errors in detail in Errors array. Here is the sample error response.

{
	"Success": false,
	"Message": "Either First Name or Last Name must be specified.",
	"Errors": {
		"FirstName": {
			"Errors": ["Either First Name or Last Name must be specified."]
		},
		"LastName": {
			"Errors": ["Either First Name or Last Name must be specified."]
		}
	}
}

You can also get errors if you are trying to perform an operation not permitted to you by your Admin. Admin can revoke/grant you permissions which can limit/extend the number of operations you can do. If you do not have permission to perform a certain operation, you can get such error in the response.

Know your table names and field names

To see the names of table and fields, go to SettingsCustomizeTables. Click on the table name. Now you can see the names of the table and fields. Make sure not to use the labels in API.

What can you access in API?

Currently, you can access standard tables like Contact, Company, Deal and all the custom tables you have created along with the fields you have access to.

 

You cannot access fields if you don’t have permission to read those fields. Also, you cannot update the fields you don’t have edit access to.

Resources

Test Authentication

You can test authentication with Companyhub.

Request:

Definition:GET  https://api.companyhub.com/v1/me

Headers:Authorization:  {your_subdomain} {your_api_key}Content-Type:  application/json

Response:

{
"Name": "John Doe",
"EmailAddress": "john.doe@johndoe.com",
"IsSandbox": false,
"Subdomain": "doebiz"
}

Get All Records

Returns a list of your records for a specified table. The records are returned with the most recent records appearing first in the response. You can paginate the records using pagination parameters.

Request

Definition:GET  https://api.companyhub.com/v1/tables/{tableName}

Headers:Authorization:  {your_subdomain} {your_api_key}Content-Type:  application/json

 

Response:

{
	"Total": 2,
	"Data": [{
		"ID": 2,
		"Name": "Danish Deshmukh",
		"FirstName": "Danish",
		"LastName": "Deshmukh",
		"Email": "danish@companyhub.com",
		"Company": {
			"ID": 1,
			"Name": "Site"
		},
		"Phone": "6666666666",
		"Designation": "Customer Success Manager",
		"Source": "Web",
		"NextFollowUpDate": "2018-01-17T00:00:00",
		"Description": "Danish Deshmukh is the Customer Success Manager at CompanyHub, in case of any Technical/Billing related queries we can reach out to him at his email.",
		"Twitter": null,
		"LinkedIn": "https://in.linkedin.com/in/danish-deshmukh-92155963",
		"GooglePlus": "https://plus.google.com/u/0/111900785578054685673",
		"Facebook": "https://www.facebook.com/danish.deshmukh.71",
		"Skype": null,
		"Street": null,
		"City": "Nashik",
		"State": "Maharashtra",
		"Country": "India",
		"PostalCode": "422101",
		"NoFollowups": false,
		"Hotness": "Unknown",
		"Owner": {
			"ID": 1,
			"Name": "John Doe"
		},
		"CreatedOn": "2018-01-18T08:07:47",
		"CreatedBy": {
			"ID": 1,
			"Name": "John Doe"
		},
		"ModifiedOn": "2018-01-18T08:07:47",
		"ModifiedBy": {
			"ID": 1,
			"Name": "John Doe"
		}
	}, {
		"ID": 1,
		"Name": "Abhishek A Agrawal",
		"FirstName": "Abhishek",
		"LastName": "A Agrawal",
		"Email": "abhishek@companyhub.com",
		"Company": {
			"ID": 1,
			"Name": "CompanyHub"
		},
		"Phone": "9999999999",
		"Designation": "CEO",
		"Source": "Web",
		"NextFollowUpDate": "2018-01-17T00:00:00",
		"Description": "Abhishek is passionate about technology and entrepreneurship. He is always looking to leverage technology for growth of business.",
		"Twitter": "https://twitter.com/abhipreneur",
		"LinkedIn": "https://in.linkedin.com/in/abhipreneur",
		"GooglePlus": "https://plus.google.com/u/0/117476859949086684278",
		"Facebook": "https://www.facebook.com/profile.php?id=572950163",
		"Skype": "agr.abhi",
		"Street": null,
		"City": "Nashik",
		"State": "Maharashtra",
		"Country": "India",
		"PostalCode": "Site",
		"NoFollowups": false,
		"Hotness": "Unknown",
		"Owner": {
			"ID": 1,
			"Name": "John Doe"
		},
		"CreatedOn": "2018-01-18T08:07:47",
		"CreatedBy": {
			"ID": 1,
			"Name": "John Doe"
		},
		"ModifiedOn": "2018-01-18T08:07:47",
		"ModifiedBy": {
			"ID": 1,
			"Name": "John Doe"
		}
	}],
	"Success": true,
	"Errors": {}
}

Get Perticular Record By ID

Retrieves the details of an existing record from specified table. You need to supply the unique record identifier that was returned upon record creation i.e. ID field for the record.

Request:

Definition: GET  https://api.companyhub.com/v1/tables/{tableName}/{ID}

Headers: Authorization:  {your_subdomain} {your_api_key}Content-Type:  application/json

Response:

{
	"Total": 1,
	"Data": {
		"ID": 2,
		"Name": "Danish Deshmukh",
		"FirstName": "Danish",
		"LastName": "Deshmukh",
		"Email": "danish@companyhub.com",
		"Company": {
			"ID": 1,
			"Name": "CompanyHub"
		},
		"Phone": "6666666666",
		"Designation": "Customer Success Manager",
		"Source": "Web",
		"NextFollowUpDate": "2018-01-17T00:00:00",
		"Description": "Danish Deshmukh is the Customer Success Manager at CompanyHub, in case of any Technical/Billing related queries we can reach out to him at his email.",
		"Owner": {
			"ID": 1,
			"Name": "John Doe"
		},
		"Twitter": null,
		"LinkedIn": "https://in.linkedin.com/in/danish-deshmukh-92155963",
		"GooglePlus": "https://plus.google.com/u/0/111900785578054685673",
		"Facebook": "https://www.facebook.com/danish.deshmukh.71",
		"Skype": null,
		"Street": null,
		"City": "Nashik",
		"State": "Maharashtra",
		"Country": "India",
		"PostalCode": "422101",
		"CreatedOn": "2018-01-18T08:07:47",
		"CreatedBy": {
			"ID": 1,
			"Name": "John Doe"
		},
		"ModifiedOn": "2018-01-18T08:07:47",
		"ModifiedBy": {
			"ID": 1,
			"Name": "John Doe"
		},
		"NoFollowups": false,
		"Hotness": "Unknown"
	},
	"Success": true,
	"Message": "",
	"Errors": {}
}

Create Record

Creates a record in the specified table and it returns the ID of record for further use. For instance, to associate in a related record.

Request:

Definition: POST  https://api.companyhub.com/v1/tables/{tableName}

Headers: Authorization:  {your_subdomain} {your_api_key}Content-Type:  application/json

Body:

{
  "FirstName":"John",
  "LastName":"Doe"
}

Response:

{
	"Id": 3,
	"Success": true,
	"Errors": {}
}

Edit Record

Updates the specified record by setting the values of the parameters passed. Any parameters not provided will be left unchanged.This request accepts mostly the same arguments as the record creation call along with the ID field.

Request:

Definition:PUT  https://api.companyhub.com/v1/tables/{tableName}/{ID}

Headers:Authorization:  {your_subdomain} {your_api_key}Content-Type:  application/json

Body:

{
  "LastName":"Doe"
}

Response:

{
	"Success": true,
	"Errors": {}
}

Delete one or more records

Deletes records of a specified table identified by IDs. You can recover deleted data for upto 30 days after which it is permanently deleted.

Request:

Definition:DELETE  https://api.companyhub.com/v1/tables/{tableName}

Headers:Authorization:  {your_subdomain} {your_api_key}Content-Type:  application/json

Body:

{
	"deletedIds": [{ID1},{ID2}]
}

Response:

[{
	"Success": true,
	"Errors": {}
}]

How can you filter records?

There are two ways in which you can filter the records.

Filter records for searches

You can use this to search records in CompanyHub when you want to show them in autocompletes or something similar where you don’t need accuracy. It is less accurate as it will search queried value in all fields on each record of the specified table. You can’t tell the field in which you want to search your query.

Request:

Definition:GET  https://api.companyhub.com/v1/tables/{tableName}?searchText={url_encoded_query}

Headers:Authorization:  {your_subdomain} {your_api_key}Content-Type:  application/json

Response:

{
	"Total": 2,
	"Data": [{...},{...}],
	"Success": true,
	"Errors": {
		
	}
}

Filter records for exact matches

When you want to assign lookups which require exact matches, you can filter or find the records by using the field name and query value.When you are doing something in API and you want to assign values or find records where certain field has a specific value, you can use this exact search.

 

You can use various operators such as: eq, ne, lt ,gt, le, ge etc.

Request:

Definition:POST  https://api.companyhub.com/v1/tables/{tableName}/search

Headers:Authorization:  {your_subdomain} {your_api_key}Content-Type:  application/json

Body:

{
  "Where": [
    {
      "FieldName": "FirstName",
      "Operator": "eq",
      "Values": ["dan"]
    }
  ]
}

Response:

{
	"Total": 2,
	"Data": [{...},{...}],
	"Success": true,
	"Errors": {
		
	}
}
Abhishek A Agrawal

Doc New – Custom Tables

Examples of tables

  • Automotive
    • Quotes
    • Commissions & Incentives
    • Scheduled Payments
    • Loan Disbursements
    • Vendors & Showrooms
  • Manufacturing
    • Products
    • Pricelists
    • Quotations & Orders
  • Real Estate
    • Properties / Projects
    • Bookings
    • Site visits
    • Payments
    • Agreements
  • Travel
    • Itinerary
    • Packages
    • Locations
    • Suppliers
    • Bookings
  • Education
    • Students
    • Institutes
    • Courses
    • Enrollments

What functionality you get with custom tables?

When you create a custom table, you get almost all the functionality that is common to standard tables. But you don’t get things like overview, followup, bulk mail, calling, deal pipeline etc

Custom tables come with:

List of records

custom table list of records

Filters

custom table filters

Detail page & associated records

custom table detail page associted records

Reporting

reporting on custom tables

Profiles & Permissions

custom table profile and permissions

Data access control

custom table data access control

How to create custom table

Go to Customize Tables and click ‘New Table’.

Decide how will you refer to its single record (singular) and list of records (plural). Like Contact & Contacts. Property & Properties. Enter singular in label and plural in plural. Name of table will be derived from label. Name has to be in English. In case you want to change the name, change it now as it can’t be changed later.

Click on next. Now add the fields you need, just like standard tables, and save the changes. Your new table will immediately appear in menu and you can start using it.

More details about adding fields

How to associate tables

Let’s say you want to associate multiple contacts with a company. So when creating a contact, you would like to see a company field, where you can choose the company. And when seeing a company, you would like to see list of associated contacts. By associating Contact & Company tables, you can achieve this.

 

This is the most common need.

Abhishek A Agrawal
December 23, 2017