REST API – Verified Privacy Policy Link

Receive a Privacy Site URL present on particular Contact or  Lead record in an encrypted format using this REST API. After passing the parameters in API, it will verify all the details and return the verified Privacy Site URL for verified Contact or Lead record.

 The GET method to receive a verified Privacy Site URL is as follows –

/services/apexrest / PCCC_DM / v1 / SelfServiceRestAPI ? email = marksth @gellcsop.com & siteId = a0L2w000000ihrqEAA & sendEmail = true & individualInfo = {
    "FirstName": "Mark",
    "LastName": "Smith",
    "Giver_Number__c": "756"
}

The details of all these parameters are as follows – 

  • email – This field contains the Email Id of Contact/Lead record that the user wants to send an Email with Privacy Site Url.
  • siteId – This field contains the appropriate Privacy Site record ID.
  • sendEmail – To send Privacy Site URL on email to the Contact/Lead. Pass the Boolean value “True” or “False” based on the requirement.
  • individualInfo – You can pass Individual info to verify the user and receive the appropriate Privacy Site URL.
     

Prerequisites:

At least one Privacy Site record must be created. To create a Privacy Site record refer to the following link –

https://cloudcompliance.app/docs/privacy-policy-creation/

Solution Steps –

1. Navigate -> Salesforce record (Contact record in this example) and get all the required information to pass an API call.
E.g. First Name, Last Name, Giver Number.

Note – Make sure an Individual record is created with all the necessary fields which are going to be used in the REST call and it is associated with the corresponding Contact record.
Refer to article Grouping Rule for Individual to create an Individual record for Contact/Lead records.

1.png

2. Navigate -> Privacy Site record and copy the record Id from the URL (a0L2w000000ihrqEAA in this example).

2.png

3. Navigate -> REST tool such as Salesforce’s developer workbench, Postman, Insomnia, etc. (This example uses Salesforce Developer Workbench) https://workbench.developerforce.com/restExplorer.php 

3.png

4. Navigate -> ‘REST Explorer’ utility tab within the workbench and select the “GET” method.

4.png

5. For the “GET” method, enter the Cloud Compliance’s REST API URL which is already mentioned above.

5.png

6. Click the “Execute” button to invoke the REST API

6.png

7. The REST API will return a Privacy Site URL and a success message(hasError: false).

7.png


Note: To check the Privacy Site Portal you can copy the generated link and open it in a new tab. Also if you have passed sendemail parameter’s value as true then Contact must have received an email containing the Privacy Site URL.

Powered by BetterDocs