Using the CRM Lookup component to query the contact details from your CRM

Introduction

This guide describes how to use the “CRM Lookup” component to query the contact details from the configured CRM, using a Call Flow created with the 3CX Call Flow Designer.

💡 Tip: The project for this example application is available via the CFD Demos GitHub page, and is installed along with the 3CX Call Flow Designer in your Windows user documents folder, i.e. “C:\Users\YourUsername\Documents\3CX Call Flow Designer Demos”.

During the creation of this demo application we will show the JSON returned by each CRM, and how to map different fields to variables. Finally, we will use text to speech to play the contact name in a welcome message.

Step 1: Create the Project

First, we need to create a new project. Open the CFD and go to “File” > “New” > “Callflow Project”, select the folder where you want to save it, and enter a name for the project, e.g. CRMLookupDemo.

Step 2: Read the configured CRM

This step is not required in a real application, because the CRM Lookup component will automatically do the lookup in the configured CRM. However, for the purpose of this demo, we want to show how to map each field from the CRM response to a variable. The CRM response usually has JSON format, and depends on the CRM. By selecting the configured CRM we will be able to show how to do this mapping for each CRM.

Proceed as follows:

  1. Drag a “Get Global Property” component from the toolbox, and drop it into the design surface of the “Main” callflow. Then select the component added, go to the “Properties Window” and rename it to “GetConfiguredCRM”. Change the Property Name to “CRMINT_DEFAULT”.

Read the configured CRM

  1. Drag a “Create a Condition” component from the toolbox, and drop it into the design surface of the “Main” callflow, just under the component added in the previous step. Configure this component with 14 branches, one for each CRM. Use the following expressions for the Condition property of each branch, to select it when the CRM is configured:
  1. For amoCRM:
    CONTAINS(GetConfiguredCRM.PropertyValue,"amocrm")
  2. For Bitrix:
    CONTAINS(GetConfiguredCRM.PropertyValue,"Bitrix")
  3. For ConnectWise:
    CONTAINS(GetConfiguredCRM.PropertyValue,"connectWise")
  4. For Dynamics 365:
    CONTAINS(GetConfiguredCRM.PropertyValue,"Microsoft Dynamics 365")
  5. For Freshdesk:
    CONTAINS(GetConfiguredCRM.PropertyValue,"Freshdesk")
  6. For Freshsales:
    CONTAINS(GetConfiguredCRM.PropertyValue,"Freshsales")
  7. For Freshworks CRM:
    CONTAINS(GetConfiguredCRM.PropertyValue,"Freshworks CRM")
  8. For Hubspot:
    CONTAINS(GetConfiguredCRM.PropertyValue,"HubSpot")
  9. For Nutshell:
    CONTAINS(GetConfiguredCRM.PropertyValue,"Nutshell")
  10. For Salesforce:
    CONTAINS(GetConfiguredCRM.PropertyValue,"Salesforce")
  11. For Vtiger:
    CONTAINS(GetConfiguredCRM.PropertyValue,"Vtiger")
  12. For Zendesk:
    CONTAINS(GetConfiguredCRM.PropertyValue,"Zendesk")
  13. For Zoho:
    CONTAINS(GetConfiguredCRM.PropertyValue,"Zoho")

Step 3: Get contact details with the CRM Lookup component

We will use the “CRM Lookup” component to get the contact details, store the contact’s first and last name in variables, so we can play a personalized welcome message.

In this article we will show how to do this mapping for Salesforce, however the complete project sources you can get from the CFD Demos GitHub page and demo folder in the computer where the CFD is installed contains the mapping for all the CRMs listed in this article. In addition, the Appendix section of this document explains how to do the mapping for all the entities on all these CRMs.

Let’s proceed:

Get contact details with the CRM Lookup component

  1. First, we need to define 2 variables to store the contact’s first and last name. Select the callflow in the Project Explorer, then go to the Properties window, select the Variables item and click the button on the right. Finally add the new variables.
  2. Drag a “CRM Lookup” component from the toolbox, and drop it into the design surface of the “Main” callflow, inside the “Salesforce” branch created in the previous step. Then select the component added, go to the “Properties Window” and rename it to “GetContactFromSalesforce”. Configure the component as follows:
  1. Entity: Contacts
  2. Lookup By: Entity Number
  3. Lookup Input Parameter:
    session.ani

CRM Lookup

  1. With the previous configuration we tell the component to do the lookup on Salesforce contacts (other available entities are Leads and Accounts), to do the lookup by phone number (we can also do the lookup by contact ID or even specifying a custom query), and we specify the caller’s number, which is available in variable
    session.ani
    , as the number to search. For the Response Mappings, specify the following:
  1. Store the value from Path
    FirstName
    in variable
    callflow$.FirstName
  2. Store the value from Path
    LastName
    in variable
    callflow$.LastName

The Response Mappings section lets us specify the Path in the JSON response, and the Variable in which the value should be saved. For example, if the JSON response is:

{

    "id": "1234",

    "name": {

        "first": "John",

        "last": "Doe"

    },

    "category": "gold"

}

Using the Path =

name.first
we will get the value “John”. And with Path =
name.last
we will get the value “Doe”. As you can see, this mapping will depend on the CRM, because the JSON response for each CRM is different. Check the Appendix section of this document for more information.

Step 4: Play a personalized welcome message

At this point, the variables

callflow$.FirstName
and
callflow$.LastName
have the value obtained from the CRM. We can use a Prompt Playback component to use text to speech in order to play a personalized message. We can use the following expression for the Text to Speech Audio Prompt:

CONCATENATE("Hello ",callflow$.FirstName," ",callflow$.LastName,"! Thanks for calling!")

Play a personalized welcome message

Step 5: Build and Deploy to 3CX Phone System

The project is ready to build and upload to our 3CX Phone System server, with these steps:

  1. Select “Build” > “Build All” and the CFD generates the file “CRMLookupDemo.zip”.
  2. Go to the “3CX Management Console” > “Advanced” > “Call Flow Apps” > “Add/Update”, and upload the ZIP file generated by the CFD in the previous step.
  3. The Call Flow app is ready to use. Make a call to the application, get the contact’s details and play them out.

Appendix: Mapping details for each CRM

The JSON returned by each CRM is different, so we need to consider this when mapping values from the response to variables. This section contains all the details for all the entities, for each CRM.

Please check our CRM guides for the list of CRMs that are developed and maintained by 3CX and which are supported by the vendor.

The following information is provided as a sample, however you might want to enable verbose logs in 3CX (from the 3CX Console > Dashboard > Activity Log > Settings), and check the JSON returned by the CRM from the 3CXCallFlow.log file.

amoCRM

Contacts

This is a sample response:

{

   "response":{

      "contacts":[

         {

            "id":61653804,

            "name":"John Doe",

            "company_name":"Sample Company",

            "type":"contact",

            "custom_fields":[

               {

                  "id":"1900202",

                  "name":"Phone",

                  "code":"PHONE",

                  "values":[

                     {

                        "value":"1122334455",

                        "enum":"4488138"

                     },

                     {

                        "value":"1122334456",

                        "enum":"4488142"

                     }

                  ]

               },

               {

                  "id":"1900204",

                  "name":"Email",

                  "code":"EMAIL",

                  "values":[

                     {

                        "value":"[email protected]",

                        "enum":"4488150"

                     }

                  ]

               }

            ]

         }

      ]

   }

}

Therefore, use the following path to get the name for the first returned contact:

response.contacts[0].name

Companies

This is a sample response:

{

   "response":{

      "contacts":[

         {

            "id":61653804,

            "name":"Sample Company",

            "type":"company",

            "custom_fields":[

               {

                  "id":"1900202",

                  "name":"Phone",

                  "code":"PHONE",

                  "values":[

                     {

                        "value":"1155551001",

                        "enum":"4488138"

                     }

                  ]

               },

               {

                  "id":"1900204",

                  "name":"Email",

                  "code":"EMAIL",

                  "values":[

                     {

                        "value":"[email protected]",

                        "enum":"4488150"

                     }

                  ]

               }

            ]

         }

      ]

   }

}

Therefore, use the following path to get the name for the first returned company:

response.contacts[0].name

Custom Query Format

Using the custom query, you can search in any field. For example, you can set the “Lookup Input Parameter” to an email address, a contact name, a company name, and so on, and do the lookup using that value.

Bitrix

Contacts

This is a sample response:

{

    "result": [

        {

            "ID": "2",

            "POST": "",

            "COMMENTS": "",

            "HONORIFIC": "HNR_EN_1",

            "NAME": "John",

            "SECOND_NAME": "",

            "LAST_NAME": "Doe",

            "PHOTO": {

                "id": 24,

                "showUrl": "/bitrix/components/bitrix/crm.contact.show/show_file.php?ownerId=2&fieldName=PHOTO&dynamic=N&fileId=24",

                "downloadUrl": "/bitrix/components/bitrix/crm.contact.show/show_file.php?auth=&ownerId=2&fieldName=PHOTO&dynamic=N&fileId=24"

            },

            "LEAD_ID": null,

            "TYPE_ID": "CLIENT",

            "SOURCE_ID": "CALL",

            "SOURCE_DESCRIPTION": "",

            "COMPANY_ID": null,

            "BIRTHDATE": "",

            "EXPORT": "Y",

            "HAS_PHONE": "Y",

            "HAS_EMAIL": "Y",

            "HAS_IMOL": "N",

            "DATE_CREATE": "2018-01-24T17:18:45+03:00",

            "DATE_MODIFY": "2019-03-28T18:23:48+03:00",

            "ASSIGNED_BY_ID": "1",

            "CREATED_BY_ID": "1",

            "MODIFY_BY_ID": "1",

            "OPENED": "Y",

            "ORIGINATOR_ID": null,

            "ORIGIN_ID": null,

            "ORIGIN_VERSION": null,

            "FACE_ID": null,

            "ADDRESS": null,

            "ADDRESS_2": null,

            "ADDRESS_CITY": null,

            "ADDRESS_POSTAL_CODE": null,

            "ADDRESS_REGION": null,

            "ADDRESS_PROVINCE": null,

            "ADDRESS_COUNTRY": null,

            "ADDRESS_COUNTRY_CODE": null,

            "UTM_SOURCE": null,

            "UTM_MEDIUM": null,

            "UTM_CAMPAIGN": null,

            "UTM_CONTENT": null,

            "UTM_TERM": null,

            "PHONE": [

                {

                    "ID": "4",

                    "VALUE_TYPE": "MOBILE",

                    "VALUE": "1122334455",

                    "TYPE_ID": "PHONE"

                },

                {

                    "ID": "32",

                    "VALUE_TYPE": "WORK",

                    "VALUE": "1122334456",

                    "TYPE_ID": "PHONE"

                },

                {

                    "ID": "34",

                    "VALUE_TYPE": "FAX",

                    "VALUE": "1122334457",

                    "TYPE_ID": "PHONE"

                },

                {

                    "ID": "36",

                    "VALUE_TYPE": "HOME",

                    "VALUE": "1122334458",

                    "TYPE_ID": "PHONE"

                },

                {

                    "ID": "38",

                    "VALUE_TYPE": "PAGER",

                    "VALUE": "1122334459",

                    "TYPE_ID": "PHONE"

                },

                {

                    "ID": "40",

                    "VALUE_TYPE": "OTHER",

                    "VALUE": "1122334460",

                    "TYPE_ID": "PHONE"

                }

            ],

            "EMAIL": [

                {

                    "ID": "42",

                    "VALUE_TYPE": "WORK",

                    "VALUE": "[email protected]",

                    "TYPE_ID": "EMAIL"

                }

            ]

        }

    ],

    "total": 1,

    "time": {

        "start": 1554198985.1398,

        "finish": 1554198985.2725,

        "duration": 0.1327018737793,

        "processing": 0.077700138092041,

        "date_start": "2019-04-02T12:56:25+03:00",

        "date_finish": "2019-04-02T12:56:25+03:00"

    }

}

Therefore, use the following path to get the last name for the first returned contact:

result[0].LAST_NAME

Leads

This is a sample response:

{

    "result": [

        {

            "ID": "2",

            "TITLE": "John Doe",

            "HONORIFIC": "0",

            "NAME": "John",

            "SECOND_NAME": "",

            "LAST_NAME": "Doe",

            "COMPANY_TITLE": "",

            "COMPANY_ID": "0",

            "CONTACT_ID": null,

            "IS_RETURN_CUSTOMER": "N",

            "BIRTHDATE": "",

            "SOURCE_ID": "CALL",

            "SOURCE_DESCRIPTION": "",

            "STATUS_ID": "NEW",

            "STATUS_DESCRIPTION": null,

            "POST": "",

            "COMMENTS": "",

            "CURRENCY_ID": "USD",

            "OPPORTUNITY": "0.00",

            "HAS_PHONE": "Y",

            "HAS_EMAIL": "Y",

            "HAS_IMOL": "N",

            "ASSIGNED_BY_ID": "1",

            "CREATED_BY_ID": "1",

            "MODIFY_BY_ID": "1",

            "DATE_CREATE": "2018-01-24T17:17:31+03:00",

            "DATE_MODIFY": "2019-04-02T10:45:45+03:00",

            "DATE_CLOSED": "",

            "STATUS_SEMANTIC_ID": "P",

            "OPENED": "Y",

            "ORIGINATOR_ID": null,

            "ORIGIN_ID": null,

            "ADDRESS": null,

            "ADDRESS_2": null,

            "ADDRESS_CITY": null,

            "ADDRESS_POSTAL_CODE": null,

            "ADDRESS_REGION": null,

            "ADDRESS_PROVINCE": null,

            "ADDRESS_COUNTRY": null,

            "ADDRESS_COUNTRY_CODE": null,

            "UTM_SOURCE": null,

            "UTM_MEDIUM": null,

            "UTM_CAMPAIGN": null,

            "UTM_CONTENT": null,

            "UTM_TERM": null,

            "PHONE": [

                {

                    "ID": "2",

                    "VALUE_TYPE": "WORK",

                    "VALUE": "1122334455",

                    "TYPE_ID": "PHONE"

                },

                {

                    "ID": "8",

                    "VALUE_TYPE": "MOBILE",

                    "VALUE": "1122334400",

                    "TYPE_ID": "PHONE"

                },

                {

                    "ID": "10",

                    "VALUE_TYPE": "FAX",

                    "VALUE": "1122334401",

                    "TYPE_ID": "PHONE"

                },

                {

                    "ID": "12",

                    "VALUE_TYPE": "HOME",

                    "VALUE": "1122334402",

                    "TYPE_ID": "PHONE"

                },

                {

                    "ID": "14",

                    "VALUE_TYPE": "PAGER",

                    "VALUE": "1122334403",

                    "TYPE_ID": "PHONE"

                },

                {

                    "ID": "16",

                    "VALUE_TYPE": "OTHER",

                    "VALUE": "1122334404",

                    "TYPE_ID": "PHONE"

                },

                {

                    "ID": "180",

                    "VALUE_TYPE": "WORK",

                    "VALUE": "1122334490",

                    "TYPE_ID": "PHONE"

                }

            ],

            "EMAIL": [

                {

                    "ID": "18",

                    "VALUE_TYPE": "WORK",

                    "VALUE": "[email protected]",

                    "TYPE_ID": "EMAIL"

                }

            ]

        }

    ],

    "total": 1,

    "time": {

        "start": 1554199072.2721,

        "finish": 1554199072.3197,

        "duration": 0.047569036483765,

        "processing": 0.01862907409668,

        "date_start": "2019-04-02T12:57:52+03:00",

        "date_finish": "2019-04-02T12:57:52+03:00"

    }

}

Therefore, use the following path to get the last name for the first returned lead:

result[0].LAST_NAME

Companies

This is a sample response:

{

    "result": [

        {

            "ID": "2",

            "COMPANY_TYPE": "CUSTOMER",

            "TITLE": "Sample Company",

            "LOGO": null,

            "LEAD_ID": null,

            "HAS_PHONE": "Y",

            "HAS_EMAIL": "Y",

            "HAS_IMOL": "N",

            "ASSIGNED_BY_ID": "1",

            "CREATED_BY_ID": "1",

            "MODIFY_BY_ID": "1",

            "BANKING_DETAILS": null,

            "INDUSTRY": "IT",

            "REVENUE": "0",

            "CURRENCY_ID": "USD",

            "EMPLOYEES": "EMPLOYEES_1",

            "COMMENTS": "",

            "DATE_CREATE": "2018-01-24T17:19:17+03:00",

            "DATE_MODIFY": "2019-04-02T10:10:45+03:00",

            "OPENED": "Y",

            "IS_MY_COMPANY": "N",

            "ORIGINATOR_ID": null,

            "ORIGIN_ID": null,

            "ORIGIN_VERSION": null,

            "ADDRESS": null,

            "ADDRESS_2": null,

            "ADDRESS_CITY": null,

            "ADDRESS_POSTAL_CODE": null,

            "ADDRESS_REGION": null,

            "ADDRESS_PROVINCE": null,

            "ADDRESS_COUNTRY": null,

            "ADDRESS_COUNTRY_CODE": null,

            "ADDRESS_LEGAL": null,

            "REG_ADDRESS": null,

            "REG_ADDRESS_2": null,

            "REG_ADDRESS_CITY": null,

            "REG_ADDRESS_POSTAL_CODE": null,

            "REG_ADDRESS_REGION": null,

            "REG_ADDRESS_PROVINCE": null,

            "REG_ADDRESS_COUNTRY": null,

            "REG_ADDRESS_COUNTRY_CODE": null,

            "UTM_SOURCE": null,

            "UTM_MEDIUM": null,

            "UTM_CAMPAIGN": null,

            "UTM_CONTENT": null,

            "UTM_TERM": null,

            "PHONE": [

                {

                    "ID": "6",

                    "VALUE_TYPE": "WORK",

                    "VALUE": "1122334457",

                    "TYPE_ID": "PHONE"

                },

                {

                    "ID": "20",

                    "VALUE_TYPE": "MOBILE",

                    "VALUE": "1122334410",

                    "TYPE_ID": "PHONE"

                },

                {

                    "ID": "22",

                    "VALUE_TYPE": "FAX",

                    "VALUE": "1122334411",

                    "TYPE_ID": "PHONE"

                },

                {

                    "ID": "24",

                    "VALUE_TYPE": "HOME",

                    "VALUE": "1122334412",

                    "TYPE_ID": "PHONE"

                },

                {

                    "ID": "26",

                    "VALUE_TYPE": "PAGER",

                    "VALUE": "1122334413",

                    "TYPE_ID": "PHONE"

                },

                {

                    "ID": "28",

                    "VALUE_TYPE": "OTHER",

                    "VALUE": "1122334414",

                    "TYPE_ID": "PHONE"

                }

            ],

            "EMAIL": [

                {

                    "ID": "30",

                    "VALUE_TYPE": "WORK",

                    "VALUE": "[email protected]",

                    "TYPE_ID": "EMAIL"

                }

            ]

        }

    ],

    "total": 1,

    "time": {

        "start": 1554198994.3146,

        "finish": 1554198994.3494,

        "duration": 0.034813165664673,

        "processing": 0.011024951934814,

        "date_start": "2019-04-02T12:56:34+03:00",

        "date_finish": "2019-04-02T12:56:34+03:00"

    }

}

Therefore, use the following path to get the name for the first returned company:

result[0].TITLE

Custom Query Format

Using the custom query, you can search in any field using the built-in Bitrix filtering capabilities. For example, you can set the “Lookup Input Parameter” to the following expression in order to search for an email address:

ConnectWise

Contacts

This is a sample response:

[

   {

      "id":22,

      "firstName":"John",

      "lastName":"Doe",

      "company":{

         "id":250,

         "identifier":"samplecompany",

         "name":"Sample Company",

         "_info":{

            "company_href":"https://connect.example.com/v4_6_release/apis/3.0/company/companies/250",

            "mobileGuid":"1df91371-6d7a-4778-ab81-f3e7761f5211"

         }

      },

      "site":{

         "id":1004,

         "name":"",

         "_info":{

            "site_href":"https://connect.example.com/v4_6_release/apis/3.0/company/companies/250/sites/1004",

            "mobileGuid":"d0e3e7ce-e138-4fd9-aa74-7f3ea5de8673"

         }

      },

      "relationship":{

         "id":0,

         "_info":{

            "relationship_href":"https://connect.example.com/v4_6_release/apis/3.0/company/contacts/relationships/0"

         }

      },

      "inactiveFlag":false,

      "title":"Sales Representative",

      "marriedFlag":false,

      "childrenFlag":false,

      "unsubscribeFlag":false,

      "mobileGuid":"14a017d5-a4ff-452c-923f-a7d592a0409f",

      "defaultBillingFlag":false,

      "defaultFlag":false,

      "communicationItems":[

         {

            "id":44136,

            "type":{

               "id":2,

               "name":"Direct"

            },

            "value":"1155550000",

            "extension":"",

            "defaultFlag":true,

            "communicationType":"Phone"

         },

         {

            "id":44137,

            "type":{

               "id":1,

               "name":"Email"

            },

            "value":"[email protected]",

            "extension":"",

            "defaultFlag":true,

            "communicationType":"Email"

         },

         {

            "id":44138,

            "type":{

               "id":4,

               "name":"Mobile"

            },

            "value":"1155550001",

            "extension":"",

            "defaultFlag":false,

            "communicationType":"Phone"

         }

      ],

      "_info":{

         "lastUpdated":"2017-12-08T09:46:50Z",

         "updatedBy":"Import6",

         "communications_href":"https://connect.example.com/v4_6_release/apis/3.0/company/contacts/22/communications",

         "notes_href":"https://connect.example.com/v4_6_release/apis/3.0/company/contacts/22/notes",

         "tracks_href":"https://connect.example.com/v4_6_release/apis/3.0/company/contacts/22/tracks",

         "portalSecurity_href":"https://connect.example.com/v4_6_release/apis/3.0/company/contacts/22/portalSecurity",

         "activities_href":"https://connect.example.com/v4_6_release/apis/3.0/sales/activities?conditions=contact/id=22",

         "documents_href":"https://connect.example.com/v4_6_release/apis/3.0/system/documents?recordType=Contact&recordId=22",

         "configurations_href":"https://connect.example.com/v4_6_release/apis/3.0/company/configurations?conditions=contact/id=22",

         "tickets_href":"https://connect.example.com/v4_6_release/apis/3.0/service/tickets?conditions=contact/id=22",

         "opportunities_href":"https://connect.example.com/v4_6_release/apis/3.0/sales/opportunities?conditions=contact/id=22",

         "projects_href":"https://connect.example.com/v4_6_release/apis/3.0/project/projects?conditions=contact/id=22",

         "image_href":"https://connect.example.com/v4_6_release/apis/3.0/company/contacts/22/image?lastModified=2017-12-08T09:46:50Z"

      }

   }

]

Therefore, use the following path to get the last name for the first returned contact:

[0].lastName

Companies

This is a sample response:

[

   {

      "id":5,

      "identifier":"samplecompany",

      "name":"Sample Company",

      "status":{

         "id":1,

         "name":"Active",

         "_info":{

            "status_href":"https://api-staging.connectwisedev.com/v4_6_release/apis/3.0/company/companies/statuses/1"

         }

      },

      "type":{

         "id":1,

         "name":"Customer",

         "_info":{

            "type_href":"https://api-staging.connectwisedev.com/v4_6_release/apis/3.0/company/companies/types/1"

         }

      },

      "addressLine1":"Sample St.",

      "city":"Tampa",

      "state":"FL",

      "zip":"33607",

      "phoneNumber":"8135932200",

      "faxNumber":"8135932201",

      "website":"http://www.example.com",

      "territoryId":38,

      "marketId":17,

      "accountNumber":"Sample Company",

      "defaultContact":{

         "id":13,

         "name":"John Doe",

         "_info":{

            "contact_href":"https://api-staging.connectwisedev.com/v4_6_release/apis/3.0/company/contacts/13"

         }

      },

      "dateAcquired":"2005-03-21T15:43:44Z",

      "annualRevenue":0.00,

      "numberOfEmployees":56,

      "timeZone":{

         "id":1,

         "name":"US Eastern",

         "_info":{

            "timeZoneSetup_href":"https://api-staging.connectwisedev.com/v4_6_release/apis/3.0/system/timeZoneSetups/1"

         }

      },

      "leadSource":"Microsoft Tradeshow",

      "leadFlag":false,

      "unsubscribeFlag":false,

      "taxCode":{

         "id":11,

         "name":"State",

         "_info":{

            "taxCode_href":"https://api-staging.connectwisedev.com/v4_6_release/apis/3.0/finance/taxCodes/11"

         }

      },

      "billingTerms":{

         "id":2,

         "name":"Net 10"

      },

      "billToCompany":{

         "id":5,

         "identifier":"SampleCompany",

         "name":"Sample Company",

         "_info":{

            "company_href":"https://api-staging.connectwisedev.com/v4_6_release/apis/3.0/company/companies/5"

         }

      },

      "invoiceDeliveryMethod":{

         "id":1,

         "name":"Mail"

      },

      "deletedFlag":false,

      "mobileGuid":"01f86d59-41e0-4c6d-ba44-786de9237405",

      "_info":{

         "lastUpdated":"2018-04-30T16:26:34Z",

         "updatedBy":"SampleUser",

         "dateEntered":"2005-03-21T15:43:44Z",

         "enteredBy":"CONVERSION",

         "contacts_href":"https://api-staging.connectwisedev.com/v4_6_release/apis/3.0/company/contacts?conditions=company/id=5",

         "agreements_href":"https://api-staging.connectwisedev.com/v4_6_release/apis/3.0/finance/agreements?conditions=company/id=5",

         "tickets_href":"https://api-staging.connectwisedev.com/v4_6_release/apis/3.0/service/tickets?conditions=company/id=5",

         "opportunities_href":"https://api-staging.connectwisedev.com/v4_6_release/apis/3.0/sales/opportunities?conditions=company/id=5",

         "activities_href":"https://api-staging.connectwisedev.com/v4_6_release/apis/3.0/sales/activities?conditions=company/id=5",

         "projects_href":"https://api-staging.connectwisedev.com/v4_6_release/apis/3.0/project/projects?conditions=company/id=5",

         "configurations_href":"https://api-staging.connectwisedev.com/v4_6_release/apis/3.0/company/configurations?conditions=company/id=5",

         "orders_href":"https://api-staging.connectwisedev.com/v4_6_release/apis/3.0/sales/orders?conditions=company/id=5",

         "documents_href":"https://api-staging.connectwisedev.com/v4_6_release/apis/3.0/system/documents?recordType=Company&recordId=5",

         "sites_href":"https://api-staging.connectwisedev.com/v4_6_release/apis/3.0/company/companies/5/sites",

         "teams_href":"https://api-staging.connectwisedev.com/v4_6_release/apis/3.0/company/companies/5/teams",

         "reports_href":"https://api-staging.connectwisedev.com/v4_6_release/apis/3.0/company/companies/5/managementSummaryReports",

         "notes_href":"https://api-staging.connectwisedev.com/v4_6_release/apis/3.0/company/companies/5/notes"

      }

   }

]

Therefore, use the following path to get the name for the first returned company:

[0].name

Custom Query Format

Using the custom query, you can search in any field using the built-in ConnectWise filtering capabilities. For example, you can set the “Lookup Input Parameter” to the following expression in order to search for an email address:

inactiveFlag=false&childconditions=(communicationItems/communicationType='Email' AND communicationItems/value='[email protected]')

Dynamics 365

Contacts

This is a sample response:

{

   "value":[

      {

         "@odata.etag":"W/\"1092154\"",

         "firstname":"John",

         "lastname":"Doe",

         "middlename": "Middle",

         "_parentcustomerid_value":"577ab9cc-7658-e811-a95d-000d3ac009b4",

         "telephone1":"1122334455",

         "telephone2":null,

         "telephone3":null,

         "fax":"1122334456",

         "address2_telephone1":null,

         "address2_telephone2":null,

         "address2_telephone3":null,

         "address2_fax":null,

         "pager":null,

         "emailaddress1":"[email protected]",

         "contactid":"8da6e5b9-88df-e311-b8e5-6c3be5a8b200"

      }

   ]

}

Therefore, use the following path to get the last name for the first returned contact:

value[0].lastname

Leads

This is a sample response:

{

   "value":[

      {

         "@odata.etag":"W/\"1108105\"",

         "firstname":"John",

         "lastname":"Doe",

         "telephone1":"1122334455",

         "telephone2":null,

         "telephone3":null,

         "address1_telephone1":null,

         "address1_telephone2":null,

         "address1_telephone3":null,

         "address1_fax":null,

         "emailaddress1":"[email protected]",

         "leadid":"c2869ac8-2f59-e811-a95d-000d3ac009b4"

      }

   ]

}

Therefore, use the following path to get the last name for the first returned lead:

value[0].lastname

Accounts

This is a sample response:

{

   "value":[

      {

         "@odata.etag":"W/\"1091904\"",

         "name":"Sample Company",

         "telephone1":"1122334455",

         "telephone2":null,

         "telephone3":null,

         "fax":"1122334456",

         "address1_telephone1":null,

         "address1_telephone2":null,

         "address1_fax":null,

         "address2_telephone1":null,

         "address2_telephone2":null,

         "address2_fax":null,

         "emailaddress1":null,

         "accountid":"577ab9cc-7658-e811-a95d-000d3ac009b4"

      }

   ]

}

Therefore, use the following path to get the name for the first returned account:

value[0].name

Custom Query Format

Using the custom query, you can search in any field using the built-in Dynamics 365 filtering capabilities. For example, you can set the “Lookup Input Parameter” to the following expression in order to search for an email address:

emailaddress1 eq '[email protected]'

Freshdesk

Contacts

This is a sample response:

[

    {

        "active": false,

        "address": null,

        "company_id": 17000044495,

        "description": null,

        "email": "[email protected]",

        "id": 17000239484,

        "job_title": null,

        "language": "en-US",

        "mobile": "1122334456",

        "name": "John Doe",

        "phone": "1122334455",

        "time_zone": "Eastern Time (US & Canada)",

        "twitter_id": null,

        "custom_fields": {},

        "facebook_id": null,

        "created_at": "2016-07-16T00:36:33Z",

        "updated_at": "2018-10-30T08:32:18Z"

    }

]

Therefore, use the following path to get the name for the first returned contact:

[0].name

Custom Query Format

Using the custom query, you can search in any field using the built-in Freshdesk filtering capabilities. For example, you can set the “Lookup Input Parameter” to the following expression in order to search for an email address:

Freshsales

Contacts

This is a sample response:

{

   "contacts":{

      "sales_accounts":[

         {

            "partial":true,

            "id":3001189103,

            "name":"Sample Company",

            "avatar":null,

            "website":null,

            "open_deals_amount":"0.0",

            "won_deals_amount":"0.0",

            "owner_id":3000026092,

            "last_contacted":null

         }

      ],

      "contacts":[

         {

            "id":3003454446,

            "first_name":"John",

            "last_name":"Doe",

            "display_name":"John Doe",

            "avatar":null,

            "job_title":"Developer",

            "city":null,

            "state":null,

            "zipcode":null,

            "country":null,

            "email":"[email protected]",

            "do_not_disturb":false,

            "has_authority":false,

            "time_zone":null,

            "department":"I+D",

            "work_number":"1155550001",

            "mobile_number":"1155550002",

            "address":null,

            "last_seen":null,

            "lead_score":7,

            "lead_quality":"Cold",

            "last_contacted":null,

            "open_deals_amount":"0.0",

            "won_deals_amount":"0.0",

            "links":{

               "conversations":"/contacts/3003454446/conversations/all?include=email_conversation_recipients%2Ctargetable%2Cphone_number%2Cphone_caller%2Cnote%2Cuser\u0026per_page=3",

               "timeline_feeds":"/contacts/3003454446/timeline_feeds",

               "document_associations":"/contacts/3003454446/document_associations",

               "notes":"/contacts/3003454446/notes?include=creater",

               "tasks":"/contacts/3003454446/tasks?include=creater,owner,updater,targetable,users,task_type",

               "appointments":"/contacts/3003454446/appointments?include=creater,owner,updater,targetable,appointment_attendees"

            },

            "last_contacted_sales_activity_mode":null,

            "custom_field":{

            },

            "created_at":"2018-07-05T14:17:10Z",

            "updated_at":"2018-07-10T14:41:36Z",

            "keyword":null,

            "medium":null,

            "email_status":"Active",

            "last_contacted_mode":null,

            "recent_note":null,

            "last_contacted_via_chat":null,

            "won_deals_count":0,

            "last_contacted_via_sales_activity":null,

            "completed_sales_sequences":null,

            "active_sales_sequences":null,

            "web_form_ids":null,

            "open_deals_count":0,

            "facebook":null,

            "twitter":null,

            "linkedin":null,

            "sales_account_id":3001189103

         }

      ]

   }

}

Therefore, use the following path to get the last name for the first returned contact:

contacts.contacts[0].last_name

Leads

This is a sample response:

{

   "leads":{

      "leads":[

         {

            "id":3007597922,

            "job_title":null,

            "department":null,

            "email":"[email protected]",

            "work_number":"1155551001",

            "mobile_number":"1155551002",

            "address":null,

            "city":null,

            "state":null,

            "zipcode":null,

            "country":null,

            "time_zone":null,

            "do_not_disturb":false,

            "display_name":"John Doe",

            "avatar":null,

            "keyword":null,

            "medium":null,

            "last_seen":null,

            "last_contacted":null,

            "lead_score":5,

            "lead_quality":"Cold",

            "stage_updated_time":"2018-07-10T14:04:47Z",

            "first_name":"John",

            "last_name":"Doe",

            "company":{

               "id":3007597922,

               "name":"Sample Company",

               "address":null,

               "city":"Minsk",

               "state":null,

               "zipcode":null,

               "country":"Belarus",

               "number_of_employees":1,

               "annual_revenue":null,

               "website":"www.example.com",

               "phone":null,

               "industry_type_id":null,

               "industry_type":null,

               "business_type_id":null,

               "business_type":null

            },

            "deal":null,

            "links":{

               "conversations":"/leads/3007597922/conversations/all?include=email_conversation_recipients%2Ctargetable%2Cphone_number%2Cphone_caller%2Cnote%2Cuser\u0026per_page=3",

               "timeline_feeds":"/leads/3007597922/timeline_feeds",

               "document_associations":"/leads/3007597922/document_associations",

               "notes":"/leads/3007597922/notes?include=creater",

               "tasks":"/leads/3007597922/tasks?include=creater,owner,updater,targetable,users,task_type",

               "appointments":"/leads/3007597922/appointments?include=creater,owner,updater,targetable,appointment_attendees"

            },

            "custom_field":{

            },

            "created_at":"2018-07-10T14:04:47Z",

            "updated_at":"2018-07-10T14:04:48Z",

            "last_contacted_sales_activity_mode":null,

            "has_authority":false,

            "email_status":"Active",

            "last_contacted_mode":null,

            "recent_note":null,

            "last_contacted_via_chat":null,

            "last_contacted_via_sales_activity":null,

            "completed_sales_sequences":null,

            "active_sales_sequences":null,

            "web_form_ids":null,

            "facebook":null,

            "twitter":null,

            "linkedin":null

         }

      ]

   }

}

Therefore, use the following path to get the last name for the first returned lead:

leads.leads[0].last_name

Accounts

This is a sample response:

{

   "sales_accounts":{

      "sales_accounts":[

         {

            "id":3001189103,

            "name":"Sample Company",

            "address":null,

            "city":null,

            "state":null,

            "zipcode":null,

            "country":null,

            "number_of_employees":null,

            "annual_revenue":null,

            "website":null,

            "owner_id":3000026092,

            "phone":"1155552001",

            "open_deals_amount":"0.0",

            "won_deals_amount":"0.0",

            "last_contacted":null,

            "last_contacted_mode":null,

            "facebook":null,

            "twitter":null,

            "linkedin":null,

            "links":{

               "conversations":"/sales_accounts/3001189103/conversations/all?include=email_conversation_recipients%2Ctargetable%2Cphone_number%2Cphone_caller%2Cnote%2Cuser\u0026per_page=3",

               "document_associations":"/sales_accounts/3001189103/document_associations",

               "notes":"/sales_accounts/3001189103/notes?include=creater",

               "tasks":"/sales_accounts/3001189103/tasks?include=creater,owner,updater,targetable,users,task_type",

               "appointments":"/sales_accounts/3001189103/appointments?include=creater,owner,updater,targetable,appointment_attendees"

            },

            "custom_field":{

            },

            "created_at":"2018-07-10T14:38:59Z",

            "updated_at":"2018-07-10T14:39:22Z",

            "avatar":null,

            "parent_sales_account_id":null,

            "recent_note":null,

            "last_contacted_via_chat":null,

            "last_contacted_via_sales_activity":null,

            "last_contacted_sales_activity_mode":null,

            "completed_sales_sequences":null,

            "active_sales_sequences":null

         }

      ]

   }

}

Therefore, use the following path to get the name for the first returned account:

sales_accounts.sales_accounts[0].name

Custom Query Format

Using the custom query, you can search in any field using the built-in Freshsales lookup capabilities. For example, you can set the “Lookup Input Parameter” to the following expression in order to search for an email address:

[email protected]&f=email&entities=contact&include=sales_account

Freshworks CRM

Contacts

This is a sample response:

{

   "contacts":{

      "sales_accounts":[

         {

            "partial":true,

            "id":3001189103,

            "name":"Sample Company",

            "avatar":null,

            "website":null,

            "open_deals_amount":"0.0",

            "won_deals_amount":"0.0",

            "owner_id":3000026092,

            "last_contacted":null

         }

      ],

      "contacts":[

         {

            "id":3003454446,

            "first_name":"John",

            "last_name":"Doe",

            "display_name":"John Doe",

            "avatar":null,

            "job_title":"Developer",

            "city":null,

            "state":null,

            "zipcode":null,

            "country":null,

            "email":"[email protected]",

            "do_not_disturb":false,

            "has_authority":false,

            "time_zone":null,

            "department":"I+D",

            "work_number":"1155550001",

            "mobile_number":"1155550002",

            "address":null,

            "last_seen":null,

            "lead_score":7,

            "lead_quality":"Cold",

            "last_contacted":null,

            "open_deals_amount":"0.0",

            "won_deals_amount":"0.0",

            "links":{

               "conversations":"/contacts/3003454446/conversations/all?include=email_conversation_recipients%2Ctargetable%2Cphone_number%2Cphone_caller%2Cnote%2Cuser\u0026per_page=3",

               "timeline_feeds":"/contacts/3003454446/timeline_feeds",

               "document_associations":"/contacts/3003454446/document_associations",

               "notes":"/contacts/3003454446/notes?include=creater",

               "tasks":"/contacts/3003454446/tasks?include=creater,owner,updater,targetable,users,task_type",

               "appointments":"/contacts/3003454446/appointments?include=creater,owner,updater,targetable,appointment_attendees"

            },

            "last_contacted_sales_activity_mode":null,

            "custom_field":{

            },

            "created_at":"2018-07-05T14:17:10Z",

            "updated_at":"2018-07-10T14:41:36Z",

            "keyword":null,

            "medium":null,

            "email_status":"Active",

            "last_contacted_mode":null,

            "recent_note":null,

            "last_contacted_via_chat":null,

            "won_deals_count":0,

            "last_contacted_via_sales_activity":null,

            "completed_sales_sequences":null,

            "active_sales_sequences":null,

            "web_form_ids":null,

            "open_deals_count":0,

            "facebook":null,

            "twitter":null,

            "linkedin":null,

            "sales_account_id":3001189103

         }

      ]

   }

}

Therefore, use the following path to get the last name for the first returned contact:

contacts.contacts[0].last_name

Accounts

This is a sample response:

{

   "sales_accounts":{

      "sales_accounts":[

         {

            "id":3001189103,

            "name":"Sample Company",

            "address":null,

            "city":null,

            "state":null,

            "zipcode":null,

            "country":null,

            "number_of_employees":null,

            "annual_revenue":null,

            "website":null,

            "owner_id":3000026092,

            "phone":"1155552001",

            "open_deals_amount":"0.0",

            "won_deals_amount":"0.0",

            "last_contacted":null,

            "last_contacted_mode":null,

            "facebook":null,

            "twitter":null,

            "linkedin":null,

            "links":{

               "conversations":"/sales_accounts/3001189103/conversations/all?include=email_conversation_recipients%2Ctargetable%2Cphone_number%2Cphone_caller%2Cnote%2Cuser\u0026per_page=3",

               "document_associations":"/sales_accounts/3001189103/document_associations",

               "notes":"/sales_accounts/3001189103/notes?include=creater",

               "tasks":"/sales_accounts/3001189103/tasks?include=creater,owner,updater,targetable,users,task_type",

               "appointments":"/sales_accounts/3001189103/appointments?include=creater,owner,updater,targetable,appointment_attendees"

            },

            "custom_field":{

            },

            "created_at":"2018-07-10T14:38:59Z",

            "updated_at":"2018-07-10T14:39:22Z",

            "avatar":null,

            "parent_sales_account_id":null,

            "recent_note":null,

            "last_contacted_via_chat":null,

            "last_contacted_via_sales_activity":null,

            "last_contacted_sales_activity_mode":null,

            "completed_sales_sequences":null,

            "active_sales_sequences":null

         }

      ]

   }

}

Therefore, use the following path to get the name for the first returned account:

sales_accounts.sales_accounts[0].name

Custom Query Format

Using the custom query, you can search in any field using the built-in Freshworks CRM lookup capabilities. For example, you can set the “Lookup Input Parameter” to the following expression in order to search for an email address:

[email protected]&f=email&entities=contact&include=sales_account

Hubspot

Contacts

This is a sample response:

{

   "properties":{

      "company":"Sample Company",

      "createdate":"2020-09-22T14:03:19.338Z",

      "email":"[email protected]",

      "fax":"1155550003",

      "firstname":"John",

      "hs_object_id":"101",

      "lastmodifieddate":"2020-10-27T15:01:08.204Z",

      "lastname":"Doe",

      "mobilephone":"1155550002",

      "phone":"1155550001"

   }

}

Therefore, use the following path to get the last name for the first returned contact:

properties.lastname

Companies

This is a sample response:

{

   "properties":{

      "createdate":"2020-10-26T20:24:31.285Z",

      "hs_lastmodifieddate":"2020-10-26T20:24:45.565Z",

      "hs_object_id":"4714056044",

      "name":"Sample Company",

      "phone":"1155551001"

   }

}

Therefore, use the following path to get the name for the first returned account:

properties.name

Custom Query Format

Using the custom query, you can search in any field using the built-in Hubspot search capabilities. For example, you can set the “Lookup Input Parameter” to the following expression in order to search for a specific first name:

{ "filterGroups":[ { "filters":[ { "propertyName": "firstname", "operator": "EQ", "value": "John" } ] } ] }

Nutshell

People

This is a sample response:

{

   "result":{

      "id":7,

      "entityType":"Contacts",

      "rev":"11",

      "modifiedTime":"2018-04-26T14:05:02+0000",

      "createdTime":"2018-04-26T13:47:27+0000",

      "name":{

         "givenName":"John",

         "familyName":"Doe",

         "salutation":"",

         "displayName":"John Doe"

      },

      "htmlUrl":"https:\/\/app.nutshell.com\/person\/7-john-doe",

      "creator":{

         "stub":true,

         "id":1,

         "rev":"2",

         "entityType":"Users",

         "modifiedTime":"2018-04-26T13:44:09+0000",

         "createdTime":"2018-04-26T13:43:23+0000",

         "name":"Agent name",

         "emails":[

            "[email protected]"

         ],

         "isEnabled":true,

         "isAdministrator":true

      },

      "owner":{

         "stub":true,

         "id":1,

         "rev":"2",

         "entityType":"Users",

         "modifiedTime":"2018-04-26T13:44:09+0000",

         "createdTime":"2018-04-26T13:43:23+0000",

         "name":"Agent name",

         "emails":[

            "[email protected]"

         ],

         "isEnabled":true,

         "isAdministrator":true

      },

      "leads":[

         {

            "stub":true,

            "id":1003,

            "rev":"4",

            "entityType":"Leads",

            "modifiedTime":"2018-04-26T13:47:32+0000",

            "createdTime":"2018-04-26T13:47:31+0000",

            "name":"Lead\u20131000",

            "description":"John Doe",

            "status":0,

            "completion":33,

            "value":null,

            "primaryAccountName":"Sample Company",

            "primaryContactName":"John Doe",

            "isOverdue":false,

            "lastContactedDate":null

         }

      ],

      "accounts":[

         {

            "stub":true,

            "id":7,

            "rev":"13",

            "entityType":"Accounts",

            "modifiedTime":"2018-04-26T13:52:09+0000",

            "createdTime":"2018-04-26T13:47:16+0000",

            "name":"Sample Company",

            "regions":[

            ],

            "relationship":null

         }

      ],

      "notes":[

      ],

      "lastContactedDate":null,

      "contactedCount":0,

      "tags":[

      ],

      "description":null,

      "address":{

         "address":{

            "name":null,

            "location":{

               "longitude":-96.796855800000003000604920089244842529296875,

               "latitude":32.7762718999999975721948430873453617095947265625

            },

            "locationAccuracy":"4",

            "address_1":"",

            "address_2":null,

            "address_3":null,

            "city":"Dallas",

            "state":"TX",

            "postalCode":"",

            "country":"US",

            "timezone":"America\/Chicago"

         },

         "--primary":{

            "name":null,

            "location":{

               "longitude":-96.796855800000003000604920089244842529296875,

               "latitude":32.7762718999999975721948430873453617095947265625

            },

            "locationAccuracy":"4",

            "address_1":"",

            "address_2":null,

            "address_3":null,

            "city":"Dallas",

            "state":"TX",

            "postalCode":"",

            "country":"US",

            "timezone":"America\/Chicago"

         }

      },

      "email":{

         "1":"[email protected]",

         "--primary":"[email protected]"

      },

      "phone":{

         "1":{

            "countryCode":"1",

            "number":"1155551001",

            "extension":null,

            "numberFormatted":"11 5555-1001",

            "E164":"+11155551001"

         },

         "mobile":{

            "countryCode":"1",

            "number":"1155551002",

            "extension":null,

            "numberFormatted":"11 5555-1002",

            "E164":"+11155551002"

         },

         "work":{

            "countryCode":"1",

            "number":"1155551003",

            "extension":null,

            "numberFormatted":"11 5555-1003",

            "E164":"+11155551003"

         },

         "home":{

            "countryCode":"1",

            "number":"1155551004",

            "extension":null,

            "numberFormatted":"11 5555-1004",

            "E164":"+11155551004"

         },

         "fax":{

            "countryCode":"1",

            "number":"1155551005",

            "extension":null,

            "numberFormatted":"11 5555-1005",

            "E164":"+11155551005"

         },

         "custompager":{

            "countryCode":"1",

            "number":"1155551006",

            "extension":null,

            "numberFormatted":"11 5555-1006",

            "E164":"+11155551006"

         },

         "--primary":{

            "countryCode":"1",

            "number":"1155551001",

            "extension":null,

            "numberFormatted":"11 5555-1001",

            "E164":"+11155551001"

         }

      }

   },

   "id":"apeye",

   "error":null,

   "jsonrpc":"2.0"

}

Therefore, use the following path to get the last name for the first returned contact:

result.name.familyName

Companies

This is a sample response:

{

   "result":{

      "id":7,

      "entityType":"Accounts",

      "rev":"13",

      "modifiedTime":"2018-04-26T13:52:09+0000",

      "createdTime":"2018-04-26T13:47:16+0000",

      "name":"Sample Company",

      "htmlUrl":"https:\/\/app.nutshell.com\/company\/7-sample-company",

      "accountType":{

         "id":1,

         "name":"Standard Account"

      },

      "industry":null,

      "creator":{

         "stub":true,

         "id":1,

         "rev":"2",

         "entityType":"Users",

         "modifiedTime":"2018-04-26T13:44:09+0000",

         "createdTime":"2018-04-26T13:43:23+0000",

         "name":"Sample Agent",

         "emails":[

            "[email protected]"

         ],

         "isEnabled":true,

         "isAdministrator":true

      },

      "owner":{

         "stub":true,

         "id":1,

         "rev":"2",

         "entityType":"Users",

         "modifiedTime":"2018-04-26T13:44:09+0000",

         "createdTime":"2018-04-26T13:43:23+0000",

         "name":"Sample Agent",

         "emails":[

            "[email protected]"

         ],

         "isEnabled":true,

         "isAdministrator":true

      },

      "tags":[

      ],

      "lastContactedDate":null,

      "contacts":[

         {

            "stub":true,

            "id":7,

            "rev":"11",

            "entityType":"Contacts",

            "modifiedTime":"2018-04-26T14:05:02+0000",

            "createdTime":"2018-04-26T13:47:27+0000",

            "name":"John Doe",

            "jobTitle":"Sample Company",

            "relationship":null

         }

      ],

      "description":null,

      "phone":{

         "1":{

            "countryCode":"1",

            "number":"1155550001",

            "extension":"",

            "numberFormatted":"11 5555-0001",

            "E164":"+11155550001"

         },

         "mobile":{

            "countryCode":"1",

            "number":"1155550002",

            "extension":null,

            "numberFormatted":"11 5555-0002",

            "E164":"+11155550002"

         },

         "work":{

            "countryCode":"1",

            "number":"1155550003",

            "extension":null,

            "numberFormatted":"11 5555-0003",

            "E164":"+11155550003"

         },

         "home":{

            "countryCode":"1",

            "number":"1155550004",

            "extension":null,

            "numberFormatted":"11 5555-0004",

            "E164":"+11155550004"

         },

         "fax":{

            "countryCode":"1",

            "number":"1155550005",

            "extension":null,

            "numberFormatted":"11 5555-0005",

            "E164":"+11155550005"

         },

         "custompager":{

            "countryCode":"1",

            "number":"1155550006",

            "extension":null,

            "numberFormatted":"11 5555-0006",

            "E164":"+11155550006"

         },

         "--primary":{

            "countryCode":"1",

            "number":"1155550001",

            "extension":"",

            "numberFormatted":"11 5555-0001",

            "E164":"+11155550001"

         }

      },

      "email":{

         "1":"[email protected]",

         "--primary":"[email protected]"

      },

      "notes":[

      ],

      "leads":[

         {

            "stub":true,

            "id":1003,

            "rev":"4",

            "entityType":"Leads",

            "modifiedTime":"2018-04-26T13:47:32+0000",

            "createdTime":"2018-04-26T13:47:31+0000",

            "name":"Lead\u20131000",

            "description":"John Doe",

            "status":0,

            "completion":33,

            "value":null,

            "primaryAccountName":"Sample Company",

            "primaryContactName":"John Doe",

            "isOverdue":false,

            "lastContactedDate":null

         }

      ]

   },

   "id":"apeye",

   "error":null,

   "jsonrpc":"2.0"

}

Therefore, use the following path to get the name for the first returned account:

result.name

Custom Query Format

Using the custom query, you can search in any field using the built-in Nutshell filtering capabilities. For example, you can set the “Lookup Input Parameter” to the following expression in order to search for an email address:

Salesforce

Contacts

This is a sample response:

{

   "attributes":{

      "type":"Contact",

      "url":"/services/data/v49.0/sobjects/Contact/0038000002Fry8JAAR"

   },

   "Id":"0038000002Fry8JAAR",

   "FirstName":"John",

   "LastName":"Doe",

   "AssistantPhone":"1155550005",

   "Fax":"1155550004",

   "HomePhone":"1155550001",

   "MobilePhone":"1155550002",

   "OtherPhone":"1155550003",

   "Phone":"1155550000",

   "Email":"[email protected]",

   "AccountId":"0018000001Xr0NQAAZ"

}

Therefore, use the following path to get the last name for the first returned contact:

LastName

Leads

This is a sample response:

{

   "attributes":{

      "type":"Lead",

      "url":"/services/data/v49.0/sobjects/Lead/00Q8000001pNvu4EAC"

   },

   "Id":"00Q8000001pNvu4EAC",

   "FirstName":"John",

   "LastName":"Doe",

   "Fax":"1155551002",

   "MobilePhone":"1155551001",

   "Phone":"1155551000",

   "Email":"[email protected]",

   "Company":"Sample Company"

}

Therefore, use the following path to get the last name for the first returned lead:

LastName

Accounts

This is a sample response:

{

   "attributes":{

      "type":"Account",

      "url":"/services/data/v49.0/sobjects/Account/0018000001Xr0NQAAZ"

   },

   "Id":"0018000001Xr0NQAAZ",

   "Name":"Sample Company",

   "Fax":"1155552001",

   "Phone":"1155552000"

}

Therefore, use the following path to get the name for the first returned account:

Name

Custom Query Format

Using the custom query, you can search in any field using the built-in Salesforce search capabilities. For example, you can set the “Lookup Input Parameter” to the following expression in order to search for an email address:

FIND {[email protected]} IN ALL FIELDS RETURNING Contact(Id,FirstName,LastName)

Vtiger

Contacts

This is a sample response:

{

    "success": true,

    "result": [

        {

            "id": "4x73",

            "account_id": "3x53",

            "phone": "1122334455",

            "mobile": "1122334456",

            "homephone": "1122334457",

            "otherphone": "1122334458",

            "fax": "1122334459",

            "firstname": "John",

            "lastname": "Doe",

            "email": "[email protected]"

        }

    ]

}

Therefore, use the following path to get the last name for the first returned contact:

result[0].lastname

Organizations

This is a sample response:

{

    "success": true,

    "result": [

        {

            "id": "3x259",

            "phone": "1122334455",

            "otherphone": "1122334456",

            "fax": "1122334457",

            "accountname": "Sample Company",

            "email1": "[email protected]",

            "email2": ""

        }

    ]

}

Therefore, use the following path to get the name for the first returned organization:

result[0].accountname

Custom Query Format

Using the custom query, you can search in any field using the built-in Vtiger query capabilities. For example, you can set the “Lookup Input Parameter” to the following expression in order to search for an email address:

SELECT * FROM Contacts WHERE email=[email protected]';

Zendesk

Contacts

This is a sample response:

{

   "user":{

      "id":363658618572,

      "url":"https://example.zendesk.com/api/v2/users/363658618572.json",

      "name":"John Doe",

      "email":"[email protected]",

      "created_at":"2018-04-24T18:04:14Z",

      "updated_at":"2018-04-24T18:06:21Z",

      "time_zone":"Brasilia",

      "phone":"1122334466",

      "shared_phone_number":false,

      "photo":null,

      "locale_id":1,

      "locale":"en-US",

      "organization_id":360051359892,

      "role":"end-user",

      "verified":true,

      "external_id":null,

      "tags":[

      ],

      "alias":"",

      "active":true,

      "shared":false,

      "shared_agent":false,

      "last_login_at":null,

      "two_factor_auth_enabled":false,

      "signature":null,

      "details":"",

      "notes":"",

      "role_type":null,

      "custom_role_id":null,

      "moderator":false,

      "ticket_restriction":"requested",

      "only_private_comments":false,

      "restricted_agent":true,

      "suspended":false,

      "chat_only":false,

      "default_group_id":null,

      "user_fields":{

      }

   }

}

Therefore, use the following path to get the name for the first returned contact:

users[0].name

Custom Query Format

Using the custom query, you can search in any field using the built-in Zendesk query capabilities. For example, you can set the “Lookup Input Parameter” to the following expression in order to search for an email address:

role:administrator email:[email protected]

Zoho

Contacts

This is a sample response:

{

    "data": [

        {

            "First_Name": "John",

            "Home_Phone": null,

            "Asst_Phone": null,

            "Email": null,

            "Last_Name": "Doe",

            "Phone": "1155550001",

            "Other_Phone": null,

            "Account_Name": {

                "name": "Sample Company",

                "id": "76741000000221015"

            },

            "id": "76741000000221021",

            "Fax": null,

            "Mobile": null

        }

    ],

    "info": {

        "per_page": 200,

        "count": 1,

        "page": 1,

        "more_records": false

    }

}

Therefore, use the following path to get the last name for the first returned contact:

data[0].Last_Name

Leads

This is a sample response:

{

    "data": [

        {

            "Company": "Sample Company",

            "First_Name": "John",

            "Email": null,

            "Last_Name": "Doe",

            "Phone": "1122335501",

            "id": "76741000000077534",

            "Fax": "1122335500",

            "Mobile": "1122335502"

        }

    ],

    "info": {

        "per_page": 200,

        "count": 1,

        "page": 1,

        "more_records": false

    }

}

Therefore, use the following path to get the last name for the first returned lead:

data[0].Last_Name

Accounts

This is a sample response:

{

    "data": [

        {

            "Phone": "1122334455",

            "Account_Name": "Sample Company",

            "id": "76741000000221015",

            "Fax": null

        }

    ],

    "info": {

        "per_page": 200,

        "count": 1,

        "page": 1,

        "more_records": false

    }

}

Therefore, use the following path to get the name for the first returned account:

data[0].Account_Name

Custom Query Format

Using the custom query, you can search in any field using the built-in Zoho search capabilities. For example, you can set the “Lookup Input Parameter” to the following expression in order to search for an email address:

Email:equals:[email protected]

See Also

Last Updated
This document was last updated on 3rd May 2022
https://www.3cx.com/docs/cfd-crm-lookup/