The APEX API call for Authorization Form Consent record creation is as follows:-
The details of all input parameters are as follows –
- CONSENT_GIVER_ID is an Individual ID of the Contact/Lead record.
- AUTH_FORM_TEXT_ID Manages the text associated with the authorization form. Users can also include a summary to describe the form’s purpose and display it to customers when asking for their consent. This is the required field that can be hard coded.
- STATUS is the standard picklist field on the authorization consent form object with values as ‘Seen’ or ‘Signed’ (Restricted Picklist Field). This is the optional field that can be hard coded.
- CONSENT_CAPTURE_SRC_TYPE is a standard picklist field on the authorization consent form which highlights communication preference for the consent captured (Restricted Picklist Field). This is the required field that can be hard coded.
- CONSENT_CAPTURE_SRC is a standard field (Text Area 255) on the authorization consent form which populates the channel or source by which the consent is acquired. This is the required field that can be hard coded.
Prerequisite – It is necessary to have at least one record of the salesforce standard object “Authorization Form”, “Authorization Form Text” and Cloud Compliance’s custom object “Privacy Site”.
1. Navigate to a salesforce contact record for which users want to manage their consents. This contact record will have an association with the Individual.
Note– If the individual is not associated with the contact record, the user can run the auto Individual batch provided by “Cloud Compliance”. It will automatically create individual records for each Contact record based on defined criteria.
For more details about this batch refer to this link Grouping Rules for Individual.
2. Navigate to that Individual record to get its Id. Copy the record Id from the URL. The id is highlighted in the URL for reference in the screenshot below –
3. The user next needs to go to the “Privacy Site” record and get the Privacy site id.
4. Also, get the “Authorization Form Text” records id
5. Open the Salesforce Developer Console. Prepare the createAuthFormConsent method along with the input parameters which will be passed to the apex script. Click on the Execute button. The authorization form consent creation API is already mentioned above.
6. This API returns Record creation Status as True in case of successful Authorization form consent creation and false otherwise. It also contains a record Id that is authFormSFId.
7. The authorization form consent record which can be called as Proof of Acceptance record will be as follows –
Note – NAME is a standard field on the Authorization Form Consent object. If the user does not pass this value through APEX API then it will be populated as a current date-time stamp with the “CC” as the prefix.