talent-connect/connect

[CON | Reports for Stakeholder] Relate existing account for workplaces

fortini opened this issue · 8 comments

Context/background

We need to inform our stakeholder Deloitte about how many volunteers from their company have been active Jun 1, 2022, to May 31, 2023. For that, Manu created a report for mentors (among others) with a filter on Account Name includes ‘Deloitte’.
He noticed that most mentors are related to a Household Account.
While checking our field mapping, in ReDI Connect Profile there is a field called Work Place that the company name is matched to.
Since the field Work Place is on ReDI Connect Profile, it is a bit complicated to create reports with other objects like Mentorship Match oder Mentorship Sessions that are directly related to Contact.
So, he needs to check whether an Account exists for the workplace and if yes, relate that Contact to this one, and if not create one with that name.

Why are we doing this?
We have to report our stakeholder this month (May), so it should be delivered until 26/05.

What needs to be done?

We can do it in two phases:

  1. Dry run: preview all the changes the script would do. We should do this to make sure it doesn’t change something we don’t intend it to change.
  2. Actually run it

Notes on script:

  • Pull a list of all Contacts that have a ReDI Connect Profile of record type Mentor. Include the Contact record's parent Account record.
  • Only proceed with Contact records whose child ReDI Connect Profile have a non-blank value in the Work Place field
  • Only proceed with Contact records whose parent Account record is of the record type Household
  • For each Contact: search Account for companies whose name matches the Work Place value
  • Prepare one of two possible actions
    1. If an Account is found, re-link the Contact so that the Account is the new parent Account. Also, delete the former parent Household Account record
    2. If an Account is not found, create a new company-type ("Business Organization" is the likely name in SF) Account record, and set it as the parent record of the Contact. Once again, delete the former parent Household Account record.
  • Review output and decide which actions to run and which ones not to run

For reference, original request:

Deloitte has asked us how many volunteers from their company have been active Jun 1, 2022, to May 31, 2023? For that, I created a report for mentors (among others) with a filter on Account Name includes ‘Deloitte’. I noticed that most mentors are related to a Household Account. When I checked our field mapping I saw that on ReDI Connect Profile there is a field called Work Place that the company name is matched to. Since the field Work Place is on ReDI Connect Profile, it is a bit complicated to create reports with other objects like Mentorship Match oder Mentorship Sessions that are directly related to Contact.

Would it be feasible to check whether an Account exists for the work place and if yes, relate that Contact to this one, and if not create one with that name?

(please be careful about copying from thread into Github as there is personal information in there)

@ericbolikowski can we close the ticket or is there anything to be done from the product side??

Judging by Manu's comment here I think there's still a need to implement this ticket. I vote for keeping it open. Not a priority but we should keep it around.

I removed the Priority: High label.

Business value: not sure - let's ask Manu.

Code complexity: medium

@ericbolikowski thanks! Will check with Manu