---
schema_version: "1"
id: 8ade63e1ba3c3665272cc0ab3c1edc6e67534dfb8c5b7145e265c3f3cfa95035
title: Setting Up TMF Notifications - Example Configuration for TMF 622
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/industries-integrations/comms/guides/TMF_notification_use_case.md
canonical_url: https://developer.salesforce.com/docs/industries/communications/guide/TMF_notification_use_case.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: eb6b44c25cec7ed0d7b0c108c2862b7fc3309426b0c94579180c1a3f22c2819e
products:
  - Communications Cloud TM Forum API
  - Industries Integrations
---
# Setting Up TMF Notifications - Example Configuration for TMF 622

This topic provides details on End-to-End (E2E) setup for enabling real-time TMF notifications from Salesforce (Order object) to external systems through TMF622 standards using MuleSoft Direct Integration.

Use the provided configuration guidelines to activate notifications for other supported TMF APIs as needed.

## Deploying Mule Assets in Anypoint Platform (MuleSoft Direct)

1. Create a Connected App in Salesforce with refresh token permissions to obtain Consumer Key and Secret.

   **note:** The `client_id` and `client_secret` of the connected app are intended for use by the Mule application to either execute SOQL queries or perform inbound GET requests to retrieve data.

2. Accept Terms and Conditions for Communications Cloud TMF Integrations:

   - **Setup > Integration > MuleSoft > MuleSoft Direct**

3. Establish Connection between Salesforce and Anypoint using Anypoint credentials.

4. Click on Enable to deploy the TMF 622 asset `tmf622-product-ordering-management-v4-outbound-api` in Anypoint Platform.
5. Provide the integration deployment parameters that define where and how the application will be deployed. These are the fields you need to fill out under the [Enable Integration](https://help.salesforce.com/s/articleView?id=ind.enable_integration_assets.htm&type=5) step.

   | **Field Name**    | **Description / Example** <br> <div style="width:230px"></div>                                                                                       |
   | ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
   | Display Name      | A user-friendly name for the application in Anypoint Platform. <br>_Example_: `tmf622-product-ordering-api`                                          |
   | Application Name  | Application name is the actual name used to deploy application to the runtime manager. By default it has the same value as the Display Name you set. |
   | Business Group    | The name of the business group under which the application will be deployed in Anypoint Platform.                                                    |
   | Environment       | The environment within the business group (for example `dev`, `qa`, `prod`).                                                                         |
   | Deployment Target | The regional deployment target (for example `US`, `EU`, etc.) where the application should be hosted.                                                |

6. When deploying the TMF622 asset in the Anypoint Platform, you will need to enter the authentication and configuration properties required to establish a secure connection between Salesforce and the external system.
   | **Field Name** | **Description / Example** <br> <div style="width:230px"></div>|
   | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
   | Salesforce Consumer Key | The Consumer Key from the Connected App in Salesforce. |
   | Salesforce Consumer Secret | The Consumer Secret from the Connected App in Salesforce. |
   | Salesforce Username | The Salesforce username used to authenticate the connection. |
   | Salesforce Password | The password corresponding to the Salesforce username. |
   | Salesforce Hostname | For example, `MyCompany.my.salesforce.com` |
   | Target System Oauth Client ID | OAuth Client ID of the external system. |
   | Target System Oauth Client Secret | OAuth Client Secret of the external system. |
   | Target System Oauth Token Endpoint URL | The token_endpoint of the external OAuth 2.0 authorization server where the client sends requests to obtain tokens. |
   | Target System Notification Endpoint URL | The endpoint URL of the external system to which Outbound notifications will be sent. |
   | Target System Product Order Endpoint URL | The endpoint URL of the external system to which Product Order requests are sent. |

   After you enter and save these details, MuleSoft Direct deploys the selected TMF622 asset to the specified environment, and the status will be reflected under the App Instance tab.

7. Once the deployment of the TMF622 asset is successful, these key components will be automatically generated.

   | **Component**    | **Description / Example**                                                                                                                                                |
   | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
   | Application URL  | The public endpoint of the deployed Mule application. <br>_Example_: `https://demotmf622-sp7zgq.5sc6y6-2.usa-m2.cloudhub.io/`                                            |
   | Named Credential | A corresponding Named Credential in Salesforce for secure integration. <br>_Example_: `stagingtmf622_sp7zgq_5sc6y6_2_usa_e2_cloudhub_io_tmf622_product_ordering_managem` |

These resources are essential for establishing secure, authenticated communication between Salesforce and the deployed MuleSoft application. The Named Credential simplifies authentication from Salesforce when triggering API requests to the Mule endpoint.

8. After successful deployment, you can view the API specification to understand the available notification endpoints.

   - Navigate to the Anypoint Exchange to view the API specification and the endpoint details.
   - Locate the deployed asset, for example`tmf622-product-ordering-management-v4-outbound-api-spec`
   - Within the specification, you'll find these defined endpoints for TMF622 notifications:

   | **Notification Type**          | **Endpoint Path**                                         |
   | ------------------------------ | --------------------------------------------------------- |
   | Create Product Order           | `/api/notification/productOrderCreateEvent`               |
   | Update any Order Entity fields | `/api/notification/productOrderAttributeValueChangeEvent` |
   | Update Order Status Field      | `/api/notification/productOrderStateChangeEvent`          |

## Configuring Assets Based on Business Requirements

Once the TMF622 asset is deployed, you may need to tailor it to suit specific business scenarios or environment setups. Follow the steps below to customize and redeploy the application.

1. Download the Mule Asset

   - Navigate to Salesforce **Setup > Integrations > MuleSoft > MuleSoft Direct**.
   - From the list of available Assets, click on Download button for TMF 622.

2. Customize the Application

   - Customize the downloaded JAR file to suit your specific use cases. Common modifications include updating TMF data mappings or adjusting the authentication method for the downstream system.

| **Property**             | **Description**                                             |
| ------------------------ | ----------------------------------------------------------- |
| `namespace`              | Salesforce package namespace                                |
| `targetSystem`           | External system's base URL or host                          |
| `productOrderCreatePath` | Endpoint for handling product order creation notifications  |
| _(etc.)_                 | Add any additional properties as per your integration needs |

3. Rebuild and Upload the Application

   - Package the updated project back into a **JAR file**.
   - Go to **Anypoint Platform > Runtime Manager > Applications**, and re-upload the updated JAR.

## Configuring the TMF622 Notification Framework in Salesforce

This section explains how to enable and configure real-time notifications from Salesforce to external systems using the **TMF Notification Framework**, specifically for TMF622 events such as Order creation, attribute updates, and status changes.

1. Enable the TMF Notification Framework

- Navigate to **Setup > Communications Cloud > Services Setup**.
- Switch the toggle **“Enable TMF Notification”** to **ON**.

2. Add Remote Site Settings (If not configured earlier)

- Go to **Setup > Remote Site Settings**
- Add a new entry for the **MuleSoft endpoint URL** (from the asset deployment in Anypoint Platform). This is required for Salesforce to communicate securely with MuleSoft.

3. Create Integration Definitions

- Navigate to **Setup > Integration Definitions**
- Click **New**, and fill in the following:

| Field             | Value / Description                                                              |
| ----------------- | -------------------------------------------------------------------------------- |
| Type              | Standard                                                                         |
| Name              | For example, `TMF622CreateEvent`                                                 |
| Developer Name    | Auto-generated or custom                                                         |
| Standard Provider | `TMFNotificationCalloutIntegrationProvider`                                      |
| Named Credentials | Name of the Named Credential created during Mule asset deployment                |
| Path              | Corresponding API path (For example `/api/notification/productOrderCreateEvent`) |
| Timeout (ms)      | Recommended: up to `120000` (2 minutes)                                          |

- Save and Activate the definition.
- From the redirected URL, copy the `integrationProviderDefinitionId`parameter from the URL:

  ```
  /builder_industries_integrationconfiguration/integrationConfigurationWizard.app?integrationProviderDefinitionId=0z2XXXXXXXXXXX&...
  ```

Repeat the above steps for each supported TMF622 event (each uses a different path):

| **Event Type**                        | **API Path**                                              |
| ------------------------------------- | --------------------------------------------------------- |
| ProductOrderCreateEvent               | `/api/notification/productOrderCreateEvent`               |
| ProductOrderAttributeValueChangeEvent | `/api/notification/productOrderAttributeValueChangeEvent` |
| ProductOrderStatusChangeEvent         | `/api/notification/productOrderStateChangeEvent`          |

4. Create Object Integration Provider Definition Mapping Records.

   This step links Salesforce object changes to TMF notification endpoints. These mappings must be configured using the Tooling API (version ≥ v65.0), as there's currently no UI for this.

### Supported Salesforce Object: `Order` (maps to TMF622 `ProductOrder`)

a. Create Event Mapping

```http
POST /services/data/v65.0/tooling/sobjects/ObjIntegProviderDefMapping
Content-Type: application/json
```

```
{
  "ChangeEventType": "Create",
  "ObjectApiName": "Order",
  "DeveloperName": "tmf622OrderCreateEvent",
  "MasterLabel": "tmf622OrderCreateEvent",
  "IntegrationProviderDefId": "0z2XXXXXXX",
  "RelatedFieldName": "Id"
}
```

b. Update Event Mapping (Status Field – for State Change)

```
{
  "FieldApiName": "Status",
  "ChangeEventType": "Update",
  "ObjectApiName": "Order",
  "DeveloperName": "tmf622OrderStateChangeEvent",
  "MasterLabel": "tmf622OrderStateChangeEvent",
  "IntegrationProviderDefId": "0z2XXXXXXX",
  "RelatedFieldName": "Id"
}
```

c. Update Event Mapping (Other Attribute Fields)

For each additional field (For example `Description`) that should trigger notifications:

```json
{
  "FieldApiName": "Description",
  "ChangeEventType": "Update",
  "ObjectApiName": "Order",
  "DeveloperName": "tmf622OrderAttributeValueChangeEventDescriptionField",
  "MasterLabel": "tmf622OrderAttributeValueChangeEventDescriptionField",
  "IntegrationProviderDefId": "0z2XXXXXXX",
  "RelatedFieldName": "Id"
}
```

This other example triggers a notification upon the creation of an OrderItem:

```json
{
  "ChangeEventType": "Create",
  "ObjectApiName": "OrderItem",
  "DeveloperName": "tmf622OrderItemCreateEvent",
  "MasterLabel": "tmf622OrderItemCreateEvent",
  "IntegrationProviderDefId": "0z2LT0000000BJdYAM",
  "RelatedFieldName": "Order.OrderNumber"
}
```

**note:** The `DeveloperName` must be unique across your Salesforce org. Use a naming convention that reflects the object, event type, and field.

This setup ensures that when an Order is created or specific fields are updated, Salesforce sends change events to MuleSoft, which then generates standardized TMF622 outbound notifications for real-time communication with external systems.
