Initial BlackRoad OS Hub - Meta-CRM Platform

## Hub Layer
- Connected_CRM__c: Manage multiple CRM instances
- CRM_Product__c: CRM product templates

## Financial Advisor CRM
- Client_Household__c: Unified household view
- Financial_Account__c: IRA, brokerage, annuity tracking
- Distribution_Request__c: Withdrawal workflows
- Mortality_Event__c: Estate processing
- Liquidity_Event__c: Business sales, large transfers
- Compliance_Log__c: FINRA audit trail

## Components
- BlackRoadHubController: Hub dashboard controller
- FinancialAdvisorService: FA business logic
- blackroadHubDashboard: Lightning Web Component
- BlackRoad Hub app with all tabs

🤖 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 16:26:21 -06:00
commit ee7e9aff64
94 changed files with 1805 additions and 0 deletions

84
README.md Normal file
View File

@@ -0,0 +1,84 @@
# BlackRoad OS Hub
**Meta-CRM Platform** - A CRM that manages CRMs.
## Architecture
```
┌─────────────────────────────────────────────────────────────────┐
│ BLACKROAD OS HUB │
│ (Salesforce - Master Control) │
├─────────────────────────────────────────────────────────────────┤
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ Connected │ │ Connected │ │ Connected │ │
│ │ CRM #1 │ │ CRM #2 │ │ CRM #3 │ │
│ │ (FA CRM) │ │ (Agency) │ │ (Client X) │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
│ │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ UNIFIED DATA LAYER │ │
│ │ • Cross-CRM Search • Sync Status │ │
│ │ • Audit Logs • Health Monitoring │ │
│ │ • Template Library • Workflow Engine │ │
│ └─────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────┘
```
## Custom Objects
### Hub Layer
| Object | Description |
|--------|-------------|
| `Connected_CRM__c` | Connected CRM instances managed by the hub |
| `CRM_Product__c` | CRM product templates (Financial Advisor CRM, etc.) |
### Financial Advisor CRM
| Object | Description |
|--------|-------------|
| `Client_Household__c` | Unified household view |
| `Financial_Account__c` | Individual financial accounts (IRA, brokerage, etc.) |
| `Distribution_Request__c` | Distribution/withdrawal workflows |
| `Mortality_Event__c` | Death/estate processing |
| `Liquidity_Event__c` | Business sales, large transfers |
| `Compliance_Log__c` | FINRA-compliant audit trail |
## Apex Classes
| Class | Description |
|-------|-------------|
| `BlackRoadHubController` | Hub dashboard controller |
| `FinancialAdvisorService` | FA CRM business logic |
## Lightning Components
| Component | Description |
|-----------|-------------|
| `blackroadHubDashboard` | Main hub command center |
## Deployment
```bash
# Authenticate to your org
sf org login web --alias blackroad-hub
# Deploy
sf project deploy start --target-org blackroad-hub
# Assign permission set
sf org assign permset --name BlackRoad_Hub_Admin --target-org blackroad-hub
```
## Target Org
- **Org:** securianfinancial-4e-dev-ed
- **URL:** https://securianfinancial-4e-dev-ed.develop.my.salesforce.com
## OAuth Credentials
Stored in Cloudflare Worker secrets:
- `SALESFORCE_CONSUMER_KEY`
- `SALESFORCE_CONSUMER_SECRET`
---
**BlackRoad OS** | Building compliance-first automation for regulated industries

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomApplication xmlns="http://soap.sforce.com/2006/04/metadata">
<brand>
<headerColor>#000000</headerColor>
<shouldOverrideOrgTheme>true</shouldOverrideOrgTheme>
</brand>
<description>BlackRoad OS Hub - Meta-CRM Platform</description>
<formFactors>
<formFactor>Large</formFactor>
</formFactors>
<isNavAutoTempTabsDisabled>false</isNavAutoTempTabsDisabled>
<isNavPersonalizationDisabled>false</isNavPersonalizationDisabled>
<isNavTabPersistenceDisabled>false</isNavTabPersistenceDisabled>
<label>BlackRoad Hub</label>
<navType>Standard</navType>
<tabs>
<tab>standard-home</tab>
<tab>Connected_CRM__c</tab>
<tab>CRM_Product__c</tab>
<tab>Client_Household__c</tab>
<tab>Financial_Account__c</tab>
<tab>Distribution_Request__c</tab>
<tab>Mortality_Event__c</tab>
<tab>Liquidity_Event__c</tab>
<tab>Compliance_Log__c</tab>
</tabs>
<uiType>Lightning</uiType>
</CustomApplication>

View File

@@ -0,0 +1,160 @@
/**
* BlackRoad OS Hub Controller
* Main controller for the Hub Dashboard and CRM management
*/
public with sharing class BlackRoadHubController {
/**
* Get all connected CRM instances
*/
@AuraEnabled(cacheable=true)
public static List<Connected_CRM__c> getConnectedCRMs() {
return [
SELECT Id, Name, CRM_Type__c, Instance_URL__c, Status__c,
Last_Sync__c, Vertical__c, Record_Count__c
FROM Connected_CRM__c
ORDER BY Name
];
}
/**
* Get all available CRM products/templates
*/
@AuraEnabled(cacheable=true)
public static List<CRM_Product__c> getCRMProducts() {
return [
SELECT Id, Name, Product_Code__c, Description__c, Version__c,
Target_Vertical__c, Objects_Included__c, Flows_Included__c
FROM CRM_Product__c
ORDER BY Target_Vertical__c, Name
];
}
/**
* Get hub statistics
*/
@AuraEnabled(cacheable=true)
public static HubStats getHubStats() {
HubStats stats = new HubStats();
stats.totalCRMs = [SELECT COUNT() FROM Connected_CRM__c];
stats.activeCRMs = [SELECT COUNT() FROM Connected_CRM__c WHERE Status__c = 'Active'];
stats.totalHouseholds = [SELECT COUNT() FROM Client_Household__c];
stats.totalAUM = 0;
AggregateResult[] aumResult = [
SELECT SUM(Total_AUM__c) totalAUM
FROM Client_Household__c
];
if (aumResult.size() > 0 && aumResult[0].get('totalAUM') != null) {
stats.totalAUM = (Decimal)aumResult[0].get('totalAUM');
}
stats.pendingDistributions = [
SELECT COUNT() FROM Distribution_Request__c
WHERE Status__c NOT IN ('Completed', 'Rejected')
];
stats.activeMortalityEvents = [
SELECT COUNT() FROM Mortality_Event__c
WHERE Status__c != 'Completed'
];
stats.activeLiquidityEvents = [
SELECT COUNT() FROM Liquidity_Event__c
WHERE Status__c NOT IN ('Closed - Funds Received', 'Post-Close Planning')
];
return stats;
}
/**
* Get recent compliance logs
*/
@AuraEnabled(cacheable=true)
public static List<Compliance_Log__c> getRecentComplianceLogs(Integer recordLimit) {
return [
SELECT Id, Name, Log_Type__c, Description__c, CreatedDate,
Household__r.Name, Logged_By__r.Name, Auto_Generated__c
FROM Compliance_Log__c
ORDER BY CreatedDate DESC
LIMIT :recordLimit
];
}
/**
* Get households needing attention (overdue reviews, etc.)
*/
@AuraEnabled(cacheable=true)
public static List<Client_Household__c> getHouseholdsNeedingAttention() {
Date today = Date.today();
return [
SELECT Id, Name, Total_AUM__c, Primary_Contact__r.Name,
Last_Review_Date__c, Next_Review_Date__c, Household_Status__c
FROM Client_Household__c
WHERE Next_Review_Date__c <= :today
OR Household_Status__c = 'Deceased Primary'
ORDER BY Next_Review_Date__c ASC
LIMIT 20
];
}
/**
* Sync a connected CRM
*/
@AuraEnabled
public static String syncCRM(Id crmId) {
Connected_CRM__c crm = [
SELECT Id, Name, CRM_Type__c, API_Endpoint__c, Status__c
FROM Connected_CRM__c
WHERE Id = :crmId
];
// Update status to syncing
crm.Status__c = 'Syncing';
update crm;
// In a real implementation, this would call the external CRM API
// For now, we'll simulate a successful sync
crm.Last_Sync__c = DateTime.now();
crm.Status__c = 'Active';
update crm;
return 'Sync initiated for ' + crm.Name;
}
/**
* Create a compliance log entry
*/
@AuraEnabled
public static Compliance_Log__c createComplianceLog(
Id householdId,
String logType,
String description,
String relatedRecordId
) {
Compliance_Log__c log = new Compliance_Log__c(
Household__c = householdId,
Log_Type__c = logType,
Description__c = description,
Related_Record_ID__c = relatedRecordId,
Logged_By__c = UserInfo.getUserId(),
Auto_Generated__c = false
);
insert log;
return log;
}
/**
* Hub statistics wrapper class
*/
public class HubStats {
@AuraEnabled public Integer totalCRMs { get; set; }
@AuraEnabled public Integer activeCRMs { get; set; }
@AuraEnabled public Integer totalHouseholds { get; set; }
@AuraEnabled public Decimal totalAUM { get; set; }
@AuraEnabled public Integer pendingDistributions { get; set; }
@AuraEnabled public Integer activeMortalityEvents { get; set; }
@AuraEnabled public Integer activeLiquidityEvents { get; set; }
}
}

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>59.0</apiVersion>
<status>Active</status>
</ApexClass>

View File

@@ -0,0 +1,215 @@
/**
* Financial Advisor Service
* Business logic for FA CRM operations
*/
public with sharing class FinancialAdvisorService {
/**
* Get household summary with all related data
*/
@AuraEnabled(cacheable=true)
public static HouseholdSummary getHouseholdSummary(Id householdId) {
HouseholdSummary summary = new HouseholdSummary();
// Get household details
summary.household = [
SELECT Id, Name, Total_AUM__c, Household_Status__c, Risk_Tolerance__c,
Last_Review_Date__c, Next_Review_Date__c, Annual_Fee__c,
Primary_Contact__r.Name, Primary_Contact__r.Email, Primary_Contact__r.Phone,
Secondary_Contact__r.Name, Secondary_Contact__r.Email
FROM Client_Household__c
WHERE Id = :householdId
];
// Get financial accounts
summary.accounts = [
SELECT Id, Name, Account_Type__c, Current_Value__c, Custodian__c,
Registration__c, Primary_Beneficiary__c, Is_Liquid__c
FROM Financial_Account__c
WHERE Household__c = :householdId
ORDER BY Current_Value__c DESC
];
// Calculate totals
summary.totalLiquid = 0;
summary.totalNonLiquid = 0;
for (Financial_Account__c acc : summary.accounts) {
if (acc.Is_Liquid__c) {
summary.totalLiquid += acc.Current_Value__c != null ? acc.Current_Value__c : 0;
} else {
summary.totalNonLiquid += acc.Current_Value__c != null ? acc.Current_Value__c : 0;
}
}
// Get pending distributions
summary.pendingDistributions = [
SELECT Id, Name, Gross_Amount__c, Net_Amount__c, Status__c,
Delivery_Method__c, Urgency__c, Source_Account__r.Name
FROM Distribution_Request__c
WHERE Household__c = :householdId
AND Status__c NOT IN ('Completed', 'Rejected')
ORDER BY CreatedDate DESC
];
// Get recent compliance logs
summary.recentLogs = [
SELECT Id, Name, Log_Type__c, Description__c, CreatedDate
FROM Compliance_Log__c
WHERE Household__c = :householdId
ORDER BY CreatedDate DESC
LIMIT 10
];
return summary;
}
/**
* Process a distribution request
*/
@AuraEnabled
public static Distribution_Request__c processDistribution(
Id householdId,
Id sourceAccountId,
Decimal grossAmount,
Decimal federalWithholding,
Decimal stateWithholding,
String deliveryMethod,
String urgency,
String reason
) {
// Create distribution request
Distribution_Request__c dist = new Distribution_Request__c(
Household__c = householdId,
Source_Account__c = sourceAccountId,
Gross_Amount__c = grossAmount,
Federal_Withholding__c = federalWithholding,
State_Withholding__c = stateWithholding,
Delivery_Method__c = deliveryMethod,
Urgency__c = urgency,
Reason__c = reason,
Status__c = 'Pending Compliance'
);
// Auto-approve if under threshold and not emergency
if (grossAmount <= 100000 && urgency != 'Emergency') {
dist.Status__c = 'Approved';
dist.Compliance_Notes__c = 'Auto-approved: Under $100K threshold';
}
insert dist;
// Create compliance log
createAutoComplianceLog(
householdId,
'Distribution',
'Distribution request created: $' + grossAmount + ' from ' + sourceAccountId,
dist.Id
);
return dist;
}
/**
* Initiate mortality event workflow
*/
@AuraEnabled
public static Mortality_Event__c initiateMortalityEvent(
Id householdId,
Id deceasedContactId,
Date dateOfDeath,
String executorName,
Id survivingSpouseId
) {
Mortality_Event__c event = new Mortality_Event__c(
Household__c = householdId,
Deceased_Contact__c = deceasedContactId,
Date_of_Death__c = dateOfDeath,
Executor_Name__c = executorName,
Surviving_Spouse__c = survivingSpouseId,
Status__c = 'Reported'
);
insert event;
// Update household status
Client_Household__c household = new Client_Household__c(
Id = householdId,
Household_Status__c = 'Deceased Primary'
);
update household;
// Create compliance log
createAutoComplianceLog(
householdId,
'Account Change',
'Mortality event initiated. Date of death: ' + dateOfDeath,
event.Id
);
return event;
}
/**
* Calculate distribution tax impact
*/
@AuraEnabled
public static TaxCalculation calculateDistributionTax(
Decimal grossAmount,
String accountType,
Decimal federalRate,
Decimal stateRate
) {
TaxCalculation calc = new TaxCalculation();
calc.grossAmount = grossAmount;
// Check for early withdrawal penalty (simplified)
calc.earlyWithdrawalPenalty = 0;
if (accountType == 'Traditional IRA' || accountType == '401(k)') {
// In reality, would check client age
// calc.earlyWithdrawalPenalty = grossAmount * 0.10;
}
calc.federalTax = grossAmount * (federalRate / 100);
calc.stateTax = grossAmount * (stateRate / 100);
calc.totalTax = calc.federalTax + calc.stateTax + calc.earlyWithdrawalPenalty;
calc.netAmount = grossAmount - calc.totalTax;
return calc;
}
/**
* Helper: Create auto-generated compliance log
*/
private static void createAutoComplianceLog(Id householdId, String logType, String description, Id relatedId) {
Compliance_Log__c log = new Compliance_Log__c(
Household__c = householdId,
Log_Type__c = logType,
Description__c = description,
Related_Record_ID__c = relatedId,
Logged_By__c = UserInfo.getUserId(),
Auto_Generated__c = true
);
insert log;
}
/**
* Wrapper classes
*/
public class HouseholdSummary {
@AuraEnabled public Client_Household__c household { get; set; }
@AuraEnabled public List<Financial_Account__c> accounts { get; set; }
@AuraEnabled public Decimal totalLiquid { get; set; }
@AuraEnabled public Decimal totalNonLiquid { get; set; }
@AuraEnabled public List<Distribution_Request__c> pendingDistributions { get; set; }
@AuraEnabled public List<Compliance_Log__c> recentLogs { get; set; }
}
public class TaxCalculation {
@AuraEnabled public Decimal grossAmount { get; set; }
@AuraEnabled public Decimal federalTax { get; set; }
@AuraEnabled public Decimal stateTax { get; set; }
@AuraEnabled public Decimal earlyWithdrawalPenalty { get; set; }
@AuraEnabled public Decimal totalTax { get; set; }
@AuraEnabled public Decimal netAmount { get; set; }
}
}

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>59.0</apiVersion>
<status>Active</status>
</ApexClass>

View File

@@ -0,0 +1,31 @@
.blackroad-header {
background: linear-gradient(135deg, #000000 0%, #1a1a2e 100%);
color: white;
border-radius: 8px;
margin-bottom: 1rem;
}
.blackroad-header .slds-page-header__title {
color: #F5A623;
}
.blackroad-header .slds-page-header__meta-text {
color: #ffffff;
}
.stat-number {
font-size: 2.5rem;
font-weight: bold;
color: #F5A623;
line-height: 1.2;
}
.stat-label {
font-size: 0.875rem;
color: #706e6b;
margin-top: 0.25rem;
}
lightning-card {
--slds-c-card-radius-border: 8px;
}

View File

@@ -0,0 +1,129 @@
<template>
<div class="slds-page-header blackroad-header">
<div class="slds-page-header__row">
<div class="slds-page-header__col-title">
<div class="slds-media">
<div class="slds-media__figure">
<lightning-icon icon-name="custom:custom9" size="large"></lightning-icon>
</div>
<div class="slds-media__body">
<h1 class="slds-page-header__title">BlackRoad OS Hub</h1>
<p class="slds-page-header__meta-text">CRM Command Center</p>
</div>
</div>
</div>
</div>
</div>
<!-- Stats Cards -->
<div class="slds-grid slds-gutters slds-m-top_medium">
<div class="slds-col slds-size_1-of-4">
<lightning-card title="Connected CRMs" icon-name="standard:connected_apps">
<div class="slds-p-horizontal_medium">
<p class="stat-number">{stats.activeCRMs} / {stats.totalCRMs}</p>
<p class="stat-label">Active</p>
</div>
</lightning-card>
</div>
<div class="slds-col slds-size_1-of-4">
<lightning-card title="Total Households" icon-name="standard:household">
<div class="slds-p-horizontal_medium">
<p class="stat-number">{stats.totalHouseholds}</p>
<p class="stat-label">Client Households</p>
</div>
</lightning-card>
</div>
<div class="slds-col slds-size_1-of-4">
<lightning-card title="Total AUM" icon-name="standard:currency">
<div class="slds-p-horizontal_medium">
<p class="stat-number">{formattedAUM}</p>
<p class="stat-label">Assets Under Management</p>
</div>
</lightning-card>
</div>
<div class="slds-col slds-size_1-of-4">
<lightning-card title="Pending Actions" icon-name="standard:task">
<div class="slds-p-horizontal_medium">
<p class="stat-number">{totalPending}</p>
<p class="stat-label">Distributions / Events</p>
</div>
</lightning-card>
</div>
</div>
<!-- Main Content Grid -->
<div class="slds-grid slds-gutters slds-m-top_medium">
<!-- Connected CRMs -->
<div class="slds-col slds-size_1-of-2">
<lightning-card title="Connected CRMs" icon-name="standard:connected_apps">
<lightning-button slot="actions" label="Add CRM" onclick={handleAddCRM}></lightning-button>
<template if:true={connectedCRMs}>
<lightning-datatable
key-field="Id"
data={connectedCRMs}
columns={crmColumns}
hide-checkbox-column
onrowaction={handleCRMAction}>
</lightning-datatable>
</template>
<template if:false={connectedCRMs}>
<div class="slds-p-around_medium slds-text-align_center">
<p>No CRMs connected yet.</p>
</div>
</template>
</lightning-card>
</div>
<!-- CRM Products -->
<div class="slds-col slds-size_1-of-2">
<lightning-card title="CRM Products" icon-name="standard:product">
<template if:true={crmProducts}>
<ul class="slds-has-dividers_bottom-space">
<template for:each={crmProducts} for:item="product">
<li key={product.Id} class="slds-item slds-p-around_small">
<div class="slds-grid slds-grid_vertical-align-center">
<div class="slds-col slds-grow">
<p class="slds-text-heading_small">{product.Name}</p>
<p class="slds-text-body_small slds-text-color_weak">{product.Target_Vertical__c}</p>
</div>
<div class="slds-col">
<lightning-badge label={product.Version__c}></lightning-badge>
</div>
</div>
</li>
</template>
</ul>
</template>
</lightning-card>
</div>
</div>
<!-- Households Needing Attention -->
<div class="slds-m-top_medium">
<lightning-card title="Households Needing Attention" icon-name="standard:warning">
<template if:true={householdsNeedingAttention}>
<lightning-datatable
key-field="Id"
data={householdsNeedingAttention}
columns={householdColumns}
hide-checkbox-column
onrowaction={handleHouseholdAction}>
</lightning-datatable>
</template>
</lightning-card>
</div>
<!-- Recent Compliance Activity -->
<div class="slds-m-top_medium">
<lightning-card title="Recent Compliance Activity" icon-name="standard:logging">
<template if:true={complianceLogs}>
<lightning-datatable
key-field="Id"
data={complianceLogs}
columns={logColumns}
hide-checkbox-column>
</lightning-datatable>
</template>
</lightning-card>
</div>
</template>

View File

@@ -0,0 +1,179 @@
import { LightningElement, wire, track } from 'lwc';
import { NavigationMixin } from 'lightning/navigation';
import getConnectedCRMs from '@salesforce/apex/BlackRoadHubController.getConnectedCRMs';
import getCRMProducts from '@salesforce/apex/BlackRoadHubController.getCRMProducts';
import getHubStats from '@salesforce/apex/BlackRoadHubController.getHubStats';
import getHouseholdsNeedingAttention from '@salesforce/apex/BlackRoadHubController.getHouseholdsNeedingAttention';
import getRecentComplianceLogs from '@salesforce/apex/BlackRoadHubController.getRecentComplianceLogs';
import syncCRM from '@salesforce/apex/BlackRoadHubController.syncCRM';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
export default class BlackroadHubDashboard extends NavigationMixin(LightningElement) {
@track stats = {};
@track connectedCRMs = [];
@track crmProducts = [];
@track householdsNeedingAttention = [];
@track complianceLogs = [];
crmColumns = [
{ label: 'Name', fieldName: 'Name', type: 'text' },
{ label: 'Type', fieldName: 'CRM_Type__c', type: 'text' },
{ label: 'Status', fieldName: 'Status__c', type: 'text' },
{ label: 'Vertical', fieldName: 'Vertical__c', type: 'text' },
{ label: 'Records', fieldName: 'Record_Count__c', type: 'number' },
{
type: 'action',
typeAttributes: { rowActions: [
{ label: 'Sync', name: 'sync' },
{ label: 'View', name: 'view' }
]}
}
];
householdColumns = [
{ label: 'Household', fieldName: 'Name', type: 'text' },
{ label: 'AUM', fieldName: 'Total_AUM__c', type: 'currency' },
{ label: 'Status', fieldName: 'Household_Status__c', type: 'text' },
{ label: 'Next Review', fieldName: 'Next_Review_Date__c', type: 'date' },
{
type: 'action',
typeAttributes: { rowActions: [
{ label: 'View', name: 'view' },
{ label: 'Schedule Review', name: 'schedule' }
]}
}
];
logColumns = [
{ label: 'Log #', fieldName: 'Name', type: 'text' },
{ label: 'Type', fieldName: 'Log_Type__c', type: 'text' },
{ label: 'Description', fieldName: 'Description__c', type: 'text' },
{ label: 'Date', fieldName: 'CreatedDate', type: 'date' }
];
@wire(getHubStats)
wiredStats({ error, data }) {
if (data) {
this.stats = data;
} else if (error) {
console.error('Error loading stats:', error);
}
}
@wire(getConnectedCRMs)
wiredCRMs({ error, data }) {
if (data) {
this.connectedCRMs = data;
} else if (error) {
console.error('Error loading CRMs:', error);
}
}
@wire(getCRMProducts)
wiredProducts({ error, data }) {
if (data) {
this.crmProducts = data;
} else if (error) {
console.error('Error loading products:', error);
}
}
@wire(getHouseholdsNeedingAttention)
wiredHouseholds({ error, data }) {
if (data) {
this.householdsNeedingAttention = data;
} else if (error) {
console.error('Error loading households:', error);
}
}
@wire(getRecentComplianceLogs, { recordLimit: 10 })
wiredLogs({ error, data }) {
if (data) {
this.complianceLogs = data;
} else if (error) {
console.error('Error loading logs:', error);
}
}
get formattedAUM() {
if (!this.stats.totalAUM) return '$0';
return new Intl.NumberFormat('en-US', {
style: 'currency',
currency: 'USD',
minimumFractionDigits: 0,
maximumFractionDigits: 0
}).format(this.stats.totalAUM);
}
get totalPending() {
return (this.stats.pendingDistributions || 0) +
(this.stats.activeMortalityEvents || 0) +
(this.stats.activeLiquidityEvents || 0);
}
handleAddCRM() {
this[NavigationMixin.Navigate]({
type: 'standard__objectPage',
attributes: {
objectApiName: 'Connected_CRM__c',
actionName: 'new'
}
});
}
handleCRMAction(event) {
const action = event.detail.action;
const row = event.detail.row;
if (action.name === 'sync') {
this.syncCRMInstance(row.Id);
} else if (action.name === 'view') {
this[NavigationMixin.Navigate]({
type: 'standard__recordPage',
attributes: {
recordId: row.Id,
objectApiName: 'Connected_CRM__c',
actionName: 'view'
}
});
}
}
handleHouseholdAction(event) {
const action = event.detail.action;
const row = event.detail.row;
if (action.name === 'view') {
this[NavigationMixin.Navigate]({
type: 'standard__recordPage',
attributes: {
recordId: row.Id,
objectApiName: 'Client_Household__c',
actionName: 'view'
}
});
}
}
async syncCRMInstance(crmId) {
try {
const result = await syncCRM({ crmId: crmId });
this.dispatchEvent(
new ShowToastEvent({
title: 'Success',
message: result,
variant: 'success'
})
);
} catch (error) {
this.dispatchEvent(
new ShowToastEvent({
title: 'Error',
message: error.body.message,
variant: 'error'
})
);
}
}
}

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>59.0</apiVersion>
<isExposed>true</isExposed>
<masterLabel>BlackRoad Hub Dashboard</masterLabel>
<description>Main dashboard for BlackRoad OS Hub - CRM Command Center</description>
<targets>
<target>lightning__AppPage</target>
<target>lightning__HomePage</target>
<target>lightning__Tab</target>
</targets>
</LightningComponentBundle>

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">
<deploymentStatus>Deployed</deploymentStatus>
<description>BlackRoad CRM Products/Solutions (Financial Advisor CRM, etc.)</description>
<enableActivities>true</enableActivities>
<enableHistory>true</enableHistory>
<enableReports>true</enableReports>
<label>CRM Product</label>
<nameField>
<label>Product Name</label>
<type>Text</type>
</nameField>
<pluralLabel>CRM Products</pluralLabel>
<sharingModel>ReadWrite</sharingModel>
</CustomObject>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Description__c</fullName>
<label>Description</label>
<type>LongTextArea</type>
<length>32768</length>
<visibleLines>5</visibleLines>
</CustomField>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Flows_Included__c</fullName>
<label>Flows Included</label>
<type>Number</type>
<precision>5</precision>
<scale>0</scale>
</CustomField>

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Objects_Included__c</fullName>
<label>Objects Included</label>
<type>MultiselectPicklist</type>
<visibleLines>5</visibleLines>
<valueSet>
<restricted>true</restricted>
<valueSetDefinition>
<sorted>false</sorted>
<value><fullName>Client Household</fullName><default>false</default><label>Client Household</label></value>
<value><fullName>Distribution Request</fullName><default>false</default><label>Distribution Request</label></value>
<value><fullName>Mortality Event</fullName><default>false</default><label>Mortality Event</label></value>
<value><fullName>Liquidity Event</fullName><default>false</default><label>Liquidity Event</label></value>
<value><fullName>Compliance Log</fullName><default>false</default><label>Compliance Log</label></value>
<value><fullName>Document Request</fullName><default>false</default><label>Document Request</label></value>
<value><fullName>Meeting</fullName><default>false</default><label>Meeting</label></value>
<value><fullName>Financial Account</fullName><default>false</default><label>Financial Account</label></value>
</valueSetDefinition>
</valueSet>
</CustomField>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Product_Code__c</fullName>
<label>Product Code</label>
<type>Text</type>
<length>50</length>
<unique>true</unique>
<externalId>true</externalId>
</CustomField>

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Target_Vertical__c</fullName>
<label>Target Vertical</label>
<type>Picklist</type>
<valueSet>
<restricted>true</restricted>
<valueSetDefinition>
<sorted>false</sorted>
<value><fullName>Financial Services</fullName><default>true</default><label>Financial Services</label></value>
<value><fullName>Healthcare</fullName><default>false</default><label>Healthcare</label></value>
<value><fullName>Real Estate</fullName><default>false</default><label>Real Estate</label></value>
<value><fullName>Insurance</fullName><default>false</default><label>Insurance</label></value>
<value><fullName>Legal</fullName><default>false</default><label>Legal</label></value>
</valueSetDefinition>
</valueSet>
</CustomField>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Version__c</fullName>
<label>Version</label>
<type>Text</type>
<length>20</length>
</CustomField>

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">
<deploymentStatus>Deployed</deploymentStatus>
<description>Client household for unified family view - Financial Advisor CRM</description>
<enableActivities>true</enableActivities>
<enableHistory>true</enableHistory>
<enableReports>true</enableReports>
<label>Client Household</label>
<nameField>
<label>Household Name</label>
<type>Text</type>
</nameField>
<pluralLabel>Client Households</pluralLabel>
<sharingModel>ReadWrite</sharingModel>
</CustomObject>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Annual_Fee__c</fullName>
<label>Annual Fee</label>
<type>Currency</type>
<precision>18</precision>
<scale>2</scale>
</CustomField>

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Household_Status__c</fullName>
<label>Household Status</label>
<type>Picklist</type>
<valueSet>
<restricted>true</restricted>
<valueSetDefinition>
<sorted>false</sorted>
<value><fullName>Active</fullName><default>true</default><label>Active</label></value>
<value><fullName>Prospect</fullName><default>false</default><label>Prospect</label></value>
<value><fullName>Inactive</fullName><default>false</default><label>Inactive</label></value>
<value><fullName>Deceased Primary</fullName><default>false</default><label>Deceased Primary</label></value>
</valueSetDefinition>
</valueSet>
</CustomField>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Last_Review_Date__c</fullName>
<label>Last Review Date</label>
<type>Date</type>
</CustomField>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Next_Review_Date__c</fullName>
<label>Next Review Date</label>
<type>Date</type>
</CustomField>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Primary_Contact__c</fullName>
<label>Primary Contact</label>
<type>Lookup</type>
<referenceTo>Contact</referenceTo>
<relationshipLabel>Primary Households</relationshipLabel>
<relationshipName>Primary_Households</relationshipName>
</CustomField>

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Risk_Tolerance__c</fullName>
<label>Risk Tolerance</label>
<type>Picklist</type>
<valueSet>
<restricted>true</restricted>
<valueSetDefinition>
<sorted>false</sorted>
<value><fullName>Conservative</fullName><default>false</default><label>Conservative</label></value>
<value><fullName>Moderately Conservative</fullName><default>false</default><label>Moderately Conservative</label></value>
<value><fullName>Moderate</fullName><default>true</default><label>Moderate</label></value>
<value><fullName>Moderately Aggressive</fullName><default>false</default><label>Moderately Aggressive</label></value>
<value><fullName>Aggressive</fullName><default>false</default><label>Aggressive</label></value>
</valueSetDefinition>
</valueSet>
</CustomField>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Secondary_Contact__c</fullName>
<label>Secondary Contact</label>
<type>Lookup</type>
<referenceTo>Contact</referenceTo>
<relationshipLabel>Secondary Households</relationshipLabel>
<relationshipName>Secondary_Households</relationshipName>
</CustomField>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Total_AUM__c</fullName>
<label>Total AUM</label>
<type>Currency</type>
<precision>18</precision>
<scale>2</scale>
</CustomField>

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">
<deploymentStatus>Deployed</deploymentStatus>
<description>FINRA-compliant audit trail for all client interactions</description>
<enableActivities>false</enableActivities>
<enableHistory>false</enableHistory>
<enableReports>true</enableReports>
<label>Compliance Log</label>
<nameField>
<displayFormat>LOG-{000000}</displayFormat>
<label>Log Number</label>
<type>AutoNumber</type>
</nameField>
<pluralLabel>Compliance Logs</pluralLabel>
<sharingModel>ReadWrite</sharingModel>
</CustomObject>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Auto_Generated__c</fullName>
<label>Auto Generated</label>
<type>Checkbox</type>
<defaultValue>false</defaultValue>
</CustomField>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Description__c</fullName>
<label>Description</label>
<type>LongTextArea</type>
<length>32768</length>
<visibleLines>4</visibleLines>
</CustomField>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Household__c</fullName>
<label>Household</label>
<type>Lookup</type>
<referenceTo>Client_Household__c</referenceTo>
<relationshipLabel>Compliance Logs</relationshipLabel>
<relationshipName>Compliance_Logs</relationshipName>
</CustomField>

View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Log_Type__c</fullName>
<label>Log Type</label>
<type>Picklist</type>
<valueSet>
<restricted>true</restricted>
<valueSetDefinition>
<sorted>false</sorted>
<value><fullName>Phone Call</fullName><default>false</default><label>Phone Call</label></value>
<value><fullName>Email</fullName><default>false</default><label>Email</label></value>
<value><fullName>Meeting</fullName><default>false</default><label>Meeting</label></value>
<value><fullName>Document Sent</fullName><default>false</default><label>Document Sent</label></value>
<value><fullName>Document Received</fullName><default>false</default><label>Document Received</label></value>
<value><fullName>Trade Executed</fullName><default>false</default><label>Trade Executed</label></value>
<value><fullName>Distribution</fullName><default>false</default><label>Distribution</label></value>
<value><fullName>Account Change</fullName><default>false</default><label>Account Change</label></value>
<value><fullName>Compliance Review</fullName><default>false</default><label>Compliance Review</label></value>
<value><fullName>Disclosure</fullName><default>false</default><label>Disclosure</label></value>
</valueSetDefinition>
</valueSet>
</CustomField>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Logged_By__c</fullName>
<label>Logged By</label>
<type>Lookup</type>
<referenceTo>User</referenceTo>
<relationshipLabel>Compliance Logs</relationshipLabel>
<relationshipName>Compliance_Logs</relationshipName>
</CustomField>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Related_Record_ID__c</fullName>
<label>Related Record ID</label>
<type>Text</type>
<length>18</length>
</CustomField>

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">
<deploymentStatus>Deployed</deploymentStatus>
<description>Connected CRM instances managed by BlackRoad OS Hub</description>
<enableActivities>true</enableActivities>
<enableHistory>true</enableHistory>
<enableReports>true</enableReports>
<label>Connected CRM</label>
<nameField>
<label>CRM Name</label>
<type>Text</type>
</nameField>
<pluralLabel>Connected CRMs</pluralLabel>
<sharingModel>ReadWrite</sharingModel>
</CustomObject>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>API_Endpoint__c</fullName>
<label>API Endpoint</label>
<type>Url</type>
</CustomField>

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>CRM_Type__c</fullName>
<label>CRM Type</label>
<type>Picklist</type>
<valueSet>
<restricted>true</restricted>
<valueSetDefinition>
<sorted>false</sorted>
<value><fullName>Salesforce FSC</fullName><default>false</default><label>Salesforce FSC</label></value>
<value><fullName>SuiteCRM</fullName><default>false</default><label>SuiteCRM</label></value>
<value><fullName>EspoCRM</fullName><default>false</default><label>EspoCRM</label></value>
<value><fullName>HubSpot</fullName><default>false</default><label>HubSpot</label></value>
<value><fullName>Pipedrive</fullName><default>false</default><label>Pipedrive</label></value>
<value><fullName>Custom</fullName><default>false</default><label>Custom</label></value>
</valueSetDefinition>
</valueSet>
</CustomField>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Instance_URL__c</fullName>
<label>Instance URL</label>
<type>Url</type>
</CustomField>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Last_Sync__c</fullName>
<label>Last Sync</label>
<type>DateTime</type>
</CustomField>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Record_Count__c</fullName>
<label>Record Count</label>
<type>Number</type>
<precision>18</precision>
<scale>0</scale>
</CustomField>

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Status__c</fullName>
<label>Status</label>
<type>Picklist</type>
<valueSet>
<restricted>true</restricted>
<valueSetDefinition>
<sorted>false</sorted>
<value><fullName>Active</fullName><default>true</default><label>Active</label></value>
<value><fullName>Inactive</fullName><default>false</default><label>Inactive</label></value>
<value><fullName>Syncing</fullName><default>false</default><label>Syncing</label></value>
<value><fullName>Error</fullName><default>false</default><label>Error</label></value>
</valueSetDefinition>
</valueSet>
</CustomField>

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Vertical__c</fullName>
<label>Industry Vertical</label>
<type>Picklist</type>
<valueSet>
<restricted>true</restricted>
<valueSetDefinition>
<sorted>false</sorted>
<value><fullName>Financial Services</fullName><default>true</default><label>Financial Services</label></value>
<value><fullName>Healthcare</fullName><default>false</default><label>Healthcare</label></value>
<value><fullName>Real Estate</fullName><default>false</default><label>Real Estate</label></value>
<value><fullName>Insurance</fullName><default>false</default><label>Insurance</label></value>
<value><fullName>Legal</fullName><default>false</default><label>Legal</label></value>
<value><fullName>General</fullName><default>false</default><label>General</label></value>
</valueSetDefinition>
</valueSet>
</CustomField>

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">
<deploymentStatus>Deployed</deploymentStatus>
<description>Distribution/withdrawal requests with compliance tracking</description>
<enableActivities>true</enableActivities>
<enableHistory>true</enableHistory>
<enableReports>true</enableReports>
<label>Distribution Request</label>
<nameField>
<displayFormat>DIST-{0000}</displayFormat>
<label>Request Number</label>
<type>AutoNumber</type>
</nameField>
<pluralLabel>Distribution Requests</pluralLabel>
<sharingModel>ReadWrite</sharingModel>
</CustomObject>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Compliance_Notes__c</fullName>
<label>Compliance Notes</label>
<type>LongTextArea</type>
<length>32768</length>
<visibleLines>3</visibleLines>
</CustomField>

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Delivery_Method__c</fullName>
<label>Delivery Method</label>
<type>Picklist</type>
<valueSet>
<restricted>true</restricted>
<valueSetDefinition>
<sorted>false</sorted>
<value><fullName>ACH</fullName><default>true</default><label>ACH (2-3 days)</label></value>
<value><fullName>Wire</fullName><default>false</default><label>Wire (same day, $25 fee)</label></value>
<value><fullName>Check - Standard</fullName><default>false</default><label>Check - Standard Mail</label></value>
<value><fullName>Check - Overnight</fullName><default>false</default><label>Check - Overnight ($30 fee)</label></value>
</valueSetDefinition>
</valueSet>
</CustomField>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Federal_Withholding__c</fullName>
<label>Federal Withholding %</label>
<type>Percent</type>
<precision>5</precision>
<scale>2</scale>
</CustomField>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Gross_Amount__c</fullName>
<label>Gross Amount</label>
<type>Currency</type>
<precision>18</precision>
<scale>2</scale>
</CustomField>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Household__c</fullName>
<label>Household</label>
<type>Lookup</type>
<referenceTo>Client_Household__c</referenceTo>
<relationshipLabel>Distribution Requests</relationshipLabel>
<relationshipName>Distribution_Requests</relationshipName>
</CustomField>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Net_Amount__c</fullName>
<label>Net Amount</label>
<type>Currency</type>
<precision>18</precision>
<scale>2</scale>
<formula>Gross_Amount__c * (1 - BLANKVALUE(Federal_Withholding__c, 0) - BLANKVALUE(State_Withholding__c, 0))</formula>
</CustomField>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Reason__c</fullName>
<label>Reason</label>
<type>TextArea</type>
</CustomField>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Source_Account__c</fullName>
<label>Source Account</label>
<type>Lookup</type>
<referenceTo>Financial_Account__c</referenceTo>
<relationshipLabel>Distributions</relationshipLabel>
<relationshipName>Distributions</relationshipName>
</CustomField>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>State_Withholding__c</fullName>
<label>State Withholding %</label>
<type>Percent</type>
<precision>5</precision>
<scale>2</scale>
</CustomField>

View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Status__c</fullName>
<label>Status</label>
<type>Picklist</type>
<valueSet>
<restricted>true</restricted>
<valueSetDefinition>
<sorted>false</sorted>
<value><fullName>Draft</fullName><default>true</default><label>Draft</label></value>
<value><fullName>Pending Signature</fullName><default>false</default><label>Pending Signature</label></value>
<value><fullName>Pending Compliance</fullName><default>false</default><label>Pending Compliance</label></value>
<value><fullName>Approved</fullName><default>false</default><label>Approved</label></value>
<value><fullName>Processing</fullName><default>false</default><label>Processing</label></value>
<value><fullName>Completed</fullName><default>false</default><label>Completed</label></value>
<value><fullName>Rejected</fullName><default>false</default><label>Rejected</label></value>
</valueSetDefinition>
</valueSet>
</CustomField>

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Urgency__c</fullName>
<label>Urgency</label>
<type>Picklist</type>
<valueSet>
<restricted>true</restricted>
<valueSetDefinition>
<sorted>false</sorted>
<value><fullName>Standard</fullName><default>true</default><label>Standard</label></value>
<value><fullName>Expedited</fullName><default>false</default><label>Expedited</label></value>
<value><fullName>Emergency</fullName><default>false</default><label>Emergency (Mortality/Hardship)</label></value>
</valueSetDefinition>
</valueSet>
</CustomField>

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">
<deploymentStatus>Deployed</deploymentStatus>
<description>Individual financial accounts - IRA, brokerage, annuity, etc.</description>
<enableActivities>true</enableActivities>
<enableHistory>true</enableHistory>
<enableReports>true</enableReports>
<label>Financial Account</label>
<nameField>
<label>Account Name</label>
<type>Text</type>
</nameField>
<pluralLabel>Financial Accounts</pluralLabel>
<sharingModel>ReadWrite</sharingModel>
</CustomObject>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Account_Number_Masked__c</fullName>
<label>Account Number</label>
<type>Text</type>
<length>20</length>
</CustomField>

View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Account_Type__c</fullName>
<label>Account Type</label>
<type>Picklist</type>
<valueSet>
<restricted>true</restricted>
<valueSetDefinition>
<sorted>false</sorted>
<value><fullName>Traditional IRA</fullName><default>false</default><label>Traditional IRA</label></value>
<value><fullName>Roth IRA</fullName><default>false</default><label>Roth IRA</label></value>
<value><fullName>401(k)</fullName><default>false</default><label>401(k)</label></value>
<value><fullName>403(b)</fullName><default>false</default><label>403(b)</label></value>
<value><fullName>Individual Brokerage</fullName><default>false</default><label>Individual Brokerage</label></value>
<value><fullName>Joint Brokerage</fullName><default>false</default><label>Joint Brokerage</label></value>
<value><fullName>Trust</fullName><default>false</default><label>Trust</label></value>
<value><fullName>Annuity</fullName><default>false</default><label>Annuity</label></value>
<value><fullName>529 Plan</fullName><default>false</default><label>529 Plan</label></value>
<value><fullName>External</fullName><default>false</default><label>External (Aggregated)</label></value>
</valueSetDefinition>
</valueSet>
</CustomField>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Current_Value__c</fullName>
<label>Current Value</label>
<type>Currency</type>
<precision>18</precision>
<scale>2</scale>
</CustomField>

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Custodian__c</fullName>
<label>Custodian</label>
<type>Picklist</type>
<valueSet>
<restricted>true</restricted>
<valueSetDefinition>
<sorted>false</sorted>
<value><fullName>Ameriprise</fullName><default>true</default><label>Ameriprise</label></value>
<value><fullName>Fidelity</fullName><default>false</default><label>Fidelity</label></value>
<value><fullName>Schwab</fullName><default>false</default><label>Schwab</label></value>
<value><fullName>Vanguard</fullName><default>false</default><label>Vanguard</label></value>
<value><fullName>TD Ameritrade</fullName><default>false</default><label>TD Ameritrade</label></value>
<value><fullName>Other</fullName><default>false</default><label>Other</label></value>
</valueSetDefinition>
</valueSet>
</CustomField>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Household__c</fullName>
<label>Household</label>
<type>Lookup</type>
<referenceTo>Client_Household__c</referenceTo>
<relationshipLabel>Financial Accounts</relationshipLabel>
<relationshipName>Financial_Accounts</relationshipName>
</CustomField>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Is_Liquid__c</fullName>
<label>Is Liquid</label>
<type>Checkbox</type>
<defaultValue>true</defaultValue>
</CustomField>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Primary_Beneficiary__c</fullName>
<label>Primary Beneficiary</label>
<type>Text</type>
<length>255</length>
</CustomField>

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Registration__c</fullName>
<label>Registration/Title</label>
<type>Picklist</type>
<valueSet>
<restricted>true</restricted>
<valueSetDefinition>
<sorted>false</sorted>
<value><fullName>Individual</fullName><default>false</default><label>Individual</label></value>
<value><fullName>JTWROS</fullName><default>false</default><label>Joint Tenants (JTWROS)</label></value>
<value><fullName>TIC</fullName><default>false</default><label>Tenants in Common (TIC)</label></value>
<value><fullName>Community Property</fullName><default>false</default><label>Community Property</label></value>
<value><fullName>Trust</fullName><default>false</default><label>Trust</label></value>
<value><fullName>TOD</fullName><default>false</default><label>Transfer on Death (TOD)</label></value>
</valueSetDefinition>
</valueSet>
</CustomField>

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">
<deploymentStatus>Deployed</deploymentStatus>
<description>Business sales, large asset transfers, and liquidity events</description>
<enableActivities>true</enableActivities>
<enableHistory>true</enableHistory>
<enableReports>true</enableReports>
<label>Liquidity Event</label>
<nameField>
<displayFormat>LIQ-{0000}</displayFormat>
<label>Event Number</label>
<type>AutoNumber</type>
</nameField>
<pluralLabel>Liquidity Events</pluralLabel>
<sharingModel>ReadWrite</sharingModel>
</CustomObject>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Estimated_Tax__c</fullName>
<label>Estimated Tax</label>
<type>Currency</type>
<precision>18</precision>
<scale>2</scale>
</CustomField>

View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Event_Type__c</fullName>
<label>Event Type</label>
<type>Picklist</type>
<valueSet>
<restricted>true</restricted>
<valueSetDefinition>
<sorted>false</sorted>
<value><fullName>Business Sale</fullName><default>false</default><label>Business Sale</label></value>
<value><fullName>Real Estate Sale</fullName><default>false</default><label>Real Estate Sale</label></value>
<value><fullName>Inheritance</fullName><default>false</default><label>Inheritance</label></value>
<value><fullName>Stock Options/RSU</fullName><default>false</default><label>Stock Options/RSU</label></value>
<value><fullName>Pension Lump Sum</fullName><default>false</default><label>Pension Lump Sum</label></value>
<value><fullName>Legal Settlement</fullName><default>false</default><label>Legal Settlement</label></value>
<value><fullName>Other</fullName><default>false</default><label>Other</label></value>
</valueSetDefinition>
</valueSet>
</CustomField>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Expected_Close_Date__c</fullName>
<label>Expected Close Date</label>
<type>Date</type>
</CustomField>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Gross_Proceeds__c</fullName>
<label>Gross Proceeds</label>
<type>Currency</type>
<precision>18</precision>
<scale>2</scale>
</CustomField>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Household__c</fullName>
<label>Household</label>
<type>Lookup</type>
<referenceTo>Client_Household__c</referenceTo>
<relationshipLabel>Liquidity Events</relationshipLabel>
<relationshipName>Liquidity_Events</relationshipName>
</CustomField>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Net_Proceeds__c</fullName>
<label>Net Proceeds</label>
<type>Currency</type>
<precision>18</precision>
<scale>2</scale>
</CustomField>

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>QSBS_Eligible__c</fullName>
<label>QSBS Eligible</label>
<type>Picklist</type>
<valueSet>
<restricted>true</restricted>
<valueSetDefinition>
<sorted>false</sorted>
<value><fullName>Unknown</fullName><default>true</default><label>Unknown</label></value>
<value><fullName>Yes - Verified</fullName><default>false</default><label>Yes - Verified</label></value>
<value><fullName>No</fullName><default>false</default><label>No</label></value>
<value><fullName>Pending Review</fullName><default>false</default><label>Pending Review</label></value>
</valueSetDefinition>
</valueSet>
</CustomField>

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Status__c</fullName>
<label>Status</label>
<type>Picklist</type>
<valueSet>
<restricted>true</restricted>
<valueSetDefinition>
<sorted>false</sorted>
<value><fullName>Planning</fullName><default>true</default><label>Planning</label></value>
<value><fullName>LOI Signed</fullName><default>false</default><label>LOI Signed</label></value>
<value><fullName>Due Diligence</fullName><default>false</default><label>Due Diligence</label></value>
<value><fullName>Closing</fullName><default>false</default><label>Closing</label></value>
<value><fullName>Closed - Funds Received</fullName><default>false</default><label>Closed - Funds Received</label></value>
<value><fullName>Post-Close Planning</fullName><default>false</default><label>Post-Close Planning</label></value>
</valueSetDefinition>
</valueSet>
</CustomField>

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">
<deploymentStatus>Deployed</deploymentStatus>
<description>Death/estate processing workflow with beneficiary tracking</description>
<enableActivities>true</enableActivities>
<enableHistory>true</enableHistory>
<enableReports>true</enableReports>
<label>Mortality Event</label>
<nameField>
<displayFormat>MORT-{0000}</displayFormat>
<label>Event Number</label>
<type>AutoNumber</type>
</nameField>
<pluralLabel>Mortality Events</pluralLabel>
<sharingModel>ReadWrite</sharingModel>
</CustomObject>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Date_of_Death__c</fullName>
<label>Date of Death</label>
<type>Date</type>
</CustomField>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Death_Certificate_Received__c</fullName>
<label>Death Certificate Received</label>
<type>Checkbox</type>
<defaultValue>false</defaultValue>
</CustomField>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Deceased_Contact__c</fullName>
<label>Deceased</label>
<type>Lookup</type>
<referenceTo>Contact</referenceTo>
<relationshipLabel>Mortality Events (Deceased)</relationshipLabel>
<relationshipName>Mortality_Events_Deceased</relationshipName>
</CustomField>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Estate_Attorney__c</fullName>
<label>Estate Attorney</label>
<type>Text</type>
<length>255</length>
</CustomField>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Executor_Contact__c</fullName>
<label>Executor Contact</label>
<type>Lookup</type>
<referenceTo>Contact</referenceTo>
<relationshipLabel>Mortality Events (Executor)</relationshipLabel>
<relationshipName>Mortality_Events_Executor</relationshipName>
</CustomField>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Executor_Name__c</fullName>
<label>Executor Name</label>
<type>Text</type>
<length>255</length>
</CustomField>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Household__c</fullName>
<label>Household</label>
<type>Lookup</type>
<referenceTo>Client_Household__c</referenceTo>
<relationshipLabel>Mortality Events</relationshipLabel>
<relationshipName>Mortality_Events</relationshipName>
</CustomField>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Probate_Required__c</fullName>
<label>Probate Required</label>
<type>Checkbox</type>
<defaultValue>false</defaultValue>
</CustomField>

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Status__c</fullName>
<label>Status</label>
<type>Picklist</type>
<valueSet>
<restricted>true</restricted>
<valueSetDefinition>
<sorted>false</sorted>
<value><fullName>Reported</fullName><default>true</default><label>Reported</label></value>
<value><fullName>Documents Gathering</fullName><default>false</default><label>Documents Gathering</label></value>
<value><fullName>Beneficiary Claims Filed</fullName><default>false</default><label>Beneficiary Claims Filed</label></value>
<value><fullName>Pending Probate</fullName><default>false</default><label>Pending Probate</label></value>
<value><fullName>Distributions Processing</fullName><default>false</default><label>Distributions Processing</label></value>
<value><fullName>Completed</fullName><default>false</default><label>Completed</label></value>
</valueSetDefinition>
</valueSet>
</CustomField>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Surviving_Spouse__c</fullName>
<label>Surviving Spouse</label>
<type>Lookup</type>
<referenceTo>Contact</referenceTo>
<relationshipLabel>Mortality Events (Surviving)</relationshipLabel>
<relationshipName>Mortality_Events_Surviving</relationshipName>
</CustomField>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>Total_Estate_Value__c</fullName>
<label>Total Estate Value</label>
<type>Currency</type>
<precision>18</precision>
<scale>2</scale>
</CustomField>

View File

@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<PermissionSet xmlns="http://soap.sforce.com/2006/04/metadata">
<description>Full access to BlackRoad OS Hub</description>
<hasActivationRequired>false</hasActivationRequired>
<label>BlackRoad Hub Admin</label>
<objectPermissions>
<allowCreate>true</allowCreate>
<allowDelete>true</allowDelete>
<allowEdit>true</allowEdit>
<allowRead>true</allowRead>
<modifyAllRecords>true</modifyAllRecords>
<object>Connected_CRM__c</object>
<viewAllRecords>true</viewAllRecords>
</objectPermissions>
<objectPermissions>
<allowCreate>true</allowCreate>
<allowDelete>true</allowDelete>
<allowEdit>true</allowEdit>
<allowRead>true</allowRead>
<modifyAllRecords>true</modifyAllRecords>
<object>CRM_Product__c</object>
<viewAllRecords>true</viewAllRecords>
</objectPermissions>
<objectPermissions>
<allowCreate>true</allowCreate>
<allowDelete>true</allowDelete>
<allowEdit>true</allowEdit>
<allowRead>true</allowRead>
<modifyAllRecords>true</modifyAllRecords>
<object>Client_Household__c</object>
<viewAllRecords>true</viewAllRecords>
</objectPermissions>
<objectPermissions>
<allowCreate>true</allowCreate>
<allowDelete>true</allowDelete>
<allowEdit>true</allowEdit>
<allowRead>true</allowRead>
<modifyAllRecords>true</modifyAllRecords>
<object>Financial_Account__c</object>
<viewAllRecords>true</viewAllRecords>
</objectPermissions>
<objectPermissions>
<allowCreate>true</allowCreate>
<allowDelete>true</allowDelete>
<allowEdit>true</allowEdit>
<allowRead>true</allowRead>
<modifyAllRecords>true</modifyAllRecords>
<object>Distribution_Request__c</object>
<viewAllRecords>true</viewAllRecords>
</objectPermissions>
<objectPermissions>
<allowCreate>true</allowCreate>
<allowDelete>true</allowDelete>
<allowEdit>true</allowEdit>
<allowRead>true</allowRead>
<modifyAllRecords>true</modifyAllRecords>
<object>Mortality_Event__c</object>
<viewAllRecords>true</viewAllRecords>
</objectPermissions>
<objectPermissions>
<allowCreate>true</allowCreate>
<allowDelete>true</allowDelete>
<allowEdit>true</allowEdit>
<allowRead>true</allowRead>
<modifyAllRecords>true</modifyAllRecords>
<object>Liquidity_Event__c</object>
<viewAllRecords>true</viewAllRecords>
</objectPermissions>
<objectPermissions>
<allowCreate>true</allowCreate>
<allowDelete>false</allowDelete>
<allowEdit>true</allowEdit>
<allowRead>true</allowRead>
<modifyAllRecords>false</modifyAllRecords>
<object>Compliance_Log__c</object>
<viewAllRecords>true</viewAllRecords>
</objectPermissions>
</PermissionSet>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomTab xmlns="http://soap.sforce.com/2006/04/metadata">
<customObject>true</customObject>
<motif>Custom50: Gears</motif>
</CustomTab>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomTab xmlns="http://soap.sforce.com/2006/04/metadata">
<customObject>true</customObject>
<motif>Custom24: House</motif>
</CustomTab>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomTab xmlns="http://soap.sforce.com/2006/04/metadata">
<customObject>true</customObject>
<motif>Custom18: Clipboard</motif>
</CustomTab>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomTab xmlns="http://soap.sforce.com/2006/04/metadata">
<customObject>true</customObject>
<motif>Custom66: Globe</motif>
</CustomTab>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomTab xmlns="http://soap.sforce.com/2006/04/metadata">
<customObject>true</customObject>
<motif>Custom20: Form</motif>
</CustomTab>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomTab xmlns="http://soap.sforce.com/2006/04/metadata">
<customObject>true</customObject>
<motif>Custom12: Treasure Chest</motif>
</CustomTab>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomTab xmlns="http://soap.sforce.com/2006/04/metadata">
<customObject>true</customObject>
<motif>Custom16: Bank</motif>
</CustomTab>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomTab xmlns="http://soap.sforce.com/2006/04/metadata">
<customObject>true</customObject>
<motif>Custom64: Scales</motif>
</CustomTab>

15
package.json Normal file
View File

@@ -0,0 +1,15 @@
{
"name": "blackroad-salesforce-hub",
"version": "1.0.0",
"description": "BlackRoad OS Hub - Meta-CRM Platform",
"scripts": {
"deploy": "sf project deploy start",
"retrieve": "sf project retrieve start",
"create-scratch": "sf org create scratch -f config/project-scratch-def.json -a blackroad-hub",
"push": "sf project deploy start --target-org blackroad-hub",
"open": "sf org open --target-org blackroad-hub"
},
"devDependencies": {
"@salesforce/cli": "^2.0.0"
}
}

12
sfdx-project.json Normal file
View File

@@ -0,0 +1,12 @@
{
"packageDirectories": [
{
"path": "force-app",
"default": true
}
],
"name": "blackroad-os-hub",
"namespace": "",
"sfdcLoginUrl": "https://login.salesforce.com",
"sourceApiVersion": "59.0"
}