Creating a custom action event

Custom action events let you receive email notifications when you create or update a record. They let you do this when no standard action events exist. You can do this in Sage People using Salesforce Flows.

Create a custom action event

  1. Select the Action Event Patterns tab then select a view showing the action event pattern you want.

  2. Select the Action Event Pattern name:

    Screenshot: Selecting an Action Event Pattern from a list view

    Sage People displays the Action Event Pattern Detail page:

    Screenshot: Action Event detail page

  3. In the Action Events section, select New:

    Sage People displays the Action Event page:

    Screenshot: New Action Event page

    This page enables you to define for each action event:

    • The trigger event.

    • The conditions to meet for the event to send.

    • Who is to receive it.

  4. Complete the Event field as follows: 

    • Select the Event picklist and choose Custom

    • Select the second picklist and choose ?

    • Sage People displays a new text field below the picklist

    • Enter a name for the event. The Flow uses this name

  5. Select the Email Template to use when sending the email. If you need a new email template for this action event, first create it, and then select it.

  6. Scroll to the Recipients section and select the recipients you want to notify.

  7. Select Save.

Example: Create a Flow for email notification when an HR request is approved

For more information about Flows, see the overview.

  1. From Platform Tools, select Process Automation then select Flows.

  2. Select New Flow.

    Sage People displays the New Flow dialog.

  3. Select Record-Triggered Flow and then select Create.

  4. On the Configure Start screen:

    1. Select Object and start typing the name of the object—in this example, HR Request. Select HR Request.

    2. For Configure Trigger, select A record is created or updated.

    3. For Set Entry Conditions, consider if you need an entry condition for the Flow. Then select Condition Requirements and choose the most appropriate option. Use the picklists, text area, and the Check Syntax button to enter a valid entry condition.

      For example, you can define only HR Requests with an Approval Date entered can enter the Flow. This screenshot shows this option: 

      Screenshot: Set Entry Conditions section with an entry condition formula for non-blank Approval Dates

      Copy
      Formula as shown in the screenshot
      ISNULL({!$Record.fHCM2__Approved_Date__c}) = false
    4. For When to Run the Flow for Updated Records, select Every time a record is updated and meets the condition requirements.

    5. For Optimize the Flow for: select Actions and Related Records.

  5. Select Done.

    Sage People displays the Flow Builder canvas.

  6. On the canvas, select + between the Start and End elements to add an element.

  7. Select Decision:

    Screenshot: Selecting Decision from the Add Element dialog

  8. On the New Decision dialog, enter a Label and an optional Description. The system completes the API Name based on the Label.

    For example: 

    Label: Is the HR Request approved? 

    Description: Determines if the HR Request is approved

  9. In the Outcomes section, enter a Label for Outcome Details. The system completes the Outcome API Name based on the Label.

    For example: Yes

  10. Complete the other details as follows: 

    1. For Condition Requirements to Execute Outcome, select All Conditions Are Met.

    2. Use the Resource, Operator, and Value fields to enter conditions. Use Add Condition to add more conditions if required.

      For example: 

      Resource Operator Value
      {!$Record.fHCM2__Approved_Date__c} Is Changed {!$GlobalConstant.True}
    3. For When to Execute Outcome, the system selects the option If the condition requirements are met if you use the Is Changed operator.

    Screenshot: Outcome details for a decision path

  11. On the sidebar, select Default Outcome.

  12. Change the Label of the default outcome to something more meaningful for this Flow, such as Not approved.

  13. Select Done.

  14. On the Flow Builder canvas, in the Yes decision branch, select + to add an element.

  15. Select Action.

  16. On the New Action dialog, select Action and start entering "custom":

    Screenshot: Selecting the Custom Action Event action

  17. Select Custom Action Event.

  18. Enter a Label and an optional Description for the action. The system automatically completes the API Name based on the Label.

    For example: 

    • Label: Custom HR Request action event

    • Description: Sends an email notification when an HR Request is approved

  19. Complete the fields in the Set Input Values section as follows: 

    Field What to enter
    eventName The name of the event you entered when you created the custom Action Event.
    objectId {!$Record.Id}
    Team Member ID {!$Record.fHCM2__Employment__r.fHCM2__Team_Member__r.Id}

    Leave other fields at default values:

    Screenshot: Entering input values for a Flow action

  20. Select Done.

  21. On the Flow Builder canvas, select Save to give the Flow a name and save it.

  22. Select Activate to make the Flow active. You can use the debug option for checking the Flow before you activate.