---
schema_version: "1"
id: a778f5b43eb70108a3a578b32705b9e4129547070f33e8fba062e220728f5924
title: Extensibility for TMF621 v5 Trouble Ticket Management API
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/industries-integrations/comms/guides/Extensibility/TMF621_extensibility.md
canonical_url: https://developer.salesforce.com/docs/industries/communications/guide/TMF621_extensibility.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 7ddb3eae75ad7d2fd3145ad7edfd69092981797b0ea92094e556f27c783d313d
products:
  - Communications Cloud TM Forum API
  - Industries Integrations
---
# Extensibility for TMF621 v5 Trouble Ticket Management API

For the TMF621 API, extensibility is enabled through Apex lifecycle hooks and customizable GraphQL queries, allowing customers to adjust request and response payloads without compromising TMF compliance.
Pre-hooks validate or reshape incoming requests, and post-hooks refine or filter responses across all operations such GET, POST, PATCH, and DELETE.

- Extend the main entity with additional fields
- Map a field from a different or related entity
- Customize WHERE clauses at the main entity level
- Customize WHERE clauses at the sub-resource level
- Apply sorting (ORDER BY) on main and sub-resource results

**important:** - For access methods, prerequisites, and using the API, see [TMF621 v5 Trouble Ticket Management API](https://developer.salesforce.com/docs/industries/communications/TMF621/TMF621v5.md).

## Assumptions

The customer or integrator implements the pre-hook and post-hook Apex classes and customizes the GraphQL queries based on the provided interfaces and hooks.

## Interfaces and Hooks

The following table lists interfaces and corresponding lifecycle hooks supported for customizing the TMF621 operations.

| Interface Name                 | Hooks Supported                                                                                                                     | Pre-processing Capabilities <div style="width:290px"></div>            | GraphQL / Payload Customization <div style="width:290px"></div>               | Post-processing Capabilities <div style="width:290px"></div> |
| ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------ |
| ITroubleTicketManagementGET    | `transformRequest`<br>`applyCustomValidations`<br>`customiseGraphQLQuery`<br>`handlePostOperation`                                  | Validate permissions, enforce access rules, apply business validations | Modify GraphQL query fields, filters, transformations                         | Refine or enrich API responses                               |
| ITroubleTicketManagementPOST   | `transformRequest`<br>`applyCustomValidations`<br>`customiseMutationPayload`<br>`handlePostOperation`                               | Validate creation input and business rules                             | Enrich creation payload with additional fields, metadata, or related entities | Adjust final POST response after persistence                 |
| ITroubleTicketManagementPATCH  | `transformRequest`<br>`applyCustomValidations`<br>`customiseMutationPayload`<br>`customiseGraphQLQuery`<br>`handlePostOperation`    | Validate update payloads, enforce conditional rules                    | Modify or enrich mutation payload before update                               | Refine response after patch operation                        |
| ITroubleTicketManagementDELETE | `transformRequest`<br>`applyCustomValidations`<br>`customiseMutationPayload`<br>`resolveUniqueIdentifiers`<br>`handlePostOperation` | Validate delete permissions, enforce dependency and integrity checks   | Add deletion metadata, apply soft-delete logic, archive records               | Perform cleanup, logging, or response adjustments            |
