Failsafe to prevent task creation to deactivated user in SFDC

rish_tracktik
Level 2

Failsafe to prevent task creation to deactivated user in SFDC

Hi all,

 

We are using auto-assignment rules for our task creation from Marketo. We recently had a situation where a task was updated for a contact in SFDC. The task was never created in SFDC because the contact owner was a deactivated user in SFDC or someone who left organisation. 
Somehow our Sales enablement team caught this. We want to put a Failsafe in place that whenever such a situation happens the task should be routed to an active user or I can pick one active user who should receive all these tasks to avoid any RACE condition. 
Is there a workaround available for this? 
Any suggestions would be very helpful, how to handle this scenario.

Thanks

2 REPLIES 2
SanfordWhiteman
Level 10 - Community Moderator

Re: Failsafe to prevent task creation to deactivated user in SFDC

Don't see how this is a race condition... though it is an unwanted outcome, certainly.

 

Not aware of a way to workaround it, though, within Marketo. Seems like a sales-side (that is, SFDC-side) procedure should already exist to reassign ownership.

Jay_Jiang
Level 10

Re: Failsafe to prevent task creation to deactivated user in SFDC

Marketo would need to be able to read the SFDC User object field isActive, which it can't, to be able to make a decision.

A solution would certainly need to be deployed in SFDC - likely an Apex trigger for when a task/activity is created, check if owner isActive = true

A solution would certainly need to be deployed in SFDC - likely, assign all tasks to the sync user and an Apex trigger for when a task/activity is created, check if sales owner isActive = true, and reassigns the task to that owner