This article provides information on how to build the Pega Sales Automation Zoom embedded app when using the Traditional UI architecture.
If you use the Constellation architecture, see Building the Pega Sales Automation Zoom app (Constellation).
Henceforth in the article, the Pega Sales Automation Zoom embedded app is referred to as the Zoom embedded app, or just embedded app.
Prerequisites
- Create the Zoom integration OAuth app in Zoom App Marketplace.
- Configure and connect the Zoom and ZoomQueryParameter authorization profiles.
Creating the Zoom embedded app
- Sign in to Zoom App Marketplace.
- From the list in the upper-right corner, select Develop > Build Legacy App.
- In the new window, click the Create button for Zoom Apps.
- Enter a name for the Zoom app.
Note: Do not list the app on Zoom App Marketplace. - Click Create.
- Enter the required details for the app in the App Credentials tab.
- In the Home URL field, enter the login URL from the authentication service rule MeetingAppZoomService.
You can find this rule in Dev Studio, under Records > SysAdmin > Authentication Service. - Copy the Client ID value and save it for later use.
- Copy the Client Secret value and save it for later use.
Note: If the value does not exist, generate it by clicking Regenerate. - In the Redirect URL for OAuth field, enter the redirect URL from the authentication profile rule Zoom.
You can find this rule in Dev Studio, under Records > Security > Authentication Profile. - In the OAuth Allow field, enter any URLs that you want the OAuth redirect to access.
- In the Domain Allow field, enter any domains that your application will use.
- In the Home URL field, enter the login URL from the authentication service rule MeetingAppZoomService.
- On the Information tab, enter the appropriate values.
Note: The Company Name and Developer Contact Information (Name and Email) are required fields. - On the Feature tab, perform the following actions:
- Select the Meetings checkbox.
This action makes the app available in meetings. - Copy the secret token and save it for later use.
- Create an event subscription:
- Under General Features, enable the Event Subscripts feature.
- Click Add Event Subscription.
- Enter a name for the subscription.
- In the Event notification endpoint URL field, enter the service endpoint URL from the REST service ZoomEvents.
Note: You can find this service in Dev Studio, under Records > Integration-Services > Service REST. - Validate the URL:
- Log in to Pega Sales Automation as an administrator.
- Update the service access group to your application's administrator access group for the MeetingAppEvents service package.
Note: You can find this service in Dev Studio, under Records > Integration-Resources > Service Package. - In the user portal navigation pane, click Administration.
- Click SA – Meeting Plugin.
- In Zoom plugin client id field, enter the client id value that you copied in step 6.2 above.
- In the Zoom plugin client secret field, enter the client secret value that you copied in step 6.3 above.
- In the Zoom plugin secret token field, enter the value that you copied in step 8.2 above.
- In the Zoom plugin allowed domains field, enter a comma-separated list of the values that you entered in the Domain Allow field in step 6.6 above.
Note: Every time you add an entry to the allowed domains list in step 6.6, you must also update the Zoom plugin allowed domains field with the new value. - Click Save.
- After saving all the fields in Pega Sales Automation, switch back to Zoom Marketplace and then click Validate so that Zoom marks the endpoint url as validated.
- Select the following Meeting events to subscribe to:
- Start Meeting
- End Meeting
- Participant joined meeting before host
- Participant was waiting for host to join
- Participant/Host joined meeting
- Participant/Host left meeting
- Meeting has been created
- In the Zoom SDK client field, add the following APIs by using the Add button:
- getSupportedJsApis
- openUrl
- getRunningContext
- getMeetingContext
- getMeetingParticipants
- getUserContext
- getMeetingJoinUrl
- getMeetingUUID
- expandApp
- Ensure the following default values for the settings that are displayed below the Zoom SDK Client section:
- Guest mode: Off
- In-client OAuth: On
- Collaboration mode: Off
- Mobile Client: Off
- Select the Meetings checkbox.
- On the Scopes tab, add the following scopes by using the button, and enter a brief description for each scope:
- Meeting:
- View your meetings
- View and manage your meetings
- User:
- View your user information
- View and manage your user information
- View user info
- Meeting:
- On the Activation tab, click the Copy link to share the URL with other users in the Zoom account.
Enabling the Zoom embedded app
- In Dev Studio, configure the requestor type:
- In Dev Studio, click Records > SysAdmin > Requestor Type, and find the BROWSER requestor type for your system.
- Add an entry to the Access Group Name field by clicking the icon.
- Enter your application’s unauthenticated access group.
- Default the newly entered access group by selecting the radio button associated with it.
- Save the rule.
- Search for the MeetingAppZoomService authentication service rule.
You can also navigate to this rule from Records > SysAdmin > Authentication Service. - Select the Enable this authentication service checkbox.
- Set up each sales representative to use the Zoom embedded app:
- Add the Zoom embedded app by opening a new browser tab and pasting the URL copied from step 10 of Creating the Zoom embedded app above.
- Click the Allow this app to use my shared access permissions checkbox, and then click Allow.
Note: After you perform this step, the browser tab will be blank. This is expected behavior. - Log in to the Zoom app.
- Open the Zoom app settings by clicking the icon.
- On the Zoom Apps tab, select the Keep meeting apps open for me checkbox.
- Optional: If you want your app to open by default when a meeting starts, select the checkbox for your app in the On meeting start section.
Additional configuration for Mac users
- Update your application rule’s definition:
- In Dev Studio, click Application name > Definition, and open the application rule.
- Click the Security tab.
- In the Content security section, ensure that the policy name is
pxDefaultAllowAll
. - Ensure that the Mode radio button is set to
Reject and report
.
- Update the http/responseHeader DSS setting:
- In Dev Studio, click Records > SysAdmin > Dynamic System Settings.
- Filter the DSS setting http/responseHeaders for the owning ruleset Pega-RulesEngine.
- Update the DSS value to the following:
{"X-Content-Type-Options":"nosniff","X-XSS-Protection":"1","Referrer-Policy":"no-referrer","Strict-Transport-Security":"max-age=31536000"}
Extending the Zoom embedded app
When the Zoom embedded app runs, Pega Sales Automation sees that the requests are coming in from a specific URL. This URL is the Zoom servlet url. The Zoom servlet url is mapped to the MeetingAppZoomService authentication rule. The MeetingAppZoomService authentication rule has a pre-activity, MeetingAppZoomPreAuth, which creates an editable data page, D_MeetingAppClipboard. This data page has a property called MeetingAppRequest. This property holds the value Zoom
. Based on this value, Pega Sales Automation can identify whether the request is coming from Zoom embedded app or from desktop, mobile, or Outlook. Pega Sales Automation then builds the D_crmAppExtPage data page, which plays a crucial role in the Pega Sales Automation application.
The D_crmAppExtPage creates four additional properties:
- SFAClientType
- MeetingAppType
- UseMeetingAppMain
- UseMeetingAppSide
The SFAClientType property determines whether the sales rep is using desktop, Outlook, or, in this case, MeetingApp. This is the property that Pega Sales Automation uses to circumstance rules.
The MeetingAppType property specifies the type of MeetingApp, either Zoom
or Webex
.
The UseMeetingAppMain and UseMeetingAppSide properties determine where the app displays. If the UseMeetingAppMain property is set to true
, the app displays in the main panel, on the Apps tab of the Zoom app. If the UseMeetingAppSide property is set to true
, the app displays in the side panel of the Zoom meeting.
Zoom events
With the Zoom embedded app running, every time something happens in Zoom, a notification, called a Webhook, is sent to the embedded app, and the embedded app sends it to the endpoint URL. For example, when a participant joins, the embedded app sends a participant.joins event to Pega Sales Automation.
Pega Sales Automation includes a REST service called MeetingAppEvents, which calls an activity called ProcessEvents. For Zoom, this activity tries to match the event, and then calls the right activity to run to handle the event.
For the meeting.started event, the ProcessEvents activity creates an appointment if it does not exist, and creates an instance of the meetinginfo class to save the meeting with the New status. For participants joinin and participants left events, it updates the meetingparticipant table with the corresponding status. For the meeting.end event, the ProcessEvents activity updates the meetinginfo event with the Resolved status. It then loops through all the participants in the meeting and updates their status as left in the meetingparticipant table.
After an event is processed, Pega Sales Automation sends a notification to the UI to refresh changes by using the pub-sub architecture through the MeetingApp notification channel. You can find this channel in Dev Studio, under Configure > User Interface > Notification channels.
MeetingApp component
The Zoom meeting app is its own Pega application component called MeetingApp. You can place this component in any application, under the Component section. Because of being its own component, the Zoom meeting app is not tied exclusively to Pega Sales Automation. You can make it available in Pega Customer Service or any other customer application. The Zoom meeting app or the MeetingApp app's class structure is under the base class PegaFW-. It is placed under this class so that these rules are available to any framework due to the generic class structure, and you can add Zoom to any application in the future.
In the PegaFW- class, Zoom has two class structures through the subclass MeetingApp, which is present under the PegaFW-Int- and PegaFW-Data- class. The MeetingApp subclass groups the functionality for all the meeting apps such as Zoom, WebEx, and Microsoft Teams into one central place. Zoom has a subclass of its own under this subclass.
The PegaFW-Int-MeetingApp class handles the integration from Pega to any external system that Pega needs to interact with. It has all the class structure that is required to handle the JSON data model for the events that are exchanged between Pega Sales Automation and external systems.
The PegaFW-Data-MeetingApp class handles the meeting functionality for any meeting app that Pega supports. It is used to track the meeting object, PegaFW-Data-MeetingApp-MeetingInfo, and the participants list for the meeting, PegaFW-Data-MeetingApp-Participants.
The rules used for the MeetingApp component are included in the PegaFW-MeetingApp ruleset. This ruleset is generic and might not do much until you specialize it to your application. Therefore, for any specific functionality that you want to add to the Sales Automation application built with Constellation, the generic rules are saved into the PegaSA-DataTier or PegaSA-CaseTier rulesets and are specialized. For example, if you want to add a data page, D_GetAttendeesNotYetJoined, save it to the PegaSA-DataTier ruleset, and update the class to be Common-LDM-Entity-Contact (because this is the class that represents a person), then you must specialize the data transform as well to indicate how to get the attendees information into your application. For example, in Pega Sales Automation, the system would get the attendees information from the class associated with appointments.
Circumstancing
When the user signs in by using the Zoom embedded app, Pega Sales Automation displays the Zoom-specific user portal because of a circumstanced template that is based on the value MeetingApp. All Zoom embedded app rules that render after the launch of the user portal are also validated by using the same circumstance condition. If a rule does not match, the system uses the mobile version of the rule. If a mobile version does not exist, it uses the mobile-responsive version of the rule.
The main harness render is UserPortal, and it uses the header-content-footer structure. The header is called UserPortalHeader and displays the application name, the search icon, and the user avatar. The footer, called UserPortalFooter, is used for intelligence guidance and is only available if Voice AI is enabled. Finally, the content in the middle displays the attendees, meeting overview, and meeting Pulse. This content uses a section called UserPortal. If you follow the sections, they start with UserPortal > Home > HomeMain.
The HomeMain section renders either the MeetingAppMain or MeetingAppSide section, depending on where the Zoom embedded app is displayed. Most likely, the app displays in the side panel, so the system displays the MeetingAppSide section.
The MeetingAppSide section contains two sections. The first section is LoadMeetingAppInfo, which is a non-auto generate section that uses Zoom SDK to get the current meeting that you are in. The other section is MeetingAppSideContent, which points to the MeetingAppInfo section. The MeetingAppInfo section displays the Attendees, Overview, and Pulse tabs, which, together, form the main content of the embedded app.