Welcome to theBuild Chrome RingCentral widgets extension for CRM tutorial! In this tutorial you will be guided through the process of building Chrome RingCentral widgets extension for CRM with ringcentral-embeddable-extension-factory. To get started, click the "Start Tutorial" button below.
Start TutorialIn this guided tutorial you will learn how to create Chrome RingCentral widgets extension for CRM. The guide is broken up into three sections:
When you are finished, you will be ready to create Chrome RingCentral widgets extension for CRMs.
Embbnux Ji has a tuturial: Building Chrome Extension Integrations with RingCentral Embeddable, with this tutorial, you could create Chrome extension for any site with RingCentral Embeddable, not just for CRM sites.
In this tutorial, we will show you the advanced features the extension could provide for CRM sites.
You need nodejs 8.10+/npm, recommend using nvm to install nodejs/npm, and do not support Windows OS.
Then let's create an extension project with our CLI tool: ringcentral-embeddable-extension-factory:
npx ringcentral-embeddable-extension-factory my-app
# make sure you set `https://*.insightly.com/*` as url, we will use insightly as target CRM site.
https://*.pipedrive.com/*
as url, since we will use pipedrive as target CRM site.Looks like this:
And there is a video to show this too.
Then, after the project folder is created, install the necessary prerequisites:
cd my-app
# install dependencies
npm i
# create local config file
cp config.sample.js config.js
# edit config.js, set `thirdPartyConfigs.serviceName` to `Pipedrive`
# let's build the extension
npm start
# now dist folder is ready for use as extension source
dist
as unpacked package.You can see that without any coding, currently we just add the ringcentral-embeddable Phone widgets, you call with it, but it is not interactive with CRM site yet, All those features listed in previous chapter need your coding efforts to make it work.
To make it easier, we already set common modules to reduce developer efforts, you could set proper selectors, methods to make all features to work:
src/content.js
to make all features to worksrc/manifest.json
and src/background.js
to do more customization work.In the following chapters, you will learn how exactly to make it work. This tutorial will take pipedrive.com as target CRM site, they have a modern single page app site.
Before continuing, please register an free account, login and add some contacts with proper email and real contact number.
It is pretty simple, let's import config from config.js
. we just need to find proper css selector.
And edit src/config.js
phoneNumberSelectors
to be like this:
// modify phone number text to click-to-call link
export const phoneNumberSelectors = [
///* example config
{
urlCheck: (href) => {
return /\/person\/\d+/.test(href)
},
selector: '[data-test="phone-label"]'
}
//*/
]
Then refresh extension in Chrome extension page, check in pipedrive.com's contact detail page.
And edit src/config.js
insertClickToCallButton
to be like this:
As you can see, pipedrive contact page just have all phone numbers info in dom, so we can just extract them from dom, since the code is a bit long, please check this link to compare the code:
Then refresh extension in Chrome extension page, check in pipedrive.com's contact detail page.
If you get a sense of how the config works, now it is time to try it yourself.
Edit src/config.js
hoverShowClickToCallButton
function to make this feature work.
Think about your solution and compare with source code
After the warn up, now it is time to try the third party features.
Read our third party document first.
If you want to try yourself, you could do it by edit src/config.js
's thirdPartyServiceConfig
and initThirdParty
function.
In next chapter we will talk about authorization and sync contacts to RingCentral widgets.
It is a common practice that getting user authorization before accessing user data.
Since CRM site are so different, there is no common practice for this.
In general, if you could access user data as logined user from browser, no special action needed.
You may need to check network requests to find out how to get contacts list:
So we can set proper method to get pipedrive's conatct list, check the source code compare to edit your code accordingly.
After finish editing, refresh extension in Chrome extension page, check in pipedrive.com's contacts page, click contacts panel of RingCentral widgets, click auth button and try to call some contacts.
Since contacts and authorization are done, we will leave you to finish the Syncing call log and showing contact activities features as a practice.
Further more you can edit src/manifest.json
and src/background.js
to do more customization work, such as filtered urls you do not want to show widgets etc.
That is all, thanks for reading!