top of page
hand-businesswoman-touching-hand-artificial-intelligence-meaning-technology-connection-go-

How to Integrate Zoom with Salesforce

To Integrate Zoom with Salesforce from Salesforce to either access Zoom functionalities from Salesforce Org or to get the data from Zoom to Salesforce org.


In this Blog let's learn how to integrate Zoom to get the reports from zoom to Salesforce Org and create records in the Org using the same Data.


First and Foremost thing to start any Integration is about to understand the requirement, like what you want to achieve from it.

In this Blog Let's take the example of getting the Meeting Participants details of a meeting from Zoom.


Pre requisites to achieve this are:

  1. Zoom Account should be Pro and above.

  2. Zoom log in ID should be same as the Salesforce Org ID and Email.

Learn more about the Following:


1. Go to Zoom Link and Find the API Documentation and read the Documentation and Understand the document as we get most of the information from this Document.


2. Log into Zoom and go to reports and get the report you are looking to extract and analyze it like what are all the fields does it fetch and what are the fields which you are interested in.


3. Check In Salesforce and Zoom if they have any Inbuilt app that let you integrate and get the information you are looking for with out you having to set up any apps for the same.


4. If you think the App Provided by either Salesforce or Zoom works for you please have the app installed and follow the Instructions.


5. If you Find an in Zoom which you can use to connect to Salesforce. First Create a "Connected App" in Salesforce.

Go to Setup - App Manager - New Connected App - Fill in the Name for the Connected App - Email - Enable OAuth Settings - Provide Some Dummy Call back URL - Provide the OAuth Available scopes which lets you give the 3rd party app the access to the data in salesforce org(The Stricter the better).

Choose the rest of the options as required - SAVE.



Once you save It takes some time to create the app and You will be provided with the Consumer Key and Consumer Secret which you need to use it in the App which you create in Zoom.


6. Install the App which is Provided by Zoom from Zoom market Place and while configuring the App you need to Enter the Consumer Key and Secret Provided by the Salesforce in the above step and you need to mention your Salesforce Instance URL. Provide the "Access Scope" for Salesforce in to Zoom. Once the Installation is done Zoom Provides the Call back URL which you need to Update in the Salesforce Connected APP which you created. You will be able to access the Zoom data through this App in Salesforce.


7. If you Don't find any App that help you get the data you are looking for then you need to Connect to the 3rd Party App through API.


8. Get connect to Zoom API through Postman and pull the report from Zoom using Postman.



Let's Start the Integration



STEP 1:


Read the 3rd party APP API Document and get the basic details like the END Point URL, Authentication which we need to use for this API. In this Example as we are trying to integrate Zoom following is the API documentation with the required details




STEP 2:


Create an APP from Zoom Market Place specifying our Salesforce Instance URL and specifying the scope to get the Consumer Key and Secret from Zoom.

https://marketplace.zoom.us/


Choose the OAuth and create the App by following the instruction given.


STEP 3:


Create Named Credentials in Salesforce by first Creating Permission Sets, Auth Providers, External Credentials, Named Principal, Enabling External credentials for Named Principals, Named Credentials.



STEP 4:


We need to make HTTP Callout from Salesforce to Zoom to get the Data. As per the Winter 23 Release we can do the Callouts using Flows but due to restrictions choosing the option to make HTTP Call out through Apex.


Use Postman to test Zoom API connection and get the response and copy the JSON from the Response.



STEP 5:


Write Wrapper Class and Wrapper Test Class based on the Response JSON. To write the class you can copy the JSON from the Postman Response go to https://json2apex.herokuapp.com/ and paste the Raw JSON and click Create APEX.


This creates the Wrapper Class and its Test class.


STEP 6:


Log into the Salesforce Org and go to Developer Console to Create the Wrapper Class and It's test class which also Parses the Response.



STEP 7:

Create an APP in Salesforce with the Objects and Fields to Store the data which we receive from Zoom.





STEP 7:


Create a HTTP Callout class in Developer Console where we Provide the End Point URL which we need to Make the HTTP Call.

Map the Fields from the Response to the Fields of the Object in Salesforce data and Insert the data Into the Org.



STEP 8:


Handle Pagination. In Zoom the maximum Number of Records which they send per page in from the Range 30 to 300.

If you are handling data of more than 300 records you need to handle Pagination by Mentioning the Page_Size which determines how many records do you want Zoom to send in a Page and if there are more pages then Zoom will send the NextPage_Token through which we get next set of data.All this can be mentioned in the END Point URL.


request1.setEndpoint('callout:NamedSFtoZoomCred/report/meetings/82136964758/participants?page_size=300&next_page_token=' + nextpagetoken);


STEP 9:


Need to Change the Field Data Types. As the Log In Time and the Leave Time send from Zoom in Text Data Type which needs to be converted to the Date & Time Field in to Salesforce which will help us do the Calculations to get appropriate reports.


String loginvalue= Attendents.join_time;

DateTime logindateTimeValue = DateTime.valueOf(loginvalue.replace('T', ' ').substringBeforeLast('.').replace('Z', ''));

String logoutvalue= Attendents.leave_time;

DateTime logoutdateTimeValue = DateTime.valueOf(logoutvalue.replace('T', ' ').substringBeforeLast('.').replace('Z', ''));


STEP 10:


Make this HTTP Callout Class as Scheduled APEX to schedule it to run automatically to retrieve the data as per the requirements. To make it Scheduled need to add the following code. It makes the callout as Asynchronus


public with sharing class Zoomcalloutclass implements Schedulable{


public static void execute(SchedulableContext context) {

executeAsync();


STEP 11:


To make the class run Asynchronously the class needs to "Future Annotated". Only the HTTP Callout class with @Future Annotations can be scheduled Asynchronously. Add the following to make it Asynchronous.


@future(callout=true)


STEP 12:


Scheduled the Apex Class. Go to Setup - Apex Class - Schedule Apex - Give a name for this job- Frequency to run - When to run - Start Date n Time - End Date - SAVE.



STEP 13:


Check if the Job has been Scheduled.

Go to Setup-Scheduled Jobs -Will be able to view the Job you Scheduled.



189 views1 comment

1 Comment

Rated 0 out of 5 stars.
No ratings yet

Add a rating
sravani yerrabothu
sravani yerrabothu
Dec 10, 2023
Rated 5 out of 5 stars.

Explained in detailed way. Thanks Chandrika.

Like
bottom of page