Question
Capgemini
IN
Last activity: 7 Jan 2022 8:15 EST
Toast Notification Implementation
Hi All,
Has anyone implemented Toast notification in Cosmos in Pega 8.5 version? I am not referring to the create case notification, but about showing toast notification during confirming tasks or other activities.
Is there any component which can be used for this - reference https://design.pega.com/components/toast/?search=label%20case
-
Likes (1)
Dat Thanh Diep -
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Updated: 7 Jan 2022 8:15 EST
Pegasystems Inc.
US
@Sudit Sengupta here is a detailed post with implementation on how to implement a toast to display short messages after a form submission. see https://collaborate.pega.com/discussion/how-generate-toast-when-processing-assignment-theme-cosmos
CIBC
CA
Hi Team,
I also have the same question. Do you know how to achieve this?
Best,
Dat
Capgemini
IN
Does anyone from the product team have any inputs in this regard?
Thanks in advance for any kind of inputs.
Pegasystems Inc.
US
@Sudit Sengupta the toast component shown on design.pega.com only applies to the Cosmos React implementation. If you build a Cosmos React app in 8.6, the toast will be called everytime you complete an assignment or attach a file. The Cosmos Theme implementation does not have all the components listed on design.pega.com.
note in the Cosmos Theme, a confirmation banner will be shown to the user to indicate that the assignments have been completed. The notification banner is different from the toast.
CIBC
CA
@RichardMarsot Thank you for your response.
Accepted Solution
Updated: 7 Jan 2022 8:15 EST
Pegasystems Inc.
US
@Sudit Sengupta here is a detailed post with implementation on how to implement a toast to display short messages after a form submission. see https://collaborate.pega.com/discussion/how-generate-toast-when-processing-assignment-theme-cosmos
-
Sudit Sengupta Emiliano Martinez-Rivera
Capgemini
IN
@RichardMarsot - Thanks a lot for this. Its really helpful and working in 8.5.
The confirmation banner is something we already use, but this toast component would really help to provide a modern user experience to end users.
A few additional questions:
- Is it possible to have more fine grained control over it in 8.6? e.g making the message configurable (depending upon the task) or not having it show up when navigating back in a screenflow?
- As you mentioned - "there is no easy way to detect that an error was reported", does it mean if we implement this in a UI which is a standalone component (not part of flow processing), there is no way to determine if the toast should show up depending upon some validations (which may be part of the screen the user is submitting)?
Thanks
Sudit
Pegasystems Inc.
US
toast and error/confirmation banners are 2 separate and independent component.
The toast component should only be used for short confirmation message. It is difficult to have more control over the component since it is not part of the case processing. The message is not configurable in this implementation but this could be achieved by setting some variables on the window object before clicking the submit button using a runscript action. In Cosmos React, the toast message is not configurable and is the same independently of the assignment processes.
previous or back button support for screenflow was not tested when I created this component. You could avoid displaying the toast by setting a variable on the window object to tell the toast component to avoid sending a toast on the next harness load.
For validation errors, you should use the standard error page handling provided OOB- the pyErrorSections is used to display any validation error. to confirm the confirmation message or display a specific confirmation screen - this document should provide more details
https://collaborate.pega.com/discussion/how-extend-confirm-screen-theme-cosmos
Capgemini
IN
@RichardMarsot - Thanks for the clarification. Regarding the error message, I meant, not displaying the toast when some validation errors show up. Let me try that out.
Thanks once again for the clarifications.
Regards
Sudit