Skip to main content

         This documentation site is for previous versions. Visit our new documentation site for current releases.      

Events in web embed

Updated on October 21, 2022
Applicable to Cosmos React applications

The host page can add event handlers that execute and perform custom processing when specific supported events fire, which helps you better integrate Pega UI with the host environment.

Event listeners

To listen on an event in the web embed, you can define an event listener on the embedded HTML element using the addEventListener() method on the web embed.

For example:
let elEmbedding = document.getElementById("theEmbed");
elEmbedding.addEventListener("embedready", handleEmbedReady);


Occurs when assignment processing is complete. The embedprocessingend event fires only when case processing is complete, and not on each assignment screen or flow action transition.
Occurs before the system displays the UI of the embed.

You can use embedready to tell the host that the PCore infrastructure is ready, which means that the getEmbedData and setEmbedData methods can be used to adjust some displayed values. You can also use this event with the createCase action to get details about the current case and assignment IDs.

Indicates that the refresh token has expired and that the user needs to be presented with a login screen to continue the session.

If popupReauth is true, the embed displays a credential challenge screen for the specified authorization service. If popupReauth is set to false, the embedreauth event is fired.

Occurs when the system detects a Next or Previous assignment submission.
Occurs when the user clicks the Done button on a confirmation view.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best. is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us