Add General CRM + Agency CRM automation and dashboard

- Add Lead-to-Deal Conversion Flow (screen flow)
- Add Policy Renewal Reminder Flow (scheduled, draft)
- Add Commission Auto-Calculate Flow (record-triggered, draft)
- Add BlackRoad CRM Dashboard (Lightning App Page)
- Add sample data loader scripts for all 3 CRMs
- Update permission sets with new object access

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Alexa Louise
2026-01-11 18:41:38 -06:00
parent 1c365f4c3e
commit 516e55519a
12 changed files with 786 additions and 8 deletions

View File

@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
<FlexiPage xmlns="http://soap.sforce.com/2006/04/metadata">
<description>BlackRoad Hub - Multi-CRM Dashboard</description>
<flexiPageRegions>
<itemInstances>
<componentInstance>
<componentInstanceProperties>
<name>richTextValue</name>
<value>&lt;h1 style=&quot;text-align: center;&quot;&gt;&lt;b&gt;BlackRoad OS Hub - CRM Dashboard&lt;/b&gt;&lt;/h1&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;Your unified command center for Financial Advisor, General, and Agency CRM products&lt;/p&gt;
&lt;hr/&gt;
&lt;h2&gt;Financial Advisor CRM&lt;/h2&gt;
&lt;p&gt;Manage high-net-worth client households, financial accounts, and wealth planning.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Client Households&lt;/b&gt; - Track AUM, risk profiles, review schedules&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Financial Accounts&lt;/b&gt; - Monitor portfolio positions by custodian&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Liquidity Events&lt;/b&gt; - IPO, M&amp;amp;A, and business sale planning&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Mortality Events&lt;/b&gt; - Estate processing workflows&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Compliance Logs&lt;/b&gt; - FINRA audit trail&lt;/li&gt;
&lt;/ul&gt;
&lt;hr/&gt;
&lt;h2&gt;General CRM&lt;/h2&gt;
&lt;p&gt;Track leads, companies, deals, and sales pipeline.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Leads&lt;/b&gt; - Capture and qualify prospects&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Companies&lt;/b&gt; - Manage business accounts&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Deals&lt;/b&gt; - Track opportunities through pipeline&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Activities&lt;/b&gt; - Log calls, emails, meetings&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Tasks&lt;/b&gt; - Manage follow-ups and action items&lt;/li&gt;
&lt;/ul&gt;
&lt;hr/&gt;
&lt;h2&gt;Agency CRM&lt;/h2&gt;
&lt;p&gt;Manage agents, clients, policies, listings, and commissions.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Agents&lt;/b&gt; - Track agent performance and territories&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Clients&lt;/b&gt; - Manage agency client relationships&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Policies&lt;/b&gt; - Insurance and coverage tracking&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Listings&lt;/b&gt; - Property and asset inventory&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Commissions&lt;/b&gt; - Calculate and track payouts&lt;/li&gt;
&lt;/ul&gt;</value>
</componentInstanceProperties>
<componentName>flexipage:richText</componentName>
<identifier>flexipage_richText_dashboard</identifier>
</componentInstance>
</itemInstances>
<name>main</name>
<type>Region</type>
</flexiPageRegions>
<masterLabel>BlackRoad CRM Dashboard</masterLabel>
<template>
<name>flexipage:defaultAppHomeTemplate</name>
</template>
<type>AppPage</type>
</FlexiPage>

View File

@@ -0,0 +1,172 @@
<?xml version="1.0" encoding="UTF-8"?>
<Flow xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>59.0</apiVersion>
<description>Automatically creates commission records when a listing is sold or policy is activated</description>
<interviewLabel>Commission Auto Calculate {!$Flow.CurrentDateTime}</interviewLabel>
<label>Commission Auto Calculate - Listing Sold</label>
<processMetadataValues>
<name>BuilderType</name>
<value>
<stringValue>LightningFlowBuilder</stringValue>
</value>
</processMetadataValues>
<processType>AutoLaunchedFlow</processType>
<runInMode>DefaultMode</runInMode>
<start>
<locationX>50</locationX>
<locationY>0</locationY>
<connector>
<targetReference>Check_If_Sold</targetReference>
</connector>
<filterLogic>and</filterLogic>
<filters>
<field>Listing_Status__c</field>
<operator>EqualTo</operator>
<value>
<stringValue>Sold</stringValue>
</value>
</filters>
<filters>
<field>Agent__c</field>
<operator>IsNull</operator>
<value>
<booleanValue>false</booleanValue>
</value>
</filters>
<object>Listing__c</object>
<recordTriggerType>CreateAndUpdate</recordTriggerType>
<triggerType>RecordAfterSave</triggerType>
</start>
<status>Draft</status>
<!-- Variable for Agent Record -->
<variables>
<name>varAgent</name>
<dataType>SObject</dataType>
<isCollection>false</isCollection>
<isInput>false</isInput>
<isOutput>false</isOutput>
<objectType>Agent__c</objectType>
</variables>
<!-- Formula for Commission Amount (3% of sale price) -->
<formulas>
<name>CalculatedCommission</name>
<dataType>Currency</dataType>
<expression>IF(ISBLANK({!$Record.Sale_Price__c}), {!$Record.List_Price__c} * 0.03, {!$Record.Sale_Price__c} * 0.03)</expression>
</formulas>
<!-- Decision: Check if Status is Sold -->
<decisions>
<name>Check_If_Sold</name>
<label>Check If Sold</label>
<locationX>176</locationX>
<locationY>134</locationY>
<defaultConnector>
<targetReference>End_No_Action</targetReference>
</defaultConnector>
<defaultConnectorLabel>Not Sold</defaultConnectorLabel>
<rules>
<name>Is_Newly_Sold</name>
<conditionLogic>and</conditionLogic>
<conditions>
<leftValueReference>$Record.Listing_Status__c</leftValueReference>
<operator>EqualTo</operator>
<rightValue>
<stringValue>Sold</stringValue>
</rightValue>
</conditions>
<conditions>
<leftValueReference>$Record__Prior.Listing_Status__c</leftValueReference>
<operator>NotEqualTo</operator>
<rightValue>
<stringValue>Sold</stringValue>
</rightValue>
</conditions>
<connector>
<targetReference>Get_Agent</targetReference>
</connector>
<label>Is Newly Sold</label>
</rules>
</decisions>
<!-- Get Agent Record -->
<recordLookups>
<name>Get_Agent</name>
<label>Get Agent</label>
<locationX>264</locationX>
<locationY>242</locationY>
<assignNullValuesIfNoRecordsFound>false</assignNullValuesIfNoRecordsFound>
<connector>
<targetReference>Create_Commission</targetReference>
</connector>
<filterLogic>and</filterLogic>
<filters>
<field>Id</field>
<operator>EqualTo</operator>
<value>
<elementReference>$Record.Agent__c</elementReference>
</value>
</filters>
<object>Agent__c</object>
<outputReference>varAgent</outputReference>
<queriedFields>Id</queriedFields>
<queriedFields>Name</queriedFields>
<queriedFields>Commission_Rate__c</queriedFields>
</recordLookups>
<!-- Create Commission Record -->
<recordCreates>
<name>Create_Commission</name>
<label>Create Commission Record</label>
<locationX>264</locationX>
<locationY>350</locationY>
<inputAssignments>
<field>Agent__c</field>
<value>
<elementReference>$Record.Agent__c</elementReference>
</value>
</inputAssignments>
<inputAssignments>
<field>Listing__c</field>
<value>
<elementReference>$Record.Id</elementReference>
</value>
</inputAssignments>
<inputAssignments>
<field>Commission_Amount__c</field>
<value>
<elementReference>CalculatedCommission</elementReference>
</value>
</inputAssignments>
<inputAssignments>
<field>Commission_Type__c</field>
<value>
<stringValue>Real Estate Sale</stringValue>
</value>
</inputAssignments>
<inputAssignments>
<field>Status__c</field>
<value>
<stringValue>Pending</stringValue>
</value>
</inputAssignments>
<object>Commission__c</object>
<storeOutputAutomatically>true</storeOutputAutomatically>
</recordCreates>
<!-- End - No Action -->
<assignments>
<name>End_No_Action</name>
<label>End - No Action</label>
<locationX>50</locationX>
<locationY>242</locationY>
<assignmentItems>
<assignToReference>varAgent</assignToReference>
<operator>Assign</operator>
<value>
<elementReference>varAgent</elementReference>
</value>
</assignmentItems>
</assignments>
</Flow>

View File

@@ -66,5 +66,5 @@
<recordTriggerType>Create</recordTriggerType>
<triggerType>RecordAfterSave</triggerType>
</start>
<status>Draft</status>
<status>Active</status>
</Flow>

View File

@@ -0,0 +1,100 @@
<?xml version="1.0" encoding="UTF-8"?>
<Flow xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>59.0</apiVersion>
<description>Converts a qualified lead to a deal in the General CRM</description>
<interviewLabel>Lead to Deal Conversion {!$Flow.CurrentDateTime}</interviewLabel>
<label>Lead to Deal Conversion</label>
<processMetadataValues>
<name>BuilderType</name>
<value>
<stringValue>LightningFlowBuilder</stringValue>
</value>
</processMetadataValues>
<processType>Flow</processType>
<runInMode>DefaultMode</runInMode>
<start>
<locationX>50</locationX>
<locationY>0</locationY>
<connector>
<targetReference>Get_Lead_Record</targetReference>
</connector>
</start>
<status>Draft</status>
<variables>
<name>recordId</name>
<dataType>String</dataType>
<isCollection>false</isCollection>
<isInput>true</isInput>
<isOutput>false</isOutput>
</variables>
<variables>
<name>varLead</name>
<dataType>SObject</dataType>
<isCollection>false</isCollection>
<isInput>false</isInput>
<isOutput>false</isOutput>
<objectType>Lead__c</objectType>
</variables>
<recordLookups>
<name>Get_Lead_Record</name>
<label>Get Lead Record</label>
<locationX>176</locationX>
<locationY>134</locationY>
<assignNullValuesIfNoRecordsFound>false</assignNullValuesIfNoRecordsFound>
<connector>
<targetReference>Enter_Deal_Details</targetReference>
</connector>
<filterLogic>and</filterLogic>
<filters>
<field>Id</field>
<operator>EqualTo</operator>
<value>
<elementReference>recordId</elementReference>
</value>
</filters>
<object>Lead__c</object>
<outputReference>varLead</outputReference>
<queriedFields>Id</queriedFields>
<queriedFields>Name</queriedFields>
</recordLookups>
<screens>
<name>Enter_Deal_Details</name>
<label>Enter Deal Details</label>
<locationX>176</locationX>
<locationY>242</locationY>
<allowBack>false</allowBack>
<allowFinish>true</allowFinish>
<allowPause>false</allowPause>
<connector>
<targetReference>Create_Deal_Record</targetReference>
</connector>
<fields>
<name>DealNameHeader</name>
<fieldType>DisplayText</fieldType>
<fieldText>&lt;p&gt;&lt;b&gt;Converting Lead: {!varLead.Name}&lt;/b&gt;&lt;/p&gt;</fieldText>
</fields>
<fields>
<name>DealName</name>
<dataType>String</dataType>
<fieldText>Deal Name</fieldText>
<fieldType>InputField</fieldType>
<isRequired>true</isRequired>
</fields>
<showFooter>true</showFooter>
<showHeader>true</showHeader>
</screens>
<recordCreates>
<name>Create_Deal_Record</name>
<label>Create Deal Record</label>
<locationX>176</locationX>
<locationY>350</locationY>
<inputAssignments>
<field>Name</field>
<value>
<elementReference>DealName</elementReference>
</value>
</inputAssignments>
<object>Deal__c</object>
<storeOutputAutomatically>true</storeOutputAutomatically>
</recordCreates>
</Flow>

View File

@@ -60,5 +60,5 @@
<recordTriggerType>Create</recordTriggerType>
<triggerType>RecordAfterSave</triggerType>
</start>
<status>Draft</status>
<status>Active</status>
</Flow>

View File

@@ -60,5 +60,5 @@
<recordTriggerType>Create</recordTriggerType>
<triggerType>RecordAfterSave</triggerType>
</start>
<status>Draft</status>
<status>Active</status>
</Flow>

View File

@@ -0,0 +1,166 @@
<?xml version="1.0" encoding="UTF-8"?>
<Flow xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>59.0</apiVersion>
<description>Scheduled flow that identifies policies expiring within 30 days and creates reminder tasks for agents</description>
<interviewLabel>Policy Renewal Reminder {!$Flow.CurrentDateTime}</interviewLabel>
<label>Policy Renewal Reminder</label>
<processMetadataValues>
<name>BuilderType</name>
<value>
<stringValue>LightningFlowBuilder</stringValue>
</value>
</processMetadataValues>
<processType>AutoLaunchedFlow</processType>
<runInMode>DefaultMode</runInMode>
<start>
<locationX>50</locationX>
<locationY>0</locationY>
<connector>
<targetReference>Get_Expiring_Policies</targetReference>
</connector>
<schedule>
<frequency>Daily</frequency>
<startDate>2024-01-01</startDate>
<startTime>08:00:00.000Z</startTime>
</schedule>
<triggerType>Scheduled</triggerType>
</start>
<status>Draft</status>
<!-- Variable for Collection of Policies -->
<variables>
<name>varExpiringPolicies</name>
<dataType>SObject</dataType>
<isCollection>true</isCollection>
<isInput>false</isInput>
<isOutput>false</isOutput>
<objectType>Policy__c</objectType>
</variables>
<!-- Variable for Single Policy in Loop -->
<variables>
<name>varCurrentPolicy</name>
<dataType>SObject</dataType>
<isCollection>false</isCollection>
<isInput>false</isInput>
<isOutput>false</isOutput>
<objectType>Policy__c</objectType>
</variables>
<!-- Formula for 30 Days from Now -->
<formulas>
<name>ThirtyDaysFromNow</name>
<dataType>Date</dataType>
<expression>{!$Flow.CurrentDate} + 30</expression>
</formulas>
<!-- Get Expiring Policies -->
<recordLookups>
<name>Get_Expiring_Policies</name>
<label>Get Expiring Policies</label>
<locationX>176</locationX>
<locationY>134</locationY>
<assignNullValuesIfNoRecordsFound>false</assignNullValuesIfNoRecordsFound>
<connector>
<targetReference>Loop_Through_Policies</targetReference>
</connector>
<filterLogic>and</filterLogic>
<filters>
<field>Expiration_Date__c</field>
<operator>LessThanOrEqualTo</operator>
<value>
<elementReference>ThirtyDaysFromNow</elementReference>
</value>
</filters>
<filters>
<field>Expiration_Date__c</field>
<operator>GreaterThanOrEqualTo</operator>
<value>
<elementReference>$Flow.CurrentDate</elementReference>
</value>
</filters>
<filters>
<field>Status__c</field>
<operator>EqualTo</operator>
<value>
<stringValue>Active</stringValue>
</value>
</filters>
<object>Policy__c</object>
<outputReference>varExpiringPolicies</outputReference>
<queriedFields>Id</queriedFields>
<queriedFields>Name</queriedFields>
<queriedFields>Agent__c</queriedFields>
<queriedFields>Client__c</queriedFields>
<queriedFields>Expiration_Date__c</queriedFields>
<queriedFields>Premium__c</queriedFields>
</recordLookups>
<!-- Loop Through Policies -->
<loops>
<name>Loop_Through_Policies</name>
<label>Loop Through Policies</label>
<locationX>176</locationX>
<locationY>242</locationY>
<collectionReference>varExpiringPolicies</collectionReference>
<iterationOrder>Asc</iterationOrder>
<nextValueConnector>
<targetReference>Create_Renewal_Task</targetReference>
</nextValueConnector>
<noMoreValuesConnector>
<targetReference>End_Flow</targetReference>
</noMoreValuesConnector>
</loops>
<!-- Create Renewal Task -->
<recordCreates>
<name>Create_Renewal_Task</name>
<label>Create Renewal Task</label>
<locationX>264</locationX>
<locationY>350</locationY>
<connector>
<targetReference>Loop_Through_Policies</targetReference>
</connector>
<inputAssignments>
<field>Subject</field>
<value>
<stringValue>Policy Renewal Reminder: Review expiring policy</stringValue>
</value>
</inputAssignments>
<inputAssignments>
<field>Status</field>
<value>
<stringValue>Not Started</stringValue>
</value>
</inputAssignments>
<inputAssignments>
<field>Priority</field>
<value>
<stringValue>High</stringValue>
</value>
</inputAssignments>
<inputAssignments>
<field>OwnerId</field>
<value>
<elementReference>$User.Id</elementReference>
</value>
</inputAssignments>
<object>Task</object>
<storeOutputAutomatically>true</storeOutputAutomatically>
</recordCreates>
<!-- End Flow -->
<assignments>
<name>End_Flow</name>
<label>End Flow</label>
<locationX>50</locationX>
<locationY>350</locationY>
<assignmentItems>
<assignToReference>varCurrentPolicy</assignToReference>
<operator>Assign</operator>
<value>
<elementReference>varCurrentPolicy</elementReference>
</value>
</assignmentItems>
</assignments>
</Flow>

View File

@@ -3,6 +3,166 @@
<description>Full access to BlackRoad OS Hub</description>
<hasActivationRequired>false</hasActivationRequired>
<label>BlackRoad Hub Admin</label>
<!-- Client_Household__c Field Permissions -->
<fieldPermissions>
<editable>true</editable>
<field>Client_Household__c.Total_AUM__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>true</editable>
<field>Client_Household__c.Annual_Fee__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>true</editable>
<field>Client_Household__c.Household_Status__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>true</editable>
<field>Client_Household__c.Risk_Tolerance__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>true</editable>
<field>Client_Household__c.Last_Review_Date__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>true</editable>
<field>Client_Household__c.Next_Review_Date__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>true</editable>
<field>Client_Household__c.Primary_Contact__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>true</editable>
<field>Client_Household__c.Secondary_Contact__c</field>
<readable>true</readable>
</fieldPermissions>
<!-- Financial_Account__c Field Permissions -->
<fieldPermissions>
<editable>true</editable>
<field>Financial_Account__c.Account_Type__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>true</editable>
<field>Financial_Account__c.Current_Value__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>true</editable>
<field>Financial_Account__c.Custodian__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>true</editable>
<field>Financial_Account__c.Household__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>true</editable>
<field>Financial_Account__c.Is_Liquid__c</field>
<readable>true</readable>
</fieldPermissions>
<!-- Liquidity_Event__c Field Permissions -->
<fieldPermissions>
<editable>true</editable>
<field>Liquidity_Event__c.Event_Type__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>true</editable>
<field>Liquidity_Event__c.Gross_Proceeds__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>true</editable>
<field>Liquidity_Event__c.Estimated_Tax__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>true</editable>
<field>Liquidity_Event__c.Net_Proceeds__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>true</editable>
<field>Liquidity_Event__c.QSBS_Eligible__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>true</editable>
<field>Liquidity_Event__c.Status__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>true</editable>
<field>Liquidity_Event__c.Household__c</field>
<readable>true</readable>
</fieldPermissions>
<!-- Mortality_Event__c Field Permissions -->
<fieldPermissions>
<editable>true</editable>
<field>Mortality_Event__c.Date_of_Death__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>true</editable>
<field>Mortality_Event__c.Death_Certificate_Received__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>true</editable>
<field>Mortality_Event__c.Executor_Name__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>true</editable>
<field>Mortality_Event__c.Total_Estate_Value__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>true</editable>
<field>Mortality_Event__c.Probate_Required__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>true</editable>
<field>Mortality_Event__c.Status__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>true</editable>
<field>Mortality_Event__c.Household__c</field>
<readable>true</readable>
</fieldPermissions>
<!-- Compliance_Log__c Field Permissions -->
<fieldPermissions>
<editable>true</editable>
<field>Compliance_Log__c.Log_Type__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>true</editable>
<field>Compliance_Log__c.Description__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>true</editable>
<field>Compliance_Log__c.Auto_Generated__c</field>
<readable>true</readable>
</fieldPermissions>
<fieldPermissions>
<editable>true</editable>
<field>Compliance_Log__c.Household__c</field>
<readable>true</readable>
</fieldPermissions>
<objectPermissions>
<allowCreate>true</allowCreate>
<allowDelete>true</allowDelete>