Defining Event Flows
- Browser
- iPad
Prerequisites:
Event flows refer to the progression of statuses for an event. For example, a sample event flow would be:
- Requested
- Pending Approval
- Approved
- Executed
- Closed
Event flows do not have to be linear. For example, you can define if an event is rescheduled after it is approved, it must revert to the Pending Approval status.
Event flows work in conjunction with the page layout engine and configuration of event types. Each status in the event flow can be used to configure a different page layout that controls what data is visible and editable to someone interacting with the Event record.
Event Actions
Event Actions are used to change the status of an event. When the status changes a new page layout displays. An event action record contains a button name, a starting status, and a final status. When an Event action button is clicked (for example, Submit for Approval), the event action determines which status the event should move to. For advanced use cases, event actions also support country overrides and a ranking hierarchy.
Since the page layout engine allows definition of which buttons are visible on an event, Event Actions allow for granular event flows for different use cases. For example, you can configure a Submit for Approval button that is available to a rep to change an event from status “Requested” to status “Pending Approval”, and another one for a manager to change the status from “Pending Approval” to “Awaiting Compliance Review”.
Defining Event Actions
Event Actions are created in an Event Configuration set. They are applied for a specific event type, country, and time frame combination. See Configuring Event Types for more information about Event Configuration sets.
Fields included in the Event Action object are:
Field |
Instructions |
---|---|
Event Configuration |
|
Button Name |
|
Starting Status |
|
Ending Status |
|
Allowed Comments |
|
Country Override |
|
Custom Message Prompts
Events Management now supports displaying custom confirmation messages when a configured button is triggered. This provides admins with the ability to display important information to end users when a specific action is taken. The custom confirmation messages are translatable.
For example, Sarah Johns submits an approval request. After selecting the Submit 2nd Approval Request button, the “Are you sure you want to submit this for approval?” message displays.
Configuration
To use this feature, grant users FLS permissions to the Confirmation_Message_vod field on the EM_Event_Action_vod object and add it to the page layout.
The custom message is referenced in the Confirmation_Message_vod field on the EM_Event_Action_vod object. Administrators can assign the appropriate message for each button on an Event action. The Page Layout Organizer can be used to enter the desired confirmation message and translations. If a message is not assigned, a default message of “Are you sure?” automatically displays. This default text is controlled by the GENERAL_CONFIRMATION Veeva Message.
This message displays when selecting the corresponding event action.
Event Action Ranking
Event Actions follow a similar ranking algorithm to Event Layouts (see: Defining Event Flows). Less-specific configurations are ranked at the bottom, and the most specific are ranked at the top. Event Actions with a country override are always ranked above those without one.
Before any ranking, the following parameters must match between the Event and the Event Action:
- Event Type
- Country
- Start time of the event with configuration time frame
- Button Name
After matching on these parameters, the ranking is as follows. This comparison is done between the event properties and the Event Action records:
Rank |
Match criteria |
---|---|
1 |
Country Override, Starting Status of the Event Action |
2 |
Country Override (Starting Status of the Event Action is blank) |
3 |
Starting Status of the Event Action |
4 |
Starting Status of the Event Action is blank |
5 |
If Event Action is not found, or multiple applicable Event Actions are found, the button will not function. |
Example Event Actions data for the Submit button on an Event:
Assume this configuration set only includes US and Canada.
Button Name |
Starting Status |
Ending Status |
Country Override |
ID |
Usage notes: |
---|---|---|---|---|---|
Submit
|
Staging |
Complete |
US |
EA1 |
Only when clicking Submit on an event in the US with status Staging. |
Submit |
Approved |
Staging |
US |
EA2 |
Only when clicking Submit on an event in the US with status Approved |
Submit |
Staging |
Executed |
|
EA3 |
Used when clicking Submit on an event in any non-US country in the configuration set with status Staging. |
Submit |
Pending Approval |
Staging |
|
EA4 |
Used when clicking Submit on an event in any non-US country in the configuration set with status Pending Approval. |
Submit |
|
Submitted |
|
EA5 |
Used when clicking Submit on an event in Canada with status not equal to Staging or Pending Approval
Used when clicking Submit on an event in the US with status not equal to Staging or Approved |
Notes:
- You can define an Event Action with the same starting and ending status. In this case, the event will be saved and an Event History record is still created to record the action that took place.
- You can define custom statuses in the Status_vod field on the EM_Event_vod object to create complex event flows.
- When the status is changed, the record is saved with this new status. Any errors from triggers or validation rules are returned to the user.
Special Behaviors
Several out of the box buttons have special behaviors:
Button |
Special behavior |
---|---|
Submit_for_Approval_vod |
|
Cancel_vod |
|
Close_vod |
|
Reschedule_vod |
|
Unlock_vod |
|
Custom Actions
To define custom event statuses and action buttons:
- Define a custom status in the Status_vod field on the EM_Event_vod object. Custom statuses should not use the _vod suffix.
-
Define a custom button with the desired name and label. The button should be defined as a Detail Page Button that executes OnClick JavaScript.
The JavaScript is not executed when selecting the button.
- Add this button to the desired page layout using the Visible_Buttons_vod field on the Event_Layout_vod object
- Create an Event Action row for this button name to define what happens when clicking this button.
- Optional – In the Action_Type_vod picklist on the EM_Event_History_vod object, add a new picklist value with this button name and provide translations. If this step is skipped, the button name will still display in the Event History log, but will not be translated.