Add Optional Notifications to an Email Flow

To let users choose whether to receive email notification, modify your email order notification flow.

This task assumes that you’ve created an email notification flow. See

  1. On the Element tab, drag an Action element to the canvas.

  2. Fill in the New Action form.

    1. Search all actions, and select your Apex action to make notifications optional.

    2. For Label and API Name, enter GetNotificationSetting.

    3. Turn on Set Input Values.

    4. For orderSummaryIds, enter {!OrderSummaryRecord.Id}.

    5. Click Done.

  3. On the Element tab, drag a Decision element to the canvas.

  4. Fill in the New Decision form.

    1. For Label and API Name, enter NotificationDecision.

    2. Fill in the Outcome Details.

      1. For Label and Outcome API Name, enter NotificationsEnabled.
      2. For when to execute the outcome, select All Conditions are Met.
      3. For Resource, enter the label and API name used for the Action element.
      4. For Operator, select Equals.
      5. For Value, select {!$GlobalConstant.True}.
  5. Click Done.

  6. Connect all your elements, and click Save.

  7. Activate your flow.

  8. Repeat these steps for all flows that send email notifications or in-app notifications.