---
schema_version: "1"
id: f10cae84f64207c6334bf5b095225a9d065d9a91b6aa9bb3fe31cec65fe2296e
title: Extensibility for TMF622 v5 Product Ordering Management API
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/industries-integrations/comms/guides/Extensibility/TMF622/TMF622_extensibility.md
canonical_url: https://developer.salesforce.com/docs/industries/communications/guide/TMF622_extensibility.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: d47aba450ce0673cb51f816e0309965478cba692f312d379067438cd7d7445a2
products:
  - Communications Cloud TM Forum API
  - Industries Integrations
---
# Extensibility for TMF622 v5 Product Ordering Management API

For the TMF622 API, extensibility is enabled through Apex lifecycle hooks and, for GET, customizable GraphQL queries. You can adjust request and response payloads without compromising TMF compliance. Pre-hooks validate or reshape incoming requests, and post-hooks refine, filter, or (for GET) overwrite responses across GET, POST, PATCH, and DELETE.

You can perform the following operations.

- Extend the main entity with additional fields (GET GraphQL query)
- Resolve an alternate identifier to OrderNumber
- Apply custom business validations before persistence
- Customize the outbound service-call payload (POST and PATCH)
- Inject soft-delete fields on DELETE
- Apply sorting and filters on GET main and nested resources

**Important**

- For access methods, prerequisites, and using the API, see TMF622 v5 Product Ordering Management API.
- Annotate implementations with `@PermGuard('IndustriesComms.orgHasCommsTMFAPIAccess')`. Minimum API version is **264**.
- Exactly **one** Apex class may implement each interface per org. More than one active implementor throws `ImplementorDiscoveryException`.

## Assumptions

The customer or integrator implements the pre-hook and post-hook Apex classes and customizes GraphQL queries or service-call payloads based on the provided interfaces and hooks.

## Interfaces and Hooks

The following table lists interfaces and corresponding lifecycle hooks supported for customizing the TMF622 operations.

| Interface Name                                | Hooks Supported                                                                                                              | Pre-processing Capabilities                                                                  | GraphQL / Payload Customization                                                                                                                       | Post-processing Capabilities                                                                         |
| --------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| [IProductOrderGET](https://developer.salesforce.com/docs/industries/communications/guide/IProductOrderGET.md)       | `transformRequest`<br>`applyCustomValidations`<br>`customiseGraphQLQuery`<br>`handlePostOperation`                           | Resolve ids, stash context flags, register a custom sub-resource, apply business validations | Modify the primary GraphQL read query: fields, filters, orderBy, snippets                                                                             | Refine or overwrite the GET HTTP body (`payloadOverwritten`)                                         |
| [IProductOrderPOST](https://developer.salesforce.com/docs/industries/communications/guide/IProductOrderPOST.md)     | `transformRequest`<br>`configureDefaultValidations`<br>`applyCustomValidations`<br>`preServiceHook`<br>`handlePostOperation` | Change sub-flow via `productOrderItem[].action`, validate create / amend / renew / cancel    | Rewrite each pipeline step payload (`orderIngestion`, `initiateAmendment`, `initiateRenewal`, `initiateCancellation`, `activateOrder`, `submitOrder`) | Side effects only. Client body is GET re-fetch; return is discarded                                  |
| [IProductOrderPATCH](https://developer.salesforce.com/docs/industries/communications/guide/IProductOrderPATCH.md)   | `transformRequest`<br>`configureDefaultValidations`<br>`applyCustomValidations`<br>`preServiceHook`<br>`handlePostOperation` | Resolve OrderNumber, strip locked fields, validate updates                                   | Rewrite `placeSupplemental` payload (`relatedTransactionId`, `changeGraph`, `isDraft`)                                                                | Side effects only. Client body is GET re-fetch; return is discarded                                  |
| [IProductOrderDELETE](https://developer.salesforce.com/docs/industries/communications/guide/IProductOrderDELETE.md) | `transformRequest`<br>`applyCustomValidations`<br>`customiseMutationPayload`<br>`handlePostOperation`                        | Seed OrderNumber, veto delete (state, cascade, permission)                                   | Inject Status (and audit fields) on alias `softDeleteProductOrder`. **Required** — the base `OrderUpdate` is empty                                    | Side effects only (cascade cancel, platform events). HTTP body is always `null`; return is discarded |

**Notes**

- GET, POST, and PATCH are **opt-in**. If no implementor is registered, the default API still runs.
- DELETE is **interface-mandatory**. If no class implements `IProductOrderDELETE`, the handler returns HTTP **400** before ID resolution, validation, or GraphQL.
- `customiseGraphQLQuery` and `customiseMutationPayload` are **not invoked** for POST and PATCH (`constructGraphQL` / `constructMutationGraphQL` return null). Use `preServiceHook`.
- `customiseGraphQLQuery` is **not invoked** for DELETE. `configureDefaultValidations` is inert on GET and DELETE because the default spec is empty.

## See Also

- [IProductOrderGET Apex Interface](https://developer.salesforce.com/docs/industries/communications/guide/IProductOrderGET.md)
- [IProductOrderPOST Apex Interface](https://developer.salesforce.com/docs/industries/communications/guide/IProductOrderPOST.md)
- [IProductOrderPATCH Apex Interface](https://developer.salesforce.com/docs/industries/communications/guide/IProductOrderPATCH.md)
- [IProductOrderDELETE Apex Interface](https://developer.salesforce.com/docs/industries/communications/guide/IProductOrderDELETE.md)
