You can restrict personal information from certain functions. For example, a client agrees to share personal data by email and phone for billing purposes, but for marketing purposes, requests that personal data be shared only by email.
Pega Platform uses instances of the function restrictions class (ClientData-FunctionRestrictions) to store the restrictions on the database. Function restrictions are unique by client ID and application name. If no restrictions are requested by a client, there are no instances.
When a client requests restrictions, a function restrictions instance is created. The instance specifies each function in your application, and within each function, each channel where functions can be used. For each function and channel, the instance defines whether that function can be executed. A client can also request to update or delete function restrictions.
You can view the detailed specification for this REST API in the Pega API specification under the Data Privacy category.
Function restrictions data transform
You customize the pyClientRestrictedFunctions data transform to define the functions and channels that are used by your application and their default restriction values. For sample code, refer to the pyClientRestrictedFunctions data transform that is in the Pega-RulesEngine ruleset.
The function pzIsFunctionRestricted identifies when a function is restricted for an app, client, function, and optional channel. You create a when rule that calls this function, and you invoke the when rule at the appropriate place in your application so that the function restrictions take effect. For example, the when rule can be used when calculating the next best action or when rendering a section of the user interface so that John Doe does not receive marketing phone calls.