TMF651 v4 Agreement Management - Outbound Notification

Use TMF651 Outbound Notification API for managing agreements, especially in the context of partnerships between partners. Outbound notifications are triggered for these events. Outbound notifications can be configured to be triggered for change events on the parent entity (Contract) as well as for relevant sub-resources, see Supported Sub-Resources for TMF Outbound Notifications for the list of supported sub-resources in scope.

  • /api/notification/agreementCreateEvent
  • /api/notification/agreementAttributeValueChangeEvent
  • /api/notification/agreementStateChangeEvent (status field)

The user must configure the notification framework to detect CDC events and invoke the relevant TMF Open API implementations that generate the event payloads and forward them to the target systems configured within the API.

note: This API has been tested with an external system using TMF-aligned customizations. It may not include all optional fields and may not work out-of-the-box with your system. Customizations will likely be required. We recommend a thorough evaluation to ensure it meets your specific needs.

Available In

This API is available in the managed package and Salesforce platform.

Prerequisites

  • MuleSoft License required: MuleSoft Direct for Communications Cloud (add-on for Communications Cloud) or MuleSoft Anypoint Base Subscription.
  • Communications cloud license required: Communications Cloud Growth
  • Platform license: Contract Management and Omnistudio
  • Required Addon: ContractManagementAddon, DocGenDesigner
  • Enable Salesforce Contracts on the org

Assumptions

  • The notification uses a fire-and-forget approach. Salesforce does not process or store the response in any objects. MuleSoft logs and tracks all received notifications.
  • In alignment with TMF v4 standards for event notifications, the system sends the same payload, which includes the full agreement resource and the supported related sub-resources, for all events.
  • Access to the target system is authenticated using the OAuth 2.0 Client Credentials grant type.
  • In case of failure when invoking the target system endpoint, the request is retried up to three times, with a two second interval between attempts.
  • TMF651 v4 Inbound API response may include optional fields. According to TMF specifications, if the outbound Event Notification payload contains unsupported optional parameters, the downstream system may reject it with a 4xx error. To avoid this, tailor the payload to include only the optional fields supported by the client.
  • Salesforce and MuleSoft do not have a centralized event hub configured by default. Customers are responsible for setting up their own event hub to manage subscribers. Outbound notifications are generated and sent directly to a single, client-defined target endpoint.

The following table summarizes the change events supported for the Contract entity, along with the required configurations to trigger them through the Notification Framework.

important: When configuring Object Integration Definitions, ensure you use the exact RelatedFieldName values provided in the table below.

TMF Resource Salesforce Entity Scenario <br> <div style="width:230px"></div> changeEventType Supported Notification Event Path <br> <div style="width:230px"></div> RelatedFieldName
Agreement Contract Creation of a Contract record Create /api/notification/agreementCreateEvent "RelatedFieldName":"Id"
Updates to attributes of Contract record Update /api/notification/agreementAttributeValueChangeEvent "RelatedFieldName":"Id"
Updates to the Contract.Status attribute Update /api/notification/agreementStateChangeEvent "RelatedFieldName":"Id"

Sample Outbound Notification Request

This is a sample payload sent to the target system endpoint for the event Type: AgreementCreateEvent.

note: The event notification payload is same for all three events (AgreementCreateEvent, AgreementAttributeValueChangeEvent, AgreementStateChangeEvent). The eventType value will differ between the three events.

{
  "id": "d35161e0-e2ec-11ef-8c9a-02bec51f016d",
  "eventId": "string",
  "eventTime": "2025-02-07T06:04:20.966Z",
  "eventType": "AgreementCreateEvent",
  "correlationId": "0001ade9-3f74-0b99-dbc4-42e73424b774-1",
  "timeOccurred": "2025-02-07T06:04:20.966Z",
  "event": {
    "agreement":{
    "id": "800xx000000bp41AAA",
    "href": "/connect/comms/agreementmanagement/v4/agreement/800xx000000bp41AAA",
    "name": "features",
    "agreementType": "SampleContractType",
    "description": "new statement",
    "documentNumber": "00000156",
    "status": "Draft",
    "@type": "Agreement",
    "completionDate": "Fri Oct 19 00:00:00 GMT 2018",
    "agreementPeriod": {
        "startDateTime": "Fri Apr 20 00:00:00 GMT 2018"
    },
    "engagedParty": [
        {
            "id": "001xx000003GYiBAAW",
            "href": "/services/data/v60.0/sobjects/Account/001xx000003GYiBAAW",
            "name": "Edge Communications",
            "role": "Customer - Direct",
            "referredType": "Account"
        }
    ],
    "associatedAgreement": [
        {
            "id": "800xx000000bnlNAAQ",
            "href": "/services/data/v60.0/sobjects/Contract/800xx000000bnlNAAQ",
            "name": "full contract 1",
            "referredType": "Parent Contract"
        }
    ],
    "agreementSpecification": {
        "id": "2dtxx0000000001AAA",
        "href": "/connect/comms/AGREEMENTMANAGEMENT/v4/AGREEMENT/2dtxx0000000001AAA",
        "name": "Test Document 2",
        "referredType": "Document Template"
    },
    "agreementItem": [
        {
            "productOffering": [
                {
                    "id": "01txx0000006i2SAAQ",
                    "href": "/services/data/v60.0/sobjects/Product2/01txx0000006i2SAAQ",
                    "name": "GenWatt Diesel 200kW",
                    "referredType": "ProductOffering"
                },
                {
                    "id": "01txx0000006i2iAAA",
                    "href": "/services/data/v60.0/sobjects/Product2/01txx0000006i2iAAA",
                    "name": "Installation: Industrial - Medium",
                    "referredType": "ProductOffering"
                }
            ],
            "termOrCondition": [
                {
                    "description": "condition 1",
                    "id": "1",
                    "validFor": {
                        "startDateTime": "Wed Apr 25 00:00:00 GMT 2018",
                        "endDateTime": "Tue Nov 20 00:00:00 GMT 2018"
                    }
                },
                {
                    "description": "condition 2",
                    "id": "2",
                    "validFor": {
                        "startDateTime": "Wed Apr 25 00:00:00 GMT 2018",
                        "endDateTime": "Tue Nov 20 00:00:00 GMT 2018"
                    }
                }
            ]
        }
    ]
}
  }
}

Outbound Event Notifications Field Mappings

TMF Field TMF Type Is it Mandatory ? Supported Mappings
id string No TRUE Mule correlation Id
eventId string No TRUE inputPayload.eventId
eventTime string No TRUE inputPayload.commitTimestamp as UTC
eventType string No TRUE "AgreementCreateEvent" or "AgreementAttributeValueChangeEvent" or "AgreementStateChangeEvent"
correlationId string No TRUE inputPayload.correlationId
timeOccurred string No TRUE inputPayload.commitTimestamp as UTC
event.agreement object Yes TRUE TMF651v4 Inbound response payload

Supported Sub-Resources for TMF Outbound Notifications

This section outlines the sub-resources within TMF651 for which outbound notifications can be configured for create, update, and delete operations.

note: - Refer to Assumptions section for essential configuration guidelines and design assumptions required to enable TMF outbound notifications on these sub-resources.

  • For each sub-resource listed below, use the RelatedFieldName specified in the table to configure the Object Integration Definition mappings. This ensures that the Salesforce Notification Framework triggers notifications accurately for the corresponding change events.

For each sub-resource listed below, use the RelatedFieldName specified in the table to configure the Object Integration Definition mappings. This ensures the Salesforce Notification Framework triggers notifications accurately for the corresponding change events.

TMF Sub-resource: AgreementItem.ProductOffering
Salesforce entity: Sales Contract Line

TMF Resource Salesforce Entity Scenario <br> <div style="width:230px"></div> changeEventType Supported Notification Event Path <br> <div style="width:230px"></div> RelatedFieldName
SalesContractLine SalesContractLine Addition of a SalesContractLine record to the parent Contract Create /api/notification/agreementAttributeValueChangeEvent "RelatedFieldName":"ContractId"
Deletion of a SalesContractLine record from the parent Contract Delete /api/notification/agreementAttributeValueChangeEvent "RelatedFieldName":"ContractId"
Updates to an existing SalesContractLine record Update /api/notification/agreementAttributeValueChangeEvent "RelatedFieldName":"ContractId"

Sample Notification Framework Payload Request

Below is a sample payload that is received from the Notification Framework when a new SalesContractLine record is added to the parent Contract.


[
{
  "entityId": "0sLLT0000000ACH2A2",
  "entityName": "SalesContractLine",
  "eventId": "000002a1-c17c-9a22-acd5-52c8240f7203_1",
  "commitTimestamp": 1750319406000,
  "commitNumber": 1750319406846877697,
  "correlationId": "000002a1-c17c-9a22-acd5-52c8240f7203",
  "changedFields": {
    "LastModifiedDate": "Thu Jun 19 07:50:06 GMT 2025",
    "Product2Id": "01tLT000006opyLYAQ",
    "CreatedById": "005LT000006GmRpYAK",
    "CreatedDate": "Thu Jun 19 07:50:06 GMT 2025",
    "ContractId": "800LT00000BAR5RYAX",
    "CurrencyIsoCode": "USD",
    "LastModifiedById": "005LT000006GmRpYAK",
    "Name": "test2Product"
  },
  "changeEventType": "Create",
  "enrichedFields": {
    "ContractId": "800LT00000BAR5RYAX"
  }
}
]

TMF Sub-resource: AgreementItem.TermOrCondition
Salesforce entity: Obligation

TMF Resource Salesforce Entity Scenario <br> <div style="width:230px"></div> changeEventType Supported Notification Event Path<br> <div style="width:230px"></div> RelatedFieldName
TermOrCondition Obligation Update to an existing Obligation linked to a Contract Update /api/notification/agreementAttributeValueChangeEvent "RelatedFieldName":"ReferenceObjectId"
Addition of a new Obligation to a Contract Create /api/notification/agreementAttributeValueChangeEvent "RelatedFieldName":"ReferenceObjectId"
Deletion of an Obligation from a Contract Delete /api/notification/agreementAttributeValueChangeEvent "RelatedFieldName":"ReferenceObjectId"

Sample Notification Framework Payload Request

Below is a sample payload that is received from the Notification Framework when an existing Obligation record is deleted.


[
     {
  "entityId": "0ZzLT00000001gr0AA",
  "entityName": "Obligation",
  "eventId": "00000690-691f-ccf0-d64e-7e934b648d6e_1",
  "commitTimestamp": 1750319450000,
  "commitNumber": 1750319450000384001,
  "correlationId": "00000690-691f-ccf0-d64e-7e934b648d6e",
  "changedFields": {},
  "changeEventType": "Delete",
  "enrichedFields": {
    "ReferenceObjectId": "800LT00000BAR5RYAX"
  }
}
]

TMF Sub-resource: AgreementSpecification.Attachment
Salesforce entity: ContractDocumentVersion

TMF Resource Salesforce Entity Scenario <br> <div style="width:230px"></div> changeEventType Supported Notification Event Path <br> <div style="width:230px"></div> RelatedFieldName
AgreementSpecification ContractDocumentVersion Creation of a new Contract Document Create /api/notification/agreementAttributeValueChangeEvent "RelatedFieldName":"ContractId"
Updates to an existing Document [example: ContractDocumentVersion.status] Update /api/notification/agreementAttributeValueChangeEvent "RelatedFieldName":"ContractId"
Deletion of a Contract Document Delete /api/notification/agreementAttributeValueChangeEvent "RelatedFieldName":"ContractId"

Sample Notification Framework Payload Request

Below is a sample payload that is received from the Notification Framework when an existing document is deleted from a contract.



[
     {
        "entityId":"003xx000003GavHAAS",
        "entityName":"ContractDocumentVersion",
        "eventId": "0001ade9-3f74-0b99-dbc4-42e73424b774-1",
        "enrichedFields": {"ContractId":"800LT000008uJcCYAU"}
        "commitTimestamp": 1712693965000,
        "commitNumber": 1082985383811,
        "correlationId":"0001ade9-3f74-0b99-dbc4-42e73424b77"
        "changeEventType" : "Delete",
        "changedFields":{}
    }
]