1How do I configure notifications for Sales?
Overview of Notifications for Sales
A notification is an alert for users, such as salespeople and managers, to notify them about an event on a business object, such as an account, and let them take necessary actions. Notifications appear in the global header in Notifications (the bell icon). When users click the bell icon, they're directed to the appropriate page in the application.
In a typical setup, the application sends notifications to users when there's some kind of update to a record. When you configure notifications functionality, you specify who receives the notifications and under what conditions. For example, the application could send notifications to users when:
- They're added to the account team.
- They become the owner of an account.
- An account they own has been deleted.
- A Sales object is assigned to an account.
You can configure notifications for several Sales objects, including accounts, contacts, leads, and opportunities. Sample Groovy scripts to configure the notifications are provided in this guide.
Depending on what you're setting up, notifications setup tasks might include:
- Enabling notifications for Sales
- Defining notification scripts for Sales
- Setting notification preferences for Sales
- Configuring push notifications
- Debugging Groovy prompts
Enable Notifications for Sales
You define and generate notifications in Application Composer. You create Groovy scripts using conditions that must be met for each notification.
Here's how you enable notifications:
- Sign in as a setup user.
- In the Setup and Maintenance go to the Sales offering and select the Sales Foundation functional area.
- Click the drop-down button in the Sales Foundation row, then click Change Feature Selection in the menu. The Edit Features: Sales Foundation page appears.
- Select the Enable checkbox for the notification-related features
you want to set up. This enables notifications for the Sales objects. Note: This opt-in is for your chosen channel or communication path, such as bell notifications, and not for specific objects.
- Click Done.
Overview of Setting Up Notification Scripts and Preferences
After you enable the notifications feature for Sales, you then configure the notifications.
Here are the high-level steps:
- Define notification prompts as Groovy scripts in Application Composer. The scripts
contain the conditions that must be met for each notification. Notifications are
sent when the defined conditions are met. For example, you can send a notification
when a sales object is assigned to an account.
For more information about defining notification prompts, see Define Notification Scripts for Sales.
- Configure notification preferences using the Notification Preferences page. For
example, configure the notification message using SmartText and specify the
notification recipient.
For more information about notification preferences, see Configure Delivery Preferences and Text for a Notification.
Define Notification Scripts for Sales
Here's how you define a Groovy script for a notification prompt:
- Ensure you're working in an active sandbox.
- Click .
- In the navigation tree, expand Standard Objects, expand the object you want, and then click Server Scripts. For example, .
- Click the Triggers tab on the Server Scripts page.
- Click the add icon.
- In the Create Trigger Object page, create the Groovy trigger:
- In the Trigger field, select the trigger type.
Oracle recommends that you use the trigger type After Changes Posted to Database. This trigger type lets you to stop potential issues if the Groovy script is accidentally written to run indefinitely. If the trigger type is set to Before Update to Database, with a bad script, you might receive errors.
If you're creating a new object, and you want to trigger a notification when the object is created, Oracle recommends that you use the trigger type Before Insert to Database. However, some Before trigger types don't have all attributes exposed yet, resulting in some fields being blank. To debug your triggers if you're not getting the expected results, follow the steps in Debug Your Groovy Scripts.
- Enter a name for the trigger.
- Enter the trigger Definition details. When you create a Groovy script, you need
the API names of the fields you're trying to access. Create your triggers based on
parent/child fields, with these steps:
- In the Trigger Definition section, click Show/Hide Expression Palette.
- Click the Fields tab.
- Select an Object.
- Click the Maximize Edit Script arrow. The fields for the selected object are displayed.
- Select the API you want, and click Insert.
- To close the expression palette, click the Restore Edit Script
arrow, and then click Show/Hide Expression
Palette.
The
isAttributeChanged()function works only for the Before trigger types. The workaround for the After trigger types involves retrieving the old value before the database is updated, then retrieving the new value after the update, and then comparing the two values to see whether the attribute is changed. However, this workaround works only for high-level attributes, such as CriticalFlag and Status, and not for the ViewRow attribute.
- In the Trigger field, select the trigger type.
- Add a Groovy script. For example, if you're defining the notification for accounts, add
the
Account Push notification receivedGroovy script. - Click Save and Close.
- Navigate to the Notification Preferences page to configure your preferences for the notifications. See Configure Delivery Preferences and Text for a Notification for more information.
Configure Delivery Preferences and Text for a Notification
Here's how you specify the recipient types, delivery methods, and notification text for a specific trigger event:
-
Sign in as a user with the Sales Administrator job role.
-
In the Navigator, click .
-
In the Notification Preferences page, select an object from the Object list.
-
Click Add to add a blank row to the table.
-
Select Yes from the Enabled drop-down list
-
In the Override field, select Yes or No:
Override lets you specify whether a user has the ability to opt-out of the notification. If you set it to no, users can't opt out of the notification.
-
Select a Groovy notification prompt from the Triggering Event list.
-
Enter the notification name and description. The text you enter into the Notification Name field becomes the first part of the notification subject.
-
In the Recipients column, click the edit icon.
-
In the Configuration for Trigger Name window, select the notification delivery options for recipients and then click Done.
The application sends notifications to the specified recipients only if you select at least one delivery method, so be sure to select at least one method. In addition to getting communication through the selected delivery method, the recipient also receives a bell notification. Select the Bell Notifications option to enable the notifications that appear in the global header.
See the tables later in this topic for more information about the supplied recipients and delivery methods.
-
Click the New SmartText link, enter the notification text for the selected object, and then click Publish. SmartText also lets you add variables to the notification message.
-
To delete a notification preference, select the row and click Delete. This action deletes any associated notification text, too.
Note:If you delete a notification that's generated using a Groovy script, you can create a new notification using the same Groovy script, if it isn't used by another notification.
-
To modify an existing notification text, click the Update SmartText icon for the selected row.
-
Click Save.
Here are the predefined notification recipients:
|
Recipient |
Description |
|---|---|
|
Manager of Owner ID |
Manager of the notification owner |
|
Owner ID |
The one who sends or assigns the notification |
|
Resource team |
Additional resources added to an object in the Team subtab (Fusion Service only) Note:
Resource teams aren't applicable for Digital Sales. |
Here are the predefined delivery methods:
|
Delivery Method |
Description |
|---|---|
|
Bell Notifications |
Enables the bell notification for the web application |
|
Mobile Notifications |
Enables notifications on the mobile application |
|
Browser Notifications |
Enables notifications to users in the Omnichannel toolbar (Fusion Service only) |
|
Email Notifications |
Enables email notifications |
For more information about using SmartText, see topics on using smart texts in the Using Fusion Service guide.
In the sales applications, activities (tasks and appointments) use a different model to set up notifications. For more information on how to set up notifications for activities, see the "Set Up Activity Notifications" topic in the Activities chapter in the Implementing Sales guide.
Configure Push Notifications
With push notifications, users get notifications on their mobile devices. You define notifications in Application Composer with your unique, conditional logic. Both iOS and Android devices support push notifications.
For example, you can define alerts for upcoming milestones, reassignments, or escalations. Define the starting point to send a notification when you assign a high-severity request to a user.
After they sign in to the mobile application, users can view a list of their notifications by clicking the Notifications icon on the global header. They can dismiss notifications after viewing or dismiss them in bulk.
As you implement push notifications, you decide when to raise each notification. You specify whether to enable mobile push notification alerts, or to deliver the alerts only to the bell notifications on the desktop application.
Here's how you enable push notifications:
- Ensure you're working in an active sandbox.
- In the Setup and Maintenance go to the Sales offering and select the Sales Foundation functional area.
- Click the drop-down button in the Sales Foundation row.
- Click View Feature Selection in the menu. The Edit Features: Sales Foundation page appears.
- Select the Enable checkbox for the notification-related features
you want to set up. This enables notifications for the Sales objects. Note: This opt-in is for your chosen channel or communication path, such as bell notifications, and not for specific objects.
- Select the Enable checkbox for Mobile Notifications.
- Publish the sandbox.