Creating the WebEx plugin
- Sign into the Webex for Developers portal at https://developer.webex.com/.
- From the list on the upper-right corner, select My Webex Apps.
- In the new window, click Create a New App.
- Click Create Embedded App.
- In the New Embedded app window, do the following:
- Select Meeting, name the embedded app, and add a description.
- Upload or choose an existing icon for the app.
- Enter the Valid domains list with any domains that your application will use.
- Enter the start page and in-meeting page URL for your application.
You can use the Login URL that you can find in Dev Studio, under Records > SysAdmin > Authentication Services > MeetingAppWebExService. - Select the Side Panel layout preference.
- Click Add Embedded App.
- Click your profile icon on the upper-right corner of the page.
- Click My Webex Apps > Create a New App.
- Click Create an Integration, and configure the settings as follows:
- Default the This app will not use the mobile SDK field to no.
- Name the integration app, choose the app icon, and add a description.
- Add the redirect URL:
- In Dev Studio, click Records > Security > Authentication Profile > WebexAuthProfile.
- Copy the redirect URL endpoint.
- Select the following scopes for the plugin:
- meeting:schedules_read
- meeting:schedules_write
- meeting:participants_read
- meeting:participants_write
- meeting:admin_participants_read
- meeting:admin_schedule_read
- meeting:admin_schedule_write
- Click Add Integration.
Result: The system displays the client ID and client secret. - Log in to Pega Sales Automation as a user that has access to Dev Studio:
- Open the WebexAuthProfile authentication profile, and update the client ID and the client secret from step 5.
Note: If a Webex authentication profile already exists in your application, you must update the scopes on the WebexAuthProfile profile and in the existing integration app. - Add the Meeting:participants_read scope from the integration app to the profile.
- Open the WebexAuthProfile authentication profile, and update the client ID and the client secret from step 5.
- In the Webex developer portal, click your profile in the upper-right corner of the screen.
- Click My Webex Apps > Create a New App.
- Click Guest Issuer, and enter a name for the guest issuer.
- Copy the guest issuer ID and secret.
- Update relevant records:
- In Dev Studio, click Configure > Application > Inventory > Relevant Records.
- Update class name to Pega-Configuration-SAMe911b6a6b0b5a4493afcac2c55ba7af5b.
- Add the following two properties: (1) Type = Property (2) Record name = A6WebexPluginGuestIssuerSecret AND WebexPluginGuestIssuerId
- Log into the Pega Sales Automation user portal.
- Click Administration > SA Meeting Plugin.
- Enter the guest issuer ID and secret that you copied in step 12.
- In Dev Studio, click Configure > Integration > Connected Apps, and then click Connect and accept for WebexAuthProfile.
- On the Administration page in the Sales Automation user portal, click SA - Microsoft Integration, and then enable the A3. Webex Integration checkbox.
Webex Integration is enabled. - In Dev Studio, click Records > Data Model > Data Page > D_WebExCreateWebHooks.
- Run the data page to create the Meeting started, Meeting ended, Participant joined, and Participant left webhooks.
- Confirm a response code of 200.
Enabling the WebEx plugin
- Verify the requestor type:
- In Dev Studio, click Records > SysAdmin > Requestor Type.
- Find the BROWSER requestor type for your system
- In the Access Group Name field, add an entry by clicking the Add icon.
- Enter your application’s unauthenticated access group.
- Select the radio button next to the unauthenticated access group to default it.
- Log in to Dev Studio.
- Open the MeetingAppWebexService authentication service rule.
You can find this rule under Records > SysAdmin > Authentication Service. - Select the Enable this authentication service checkbox.
- Verify the values from the Webex plugin that are entered in the Pega Sales Automation configuration settings.
- Verify that the WebEx OAuth is configured:
- In Dev Studio, click Configure > Integration > Connected Apps.
- Open WebEx authentication profile rule.
- Check whether the client id and client secret match the client id and secret of the WebEx app.
- In the Endpoint configuration section, click Reset.
- Verify that the REST service is configured for WebEx:
- In Dev Studio, click Configure > Integration > Services > Service Definition.
- Find the MeetingAppEvents service package.
- Update the Service access group to your application’s service access group.
- Configure the access token:
- Open the D_GetWebexGuestAccessToken rule.
- Copy the rule into an open ruleset.
- Choose an access group that is appropriate for your application.
Extending the WebEx plugin for Sales Automation
When the WebEx plugin runs, Pega Sales Automation sees that the requests are coming from a specific URL. This URL is the WebEx servlet URL. The WebEx servlet URL is mapped to the MeetingAppWebExService authentication rule. The MeetingAppWebExService authentication rule has a preactivity, MeetingAppWebExPreAuth, which creates an editable data page, D_MeetingAppClipboard. D_This data page has a property called MeetingAppRequest. This property holds the value WebEx. Based on this value, Pega Sales Automation can identify whether the request is coming from the WebEx Plugin or from desktop, mobile, or Outlook. Pega Sales Automation then builds the D_crmAppExtPage data page, which is plays a crucial role in the Pega Sales Automation application.
The Pega Sales Automation application that calls the preauth activity creates four additional properties:
- SFAClientType
- MeetingAppType
- UseMeetingAppMain
- UseMeetingAppSide
Based on the underlying logic, the SFAClientType property stores a value of "Desktop", "Outlook", or "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.
WebEx events
With the WebEx plugin running, every time something happens in WebEx, a notification, called a Webhook, is sent to the plugin, and the plugin sends it to the endpoint URL. For example, when a participant joins, the plugin 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 WebEx, 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 join 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 using the pub-sub architecture through the MeetingApp notification channel. You can find this channel in Dev Studio, under Configure > User Interface > Notification channels.
Class structure
The WebEx class structure is under the base class PegaFW-. It is under this class because WebEx should not be exclusively tied to Pega Sales Automation. By putting the WebEx class structure under the PegaFW- class, you can add WebEx to any application in the future.
In the PegaFW- class, WebEx has two class structures that use the subclass MeetingApp, which is present under the PegaFW-Int- and PegaFW-Data- classes. The subclass MeetingApp groups the functionality for all meetings such as Zoom, WebEx, and Microsoft Teams into one central place. WebEx 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.
Circumstancing
When the user signs in by using the WebEx plugin, Pega Sales Automation displays the WebEx-specific user portal because of a circumstanced template that is based on the value MeetingApp. All WebEx plugin rules that render after the launch of the user portal are also validated by using the same circumstance condition.
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 renders the MeetingAppSide section.
The MeetingAppSide section contains two sections. The first section is LoadMeetingAppInfo, which is a non-auto generate section that uses WebEx 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 plugin.