How to handle a situation where request property gets updated in a Connect Rest?

How to handle a situation where request property gets updated in a Connect Rest payload?Earlier the property used was Name now its CustomerFirstName ,and also can we use property qualifiers here?

Hello @TanyaS58

Yes, property qualifiers like pzExternalName work for both request and response payloads in Pega REST connectors to map Pega property names to external JSON fields. While officially documented for response mapping, they also allow request payloads to map Pega properties to external names.

Alternatively, If a direct mapping fails, you can use Data Transforms with @getPropertyValueFormPage to map the request data. Do check for the usage of this approach in the below post, of course its mentioned for response mapping though.

Hope this helps

Regards

JC

2 Likes

Yes, you can use a property qualifier, specifically pzExternalName, when the external JSON name differs from your internal Pega property name. Pega documentation says this qualifier is used to map JSON field names to Pega properties in REST integrations

https://community.pega.com/sites/pdn.pega.com/files/help_v85/procomhelpmain.htm#oxy_ex-1/platform-helpsystem/rule-/rule-connect-/rule-connect-rest/related.htm

https://community.pega.com/sites/pdn.pega.com/files/help_v74/procomhelpmain.htm#rule-/rule-connect-/rule-connect-rest/related.htm

So for example, you could keep an internal property like .Name or .CustomerFirstName, and use the qualifier so the external JSON field is emitted as CustomerFirstName.

The practical options are:

  • long-term option: rename/update the request mapping so your internal model matches the latest API contract
  • Flexible option: keep the internal Pega property as-is and use pzExternalName to map it to the new external field name
  • If the contract may vary by endpoint/version: build the payload in a data transform/JSON transform and control the field naming there

Please note that Property qualifiers are helpful for external name mapping, especially when JSON keys differ from Pega naming rules or contain special characters. But if the API contract has truly changed, I would prefer updating the integration model cleanly rather than depending too much on qualifiers as a workaround.

1 Like