Send email to hiring manager when certain step is taken

Follow

In order to make this change happen, the following needs to be created and configured in the org:

  • Custom Email field
  • Workflow rule with field update 
  • Template in Salesforce Setup 
  • Email alert 
  • Process

Custom field

First you will need to create a new field with Data Type 'Email' on the object Step. The field shouldn't be added to the page layouts. Click here for more information concerning creating a custom field.

Workflow rule

Then create a Workflow rule with Field update on the object Step to fill the newly created email field with the email address of the hiring manager of the job. Fill in the 'Rule Name'.

Note: It is advised to always fill in the 'Description'.

In the section 'Evaluation Criteria', select: 'created, and every time it's edited'.

In section 'Rule Criteria' > Run this rule if the 'formula evaluates to true'. 

In the text box you enter 1<>0

 

Click on 'Save & Next'.

Click on 'Add Workflow Action' > 'New Field Update'. Fill in the 'Name' then the 'Unique name' will automatically be filled. In 'Field to update' you select the email field you created on object Step.

Check the checkbox 'Re-evaluate Workflow Rules after Field Change'.

Click under 'Specify New Field Value' on 'Use a formula to set the new value' and fill in 'cxsrec__Job_application__r.cxsrec__Position__r.cxsrec__Hiringmanager__r.Email'. Then click on 'Save'.

Email template

Then you have you to create Classic email template in Setup. Make sure the checkbox 'Available for use' is checked otherwise it can't be used, therefore it can't be selected in the Email alert.

Email alert

Then create an Email alert. Fill in all the required fields. The Object should be 'Step'. Select in 'Email Template' the email template you just created. In 'Recipient Type' you select 'Email Field' and the email field you created > click 'Save'. 

Process

Finally, you have to create a process with the Process Builder. Name the process and fill in the 'Description'.

The process starts when: a record changes > 'Save'.

Object: Step

Start the process: only when a record is created. > 'Save'.

Click on Add Criteria > fill the Criteria Name. 

Criteria for Executing Actions: select Conditions are met

Set conditions

Workflow event id - equals id -  fill in the ID of the step

Add another condition

select the email field you created - Does not equal - Global Constant - $GlobalConstant.Null

Click 'Save'.

Immediate action is the Email alert where you select the Email alert that you just created.

Save and activate the process.

Test 

You can test if it works by creating a contact record (hiring manager checkbox checked) and link it to a test vacancy. Register a test candidate to the same vacancy by creating a job application and take the step that should trigger an email to the hiring manager. If you receive an e-mail then you're done. If you don't receive an e-mail then go through all the steps of this article again.

 

 

 

Have more questions? Submit a request

Comments

Powered by Zendesk