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 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 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 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 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