Defining Event Flows

  • Browser
  • iPad

Prerequisites:

Event Types

Defining Event Flows

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

  • Required
  • Lookup to the associated Event Configuration set

Button Name

  • The name of the button that initiates the action
  • Case sensitive

Starting Status

  • The starting Event status for which the Event Action is valid
  • If left blank, this Event Action is applicable to an event regardless of the event status
  • If blank, these Event Actions are ranked below Event Actions for the same button where the starting status is specified

Ending Status

  • Required
  • The resulting status from clicking the button defined in the Event Action
  • Note, this can be the same as the starting status if the button is not required to change the status

Allowed Comments

  • If this check box is selected, the user is allowed to enter comments when the Event Action is launched.

Country Override

  • Lookup to an Event Configuration Country record
  • Use this field to configure a specific page layout that only applies to a single country
  • If blank, the event layout record applies to all countries associated with the configuration set

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



OR

 

Used when clicking Submit on an event in the US with status not equal to Staging or Approved

Notes:

  1. 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.
  2. You can define custom statuses in the Status_vod field on the EM_Event_vod object to create complex event flows.
  3. 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

  • Always prompts the user to select the approver from the user table.
  • Adds the selected approver to the Event Team with the role of Approver_vod
  • Creates an Event History record that stores the name of the selected approver

Cancel_vod

  • Any estimated and committed expenses are released back into their associated budgets
  • Actual expenses remain as expenses against their budgets
  • Any unfinished tasks associated to the event will have the “Event Canceled” flag checked
  • If this event is the parent event in a series, all future children events will be cancelled as well. The user will receive a warning when canceling the event.
  • Note – any other button with an Event Action that changes the status to Canceled_vod will also behave in the same way

Close_vod

  • The event and all child records (excluding child events) are locked by trigger
  • The event status is changed to Closed_vod and the Lock_vod field is set to true
  • The event cannot be edited through the UI or through the API

    Any other button with an Event Action that changes the status to Closed_vod will also behave in the same way

Reschedule_vod

  • Opens a popup with start and end time selectors
  • The user cannot reschedule the event outside of a time frame defined by an event configuration set for that event type and country.
  • If the user changes the start time to a time range from a different event configuration set, the page layout may change.
  • If the event has associated child events with the same start date, the start date updates to match the parent. If the child event is before the parent event's new start date, but is after today, the start time does not update. The end date of child events updates to maintain the difference in days between the start and end date.

    The status of child events doe not update to match the parent event.

  • The user sees a warning if the new start time is later than the end date of any selected budget.

Unlock_vod

  • The unlock button is displayed if it is defined in the Visible_Buttons_vod field on the Event Layout record being loaded by the page layout engine, the current event status is Closed_vod, the user has edit privilege to the Lock_vod field, and there is an event action defined for how the status should change after clicking Unlock.
  • Selecting this button unchecks the Lock_vod field and changes the status as defined by the Event Action.

Custom Actions

To define custom event statuses and action buttons:

  1. Define a custom status in the Status_vod field on the EM_Event_vod object. Custom statuses should not use the _vod suffix.
  2. 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.

  3. Add this button to the desired page layout using the Visible_Buttons_vod field on the Event_Layout_vod object
  4. Create an Event Action row for this button name to define what happens when clicking this button.
  5. 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.