4.1 Contact in Workflow/ lead

This document provides instructions for mapping and synchronizing the Contact in workflow/lead object between Salesforce and Jobrock, as well as verifying that the configuration is correct.


It's important to note that the object has different names in each system:


Salesforce object name: Contact in workflow

Jobrock object name: Lead

IN THIS ARTICLE
Sync record apex class & delete contact data
Contact in workflow/ lead mapping
Contact in workflow/ field synchronization
Add custom mapping
Set a backup default workflow
Data & GDPR
Verification & Validation

Sync record apex class & delete contact data

The Sync Record Apex class is available to synchronize contact in workflow/ lead records between Salesforce and Jobrock. By executing the Sync Record Apex class, changes made to contact in workflow/ lead records in one system can be updated in the other. This ensures that data remains consistent across both platforms and reduces the risk of errors or discrepancies in the data.

Note: when multi-brand is enabled, make sure to pass the client code too.

Available:

In the managed package: 1.59

Action Name Sync Records Required
Apex Class Sync Records Required
JR Object Type Lead Required
Record Id Record Id Required
ClientCode For multibrand Required in case of multibrand
Action Active, InActive, Delete Required

Contact in workflow/ lead mapping

To get started with the Salesforce Contact in workflow object mapping, follow the steps below:


Step 1: Log in with Jobrock admin user

Go to accounts.jobrock.com and log in with the admin user, received from Jobrock.


Step 2: Go to Lead object settings

Go to the Admin page and navigate to “Integrations”, “ATS”, “ATS Object” (step 4), and “Lead”.

Step 3: Select Contact in workflow ATS Object name

Select the “Contact in workflow” object name from the ATS Object drop-down to map against the correct Jobrock object. In this example, the object name for Lead (JR) is Application in SF.

Step 4: ATS field name selection

Choose the required Jobrock field name and the correct corresponding Salesforce field name.

Step 5: Save your configuration

Hit Save (Opslaan) in the top right corner to save your contact mapping correctly.


Contact in workflow/ field synchronization

There are 3 required fields that have to be configured in the lead mapping. These fields are identified with a red dot in the mapping window:

  • ContactId
  • SourceId
  • StatusId

When configuring the synchronization of data between Salesforce and Jobrock, there are four options available for setting the "Sync direction": Push, Pull, Push & Pull, and Disabled.


The Push option will send data from Salesforce to Jobrock, while the Pull option will retrieve data from Jobrock and update Salesforce.


The Push & Pull option enables both data transfer directions, allowing for bidirectional data synchronization.


Finally, the Disabled option stops all data synchronization between the systems. Choosing the appropriate Sync direction option is crucial in ensuring that the data is transferred accurately and efficiently, based on the specific needs of the organization.


Add custom mapping

Once you've finished the initial mapping, you can choose to add custom mapping. If there are any Contact in workflow fields in Salesforce that were not addressed in the previous steps, you can create a new field in the Jobrock lead object mapping screen and map it to the corresponding field in Salesforce.


Understanding "Entity" fields in Jobrock:

It's important to understand that if you want to add custom mapping, you must start by creating a new "Entity" field for that specific custom field in the related object in Jobrock. This is necessary because Jobrock is not aware of the type and name of the custom field(s) you intend to add. Nevertheless, Jobrock is adaptable in such a situation, meaning you can map any Contact in workflow field with an entity in Jobrock and map it.


There are two approaches to creating an entity in Jobrock and mapping it with a Salesforce field :


Option 1: Add custom field(s) via Lead mapping screen


Step 1: In the ATS Lead object screen you can add custom fields via the “Add Field” button.

Step 2: Fill out the fields and hit "Save/ Opslaan" and refresh your screen.

Step 3: Open the "Lead" object again in the ATS object screen and scroll down.

*The entity field you just created will appear at the bottom in the Custom Fields section

Step 4: Finally, select the related field name in Salesforce and choose a sync direction.

Step 5: Save your changes and test the mapping.

TIP: If you encounter difficulties selecting the SF field name in the dropdown, it could be due to the JR API user's lack of access to the field or object. Make sure to check in SF whether the JR API user has the necessary permissions to fetch the SF field.

Option 2: Create a new field in the Entity screen & map accordingly


Step 1: Go to the Jobrock Admin and navigate to Entity -> Entity fields and click on the Lead object.

Step 2: Click on "Add Field" in the top right corner.

Step 3: Fill out the fields and hit "Save/ Opslaan".

Step 4: Next, go to Integrations -> ATS -> Lead object


Step 5: Scroll down and select the related field name in Salesforce and choose a sync direction.

Step 6: Save your changes and test the mapping.


Set a backup default workflow

To set a backup default workflow, navigate to ATS Settings and then to ATS Default Settings.

From there, you can specify the desired default workflow, which will be used if there is no specific workflow available. After making changes, it is important to remember to hit the 'Save' button to ensure that the settings are applied and the backup workflow is properly configured.


Data & GDPR

If you activate the Pull or Push & Pull synchronization direction in Jobrock, Contacts in workflow data are never stored within the Jobrock system. Instead, Jobrock retrieves the data solely from the live API call, ensuring that there is no need to store any data in the JR database.


Verification & Validation

To ensure that the contact in workflow/ lead object is synchronized correctly between Salesforce and Jobrock, the following steps can be taken:

Step 1: Test mapping by copying an existing SF record ID\

  • Are all the fields coming?
  • To verify correct mapping, modify some data in the contact in workflow/ lead object and re-run the test mapping to confirm that the changes are reflected.

Step 2: Once the basic lead fields have been mapped successfully, triggering events (such as appointments or automations) on a contact should be possible.

Step 3: Contact fields in Salesforce will be updated according to the mapped values coming from answers of a contact in an automation.


Check the SF JR setup page for the green check mark

To confirm that you have correctly configured the mapping between Jobrock and Salesforce, check the JR setup page in Salesforce. Look for a green check mark, which indicates that the setup was successful. If the check mark is not present, review your configuration settings to identify any errors or missing information that may be causing the issue.

Create a test lead and validate logs & configuration

Create a Canvas page via the hub of an already synced job.


Take the following steps:

Step 1: Go to the Jobrock hub page of the synced job.

Step 2: Select "Add Canvas" in the widget.

Step 3: Choose any available template for the Canvas page.

Step 4: Click on “Settings” in the left side panel

Step 5: Select a domain name, page name, and URL

Step 6: Hit “Save and Republish”

Step 7: Copy the URL to the clipboard

Submit a test lead on a Canvas page

Test the landing page by submitting the form and checking the logs via: https://hub.jobrock.com/directLeadLogging or via the “New Lead Logs” in the above screenshot.


Check in the DirectLeadLogging log whether your test lead has been received correctly and verify if an SF record has been created according to the log.

You can hover over the text below the “StackTrace” column to see the step-by-step process of the system and if the lead request has been processed correctly.

Validate log results in SF

Navigate to the Contact in Workflow/ lead section of the job you created the Canvas page for in Salesforce and double-check if your test lead has been created successfully.


If successful, the Jobrock system should have created a new Contact record and a new Contact in workflow/ lead record in the relevant vacancy.

Next, validate the logs in the Contact in workflow/ lead request log via: https://hub.jobrock.com/loggingRequest?objectType=Lead.

The newly created record should be visible in the request log and if you click on the Object Details, you should see something like below.

{

"ContactId": "a032w00000VLCQx",

"ClientCode": "JRProdL",

"SourceId": "a082w00000dX2yVAAS",

"StatusId": "New",

"TriggerAutomation": true,

"TriggerAppointment": true,

"TriggerWhatsAppAutomation": true,

"TriggerLocation": "SF",

"Workflow": "DefaultWorkFlow",

"IsLoadTesting": false

}

NOTE: The initial status doesn't necessarily have to be "new" but could also contain a different naming convention, this differs per client.

Verify apex and mandatory fields configuration

Next, you need to verify the correct configuration of the apex class, where the logs function as a newsfeed to Jobrock. Therefore, all status mutations must be received properly.


Jobrock listens to status mutations and may carry out various task(s) throughout the tooling when there is a change triggered. For example, when an automation is configured to be sent when a candidate is on a certain status or in the case of CDP tracking based on workflow action status tracking.


Thus, are the workflow status Apex class and mandatory fields configured to fire on any status mutation of any contact in workflow?


Step 1: To validate this, trigger a status change of your test candidate in Salesforce from 'New' to any other status.


Step 2: Go back to the Lead request log and click on the Stack Trace column -> Object Details. As you can see in the example below, a record has been created for the "StatusId" field that has changed to "CV reviewed - positive outcome".

{

"ContactId": "a032w00000VLdmlAAD",

"ClientCode": "JRProdL",

"SourceId": "a082w00000dX2yVAAS",

"StatusId": "CV reviewed - positive outcome",

"TriggerAutomation": true,

"TriggerAppointment": true,

"TriggerWhatsAppAutomation": true,

"TriggerLocation": "SF",

"Workflow": "DefaultWorkFlow",

"IsLoadTesting": false

}


Apex class config check

Certain SF environments only have one workflow available. In this scenario, it's not mandatory to provide a workflow name. JR recommends including it in the payload.

Common mistake: workflow name is not populated.

It's essential to provide the "Workflow" name in the payload when the SF environment you're working in contains multiple different workflows.

If you check the logs and you see "Workflow": "null", this means there is no information in regards to the workflow name in the payload.

The automation module is another example where the selected workflow is a key parameter. As shown in the screenshot below, the consultant will need to select a workflow + status to configure an automation, which underlines the importance of providing the workflow name in the payload.

If not, Jobrock will be unable to carry out the task(s).


Also in the 'Workflow actions' section, an SF admin must configure the fields to correctly set the CDP tracking based on 'Workflow name' and 'Status title'.

Multiple workflows available

In this example, the Job workflow is selected and statuses are linked to certain actions for Jobrock. In this case, a status change for a Contact in workflow to "Introduced to client" will trigger Jobrock to class this candidate as a "Good Candidate".

NOTE: In both examples, populating the workflow name in the payload is essential for Jobrock to function correctly.


Validate the “Requests” log for status mutation

The process of checking for incoming status mutations in the JR Salesforce dashboard requires accessing a specific URL, which is https://hub.jobrock.com/loggingRequest?objectType=Lead -> Requests.


This URL directs to a logging page where the status mutations of candidates are displayed in real-time. Checking the JR Salesforce dashboard for incoming status mutations is a crucial step for verifying the correct implementation of the Contact in workflow/ lead object. Follow the next steps to complete the validation process.


Step 1: To validate successful implementation, find your test lead in SF and change the Workflow status to something different than “New”, for example, “Introduced to client”.

Step 2: Next, go back to the JR Salesforce dashboard and click on “Logs” on the Contact object:

Step 3: Click on “Request logs” and select “Lead” from the dropdown:

Step 4: The status mutation of the test lead has to be visible in this log now, you can then also click “StackTrace” to see more details of the call and what the new status is.

And as you can see in this example, it is correctly mutated to “Introduced to client”.

{

"ContactId": "a032w00000VLdmlAAD",

"ClientCode": "JRProdL",

"SourceId": "a082w00000dX2yVAAS",

"StatusId": "Introduced to client",

"TriggerAutomation": true,

"TriggerAppointment": true,

"TriggerWhatsAppAutomation": true,

"TriggerLocation": "SF",

"Workflow": "DefaultWorkFlow",

"IsLoadTesting": false

}

If you have completed all the steps successfully, you're all set!