[TP salesforce integration:] On company rep sign-up, assign SF Contact to company's Account record
ericbolikowski opened this issue ยท 6 comments
Context/background
A Contact
record is created by nestjs whenever a company representative signs up on TP. However, a Household Account
record (of the object Account
) is also automatically created, and assigned as the Contact record's "parent" record.
The work of several of our Salesforce users will be improved by changing this mechanic as follows:
instead, get the Account
record of the company being represented and assign that as the parent record of the Contact record.
What needs to be done?
The use case code in apps/nestjs-api/src/tp-company-profiles/use-cases/tp-company-profile-sign-up/tp-company-profile-sign-up.use-case.ts
is responsible for managing the Salesforce mutations resulting from a company sign up.
- Update the current user's
Contact
record by re-assigning the value of itsAccountId
field to point to the ID of theAccount
record of the user's company (which is either looked up or newly created in the same use case code) - Delete the now-orphaned
Household Account
which is no longer the "parent" of the current user'sContact
record
Code complexity is quite low. From memory, business value is high.
Hey there,
We need to finish this ticket ASAP in order to complete the ticket 761.
Thanks
Doing this week ๐
Dear @ericbolikowski could you please also show me this in SF, so I know what exactly is happening?
@astkhikatredi sure - let's stay behind 5 minutes after today's team call. It's simple to demo.
Update here: we can skip this ticket for now.