---
schema_version: "1"
id: 96b07e9565d7059fe526a8d2b91b6b621ef8187d283ffae9b9d0faff7531f1fb
title: ActionableNotification Class
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_class_Messaging_ActionableNotification.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Messaging_ActionableNotification.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: f5251afc8de49a158f28bf8d69737fecd0f79f19754c0006b62bd08c9ac314a8
description: Contains information about an actionable custom notification.Return the unique action identifier (API name) for the custom notification action. Return the ID of the custom notification type used for the notification.Return the user ID of the recipient of the notification.Return the user ID of the sender of the notification.Return the record ID for the target record of the notification.Return the PageReference for the navigation target of the notification.
---
# ActionableNotification Class

Contains information about an actionable custom notification.

## Namespace

[Messaging](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_namespace_Messaging.htm "The Messaging namespace provides classes and methods for Salesforce notifications and email functionality.")

## Example

This example shows how to create an ActionableNotification object by using the [ActionableNotification.Builder](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Messaging_ActionableNotification_Builder.htm#apex_class_Messaging_ActionableNotification_Builder "Contains methods to build an instance of the Messaging.ActionableNotification class, which is used to configure actionable notifications for mobile devices.") class.

Messaging.ActionableNotification notification =
new Messaging.ActionableNotification.Builder()
.withNotificationTypeId('0MLXXXXXXXXXXXX4AC')
.withActionIdentifier('testAction')
.withRecipientId('005XXXXXXXXXXXX')
.withSenderId('005XXXXXXXXXXXX')
.withTargetId('500XXXXXXXXXXXXYAI')
.withTargetPageRef('/lightning/r/Case/500XXXXXXXXXXXXYAI/view')
.build();

- **[ActionableNotification Methods](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Messaging_ActionableNotification.htm#apex_Messaging_ActionableNotification_methods)**

## ActionableNotification Methods

The following are methods for ActionableNotification.

- **[getActionIdentifier()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Messaging_ActionableNotification.htm#apex_Messaging_ActionableNotification_getActionIdentifier)**  
    Return the unique action identifier (API name) for the custom notification action.
- **[getNotificationTypeId()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Messaging_ActionableNotification.htm#apex_Messaging_ActionableNotification_getNotificationTypeId)**  
    Return the ID of the custom notification type used for the notification.
- **[getRecipientId()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Messaging_ActionableNotification.htm#apex_Messaging_ActionableNotification_getRecipientId)**  
    Return the user ID of the recipient of the notification.
- **[getSenderId()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Messaging_ActionableNotification.htm#apex_Messaging_ActionableNotification_getSenderId)**  
    Return the user ID of the sender of the notification.
- **[getTargetId()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Messaging_ActionableNotification.htm#apex_Messaging_ActionableNotification_getTargetId)**  
    Return the record ID for the target record of the notification.
- **[getTargetPageRef()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Messaging_ActionableNotification.htm#apex_Messaging_ActionableNotification_getTargetPageRef)**  
    Return the PageReference for the navigation target of the notification.

### getActionIdentifier()

Return the unique action identifier (API name) for the custom notification action.

This actionIdentifier must belong to the action group associated with the custom notification.

#### Signature

public String getActionIdentifier()

#### Return Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

### getNotificationTypeId()

Return the ID of the custom notification type used for the notification.

#### Signature

public String getNotificationTypeId()

#### Return Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

### getRecipientId()

Return the user ID of the recipient of the notification.

#### Signature

public String getRecipientId()

#### Return Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

### getSenderId()

Return the user ID of the sender of the notification.

#### Signature

public String getSenderId()

#### Return Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

### getTargetId()

Return the record ID for the target record of the notification.

#### Signature

public String getTargetId()

#### Return Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

### getTargetPageRef()

Return the PageReference for the navigation target of the notification.

#### Signature

public String getTargetPageRef()

#### Return Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")