2.2 Delete contact data
Although Jobrock doesn't create contacts at Jobrock's end. For several features (for example phone numbers for WhatsApp timelines, or contact IDs for appointments) Jobrock pulls data from Salesforce. This article explains how to use the Delete contact data apex class to remove unnecessary or outdated contact-related data.
The Delete Contact Data Apex class is designed to delete contact data from both Salesforce and Jobrock systems. To execute the class, one mandatory field must be provided: Contact Id. The other three fields - Email, Phone, and Client code - are optional fields.
By using the Delete Contact Data Apex class, unnecessary or outdated contact data can be easily removed.
NOTE: This feature is available starting from Jobrock Salesforce package version v1.62.
| Parameters | Value | Required? |
|---|---|---|
| Action Name | Delete Contact Data | Required |
| Apex Class | Delete Contact Data | Required |
| Contact Id | Record ID | Required |
| Record Email | Optional | |
| Phone | Record Mobile Phone | Optional |
| Client Code | For multi-brands | Optional |
Example configuration in Salesforce
Step 1: Select the Object
In this step, you should choose the Contact object and set up the trigger for the event "A record is deleted".

Step 2: Configure the Apex class
Proceed to configure the "Delete Contact Data" Apex class. Remember, as highlighted earlier, the only required field is the Contact Id, which is marked with a red asterisk as shown below.
