/zohoWidget

Small Widget written in Javascript to integrate external API with Zoho CRM

Primary LanguageJavaScript

Zoho CRM & Widget Script

Description

Backend project, obviously not frontend ^_^

We had the need to show users, who work within the Potentials module, different options to choose from in a dynamic way, no need to force the user to refresh the webpage to see some new data. So, the best way to do this is obtaining the information by using GET and POST to an external API to Zoho. The user can select the data they need, send it to the external API, get the results and send them to Zoho to be processed.

And we try to imitate the zoho interface so that the user feels more comfortable. Sorry mobile users

Project Structure

├── app
│   ├── css
│   │   └── style.css
│   ├── js
│   │   ├── utilsCrm.js
│   │   ├── utils.js
│   │   ├── main.js
│   │   ├── crmuser.js
│   │   └── alerts.js
│   ├── translations
│   │   └── en.json
│   └── widget.html
├── dist
├── node_modules
└── server

Functions I used for this project

Deluge

deluge_function


Javascript

Register Listeners with EmbededApp

Subscribe to the EmbeddedApp onPageLoad event before initializing

Here we get the id of the potential.

Initializing the widget.

Invoke a Function

ZOHO.CRM.FUNCTIONS.execute

Name Type Description Mandatory
func_name String Function Name True
req_data Object Request Data True

Return type: promise


Add Notes to a record

ZOHO.CRM.API.addNotes

Name Type Description Mandatory
Entity String SysRefName of the module. True
RecordID Long RecordID to associate the notes. True
Title String Notes Title True
Content String Notes Content True

Return type: promise


Get list of all records in a module

ZOHO.CRM.API.getAllRecords

Name Type Description Mandatory
Entity String SysRefName of the module. True
Entitsort_order String To sort records. allowed values {asc or desc} False
Entitconverted String To get the list of converted records False
Entitapproved String To get the list of approved records False
Entitpage String To get the list of records from the respective pages False
Entitper_page String To get the list of records available per page False

Return type: promise


Reference

JS SDK from Zoho CRM

TODO

  • Add some description to deluge function.
  • Add some dummy example data