[{"data":1,"prerenderedAt":2829},["ShallowReactive",2],{"blog-raci-for-salesforce-data-governance":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"author":11,"tags":14,"image":18,"body":19,"_type":2823,"_id":2824,"_source":2825,"_file":2826,"_stem":2827,"_extension":2828},"\u002Fblog\u002Fraci-for-salesforce-data-governance","blog",false,"","RACI for Salesforce Data Governance","Unclear ownership is why Salesforce data quality problems never get resolved. Use the RACI framework to remove ambiguity around ownership.","2025-06-10",{"name":12,"title":13},"Joe Fusaro","Founder, Datachef",[15,16,17],"salesforce","data governance","data quality","\u002Fdatachef.png",{"type":20,"children":21,"toc":2815},"root",[22,30,35,42,75,79,85,118,123,162,167,172,333,338,343,349,354,899,905,910,1378,1384,1389,1811,1816,1822,1827,2707,2720,2726,2731,2775,2780,2783,2809],{"type":23,"tag":24,"props":25,"children":26},"element","p",{},[27],{"type":28,"value":29},"text","Finally ready to tackle data governance in Salesforce?",{"type":23,"tag":24,"props":31,"children":32},{},[33],{"type":28,"value":34},"Use this framework to define each person's or group's roles and responsibilities.",{"type":23,"tag":36,"props":37,"children":39},"h2",{"id":38},"table-of-contents",[40],{"type":28,"value":41},"Table of Contents",{"type":23,"tag":43,"props":44,"children":45},"ul",{},[46,57,66],{"type":23,"tag":47,"props":48,"children":49},"li",{},[50],{"type":23,"tag":51,"props":52,"children":54},"a",{"href":53},"#what-is-the-raci-framework",[55],{"type":28,"value":56},"What is the RACI framework?",{"type":23,"tag":47,"props":58,"children":59},{},[60],{"type":23,"tag":51,"props":61,"children":63},{"href":62},"#an-example-raci-framework-for-salesforce-data-governance",[64],{"type":28,"value":65},"An example RACI Framework for Salesforce Data Governance",{"type":23,"tag":47,"props":67,"children":68},{},[69],{"type":23,"tag":51,"props":70,"children":72},{"href":71},"#monitoring-data-governance-in-salesforce",[73],{"type":28,"value":74},"Monitoring Data Governance in Salesforce",{"type":23,"tag":76,"props":77,"children":78},"hr",{},[],{"type":23,"tag":80,"props":81,"children":83},"h1",{"id":82},"what-is-the-raci-framework",[84],{"type":28,"value":56},{"type":23,"tag":24,"props":86,"children":87},{},[88,90,96,98,103,104,109,111,116],{"type":28,"value":89},"The RACI framework is a project management tool that clarifies team roles and responsibilities by assigning each member or group one of four roles for each task or decision: ",{"type":23,"tag":91,"props":92,"children":93},"strong",{},[94],{"type":28,"value":95},"Responsible",{"type":28,"value":97},", ",{"type":23,"tag":91,"props":99,"children":100},{},[101],{"type":28,"value":102},"Accountable",{"type":28,"value":97},{"type":23,"tag":91,"props":105,"children":106},{},[107],{"type":28,"value":108},"Consulted",{"type":28,"value":110},", or ",{"type":23,"tag":91,"props":112,"children":113},{},[114],{"type":28,"value":115},"Informed",{"type":28,"value":117},".",{"type":23,"tag":24,"props":119,"children":120},{},[121],{"type":28,"value":122},"Having clear roles and responsibilities for different tables\u002Fobjects in Salesforce removes the ambiguity that typically comes along with data governance initiatives. Removing this ambiguity around ownership is the first step to actually solving this problem!",{"type":23,"tag":43,"props":124,"children":125},{},[126,135,144,153],{"type":23,"tag":47,"props":127,"children":128},{},[129,133],{"type":23,"tag":91,"props":130,"children":131},{},[132],{"type":28,"value":95},{"type":28,"value":134},": The person or people who do the work to complete the task. There should be at least one \"R\" for each task.",{"type":23,"tag":47,"props":136,"children":137},{},[138,142],{"type":23,"tag":91,"props":139,"children":140},{},[141],{"type":28,"value":102},{"type":28,"value":143},": The person who must ensure the work is done correctly: that the requirements are accurate and documented, and that the deliverable or task gets completed. This person has the final sign-off and there should only be one \"A\" per task.",{"type":23,"tag":47,"props":145,"children":146},{},[147,151],{"type":23,"tag":91,"props":148,"children":149},{},[150],{"type":28,"value":108},{"type":28,"value":152},": People whose opinions are sought before a decision or action is taken. This involves two-way communication.",{"type":23,"tag":47,"props":154,"children":155},{},[156,160],{"type":23,"tag":91,"props":157,"children":158},{},[159],{"type":28,"value":115},{"type":28,"value":161},": People who need to be kept up-to-date on progress, but are not involved in the decision-making or work. This is one-way communication.",{"type":23,"tag":80,"props":163,"children":165},{"id":164},"an-example-raci-framework-for-salesforce-data-governance",[166],{"type":28,"value":65},{"type":23,"tag":24,"props":168,"children":169},{},[170],{"type":28,"value":171},"This is a very simplistic example of a RACI framework for common Salesforce objects. Of course the roles and departments might be different in your case.",{"type":23,"tag":173,"props":174,"children":175},"table",{},[176,208],{"type":23,"tag":177,"props":178,"children":179},"thead",{},[180],{"type":23,"tag":181,"props":182,"children":183},"tr",{},[184,188,193,198,203],{"type":23,"tag":185,"props":186,"children":187},"th",{},[],{"type":23,"tag":185,"props":189,"children":190},{},[191],{"type":28,"value":192},"Marketing",{"type":23,"tag":185,"props":194,"children":195},{},[196],{"type":28,"value":197},"Sales",{"type":23,"tag":185,"props":199,"children":200},{},[201],{"type":28,"value":202},"IT",{"type":23,"tag":185,"props":204,"children":205},{},[206],{"type":28,"value":207},"Data Analysts",{"type":23,"tag":209,"props":210,"children":211},"tbody",{},[212,237,261,285,309],{"type":23,"tag":181,"props":213,"children":214},{},[215,221,225,229,233],{"type":23,"tag":216,"props":217,"children":218},"td",{},[219],{"type":28,"value":220},"Account",{"type":23,"tag":216,"props":222,"children":223},{},[224],{"type":28,"value":108},{"type":23,"tag":216,"props":226,"children":227},{},[228],{"type":28,"value":102},{"type":23,"tag":216,"props":230,"children":231},{},[232],{"type":28,"value":95},{"type":23,"tag":216,"props":234,"children":235},{},[236],{"type":28,"value":115},{"type":23,"tag":181,"props":238,"children":239},{},[240,245,249,253,257],{"type":23,"tag":216,"props":241,"children":242},{},[243],{"type":28,"value":244},"Opportunity",{"type":23,"tag":216,"props":246,"children":247},{},[248],{"type":28,"value":108},{"type":23,"tag":216,"props":250,"children":251},{},[252],{"type":28,"value":102},{"type":23,"tag":216,"props":254,"children":255},{},[256],{"type":28,"value":95},{"type":23,"tag":216,"props":258,"children":259},{},[260],{"type":28,"value":115},{"type":23,"tag":181,"props":262,"children":263},{},[264,269,273,277,281],{"type":23,"tag":216,"props":265,"children":266},{},[267],{"type":28,"value":268},"Contact",{"type":23,"tag":216,"props":270,"children":271},{},[272],{"type":28,"value":102},{"type":23,"tag":216,"props":274,"children":275},{},[276],{"type":28,"value":108},{"type":23,"tag":216,"props":278,"children":279},{},[280],{"type":28,"value":95},{"type":23,"tag":216,"props":282,"children":283},{},[284],{"type":28,"value":115},{"type":23,"tag":181,"props":286,"children":287},{},[288,293,297,301,305],{"type":23,"tag":216,"props":289,"children":290},{},[291],{"type":28,"value":292},"Lead",{"type":23,"tag":216,"props":294,"children":295},{},[296],{"type":28,"value":102},{"type":23,"tag":216,"props":298,"children":299},{},[300],{"type":28,"value":108},{"type":23,"tag":216,"props":302,"children":303},{},[304],{"type":28,"value":95},{"type":23,"tag":216,"props":306,"children":307},{},[308],{"type":28,"value":115},{"type":23,"tag":181,"props":310,"children":311},{},[312,317,321,325,329],{"type":23,"tag":216,"props":313,"children":314},{},[315],{"type":28,"value":316},"Campaign",{"type":23,"tag":216,"props":318,"children":319},{},[320],{"type":28,"value":102},{"type":23,"tag":216,"props":322,"children":323},{},[324],{"type":28,"value":115},{"type":23,"tag":216,"props":326,"children":327},{},[328],{"type":28,"value":95},{"type":23,"tag":216,"props":330,"children":331},{},[332],{"type":28,"value":108},{"type":23,"tag":80,"props":334,"children":336},{"id":335},"monitoring-data-governance-in-salesforce",[337],{"type":28,"value":74},{"type":23,"tag":24,"props":339,"children":340},{},[341],{"type":28,"value":342},"Documenting a RACI is a great start, but actively monitoring data health is crucial. In this next section, we'll give some examples of data governance data models that you can use in Datachef or in your data warehouse of choice to more actively monitor data governance.",{"type":23,"tag":36,"props":344,"children":346},{"id":345},"duplicate-leads-in-salesforce",[347],{"type":28,"value":348},"Duplicate Leads in Salesforce",{"type":23,"tag":24,"props":350,"children":351},{},[352],{"type":28,"value":353},"Two leads match when they share the same email address. The query below finds every such pair and includes both record IDs so a steward can review and merge.",{"type":23,"tag":355,"props":356,"children":360},"pre",{"className":357,"code":358,"language":359,"meta":7,"style":7},"language-sql shiki shiki-themes github-light github-dark","-- Duplicate Lead records in Salesforce (matched by email)\nSELECT\n  a.Id        AS lead_id_a,\n  a.FirstName AS first_name_a,\n  a.LastName  AS last_name_a,\n  a.Email,\n  a.CreatedDate AS created_a,\n  b.Id        AS lead_id_b,\n  b.FirstName AS first_name_b,\n  b.LastName  AS last_name_b,\n  b.CreatedDate AS created_b\nFROM Lead a\nJOIN Lead b\n  ON LOWER(a.Email) = LOWER(b.Email)\n AND a.Id \u003C b.Id               -- prevent mirror rows\n AND a.IsDeleted  = FALSE\n AND b.IsDeleted  = FALSE\n AND a.IsConverted = FALSE\n AND b.IsConverted = FALSE\nORDER BY a.Email\n","sql",[361],{"type":23,"tag":362,"props":363,"children":364},"code",{"__ignoreMap":7},[365,377,387,417,444,471,493,519,545,570,595,620,634,648,715,760,791,819,849,877],{"type":23,"tag":366,"props":367,"children":370},"span",{"class":368,"line":369},"line",1,[371],{"type":23,"tag":366,"props":372,"children":374},{"style":373},"--shiki-default:#6A737D;--shiki-dark:#6A737D",[375],{"type":28,"value":376},"-- Duplicate Lead records in Salesforce (matched by email)\n",{"type":23,"tag":366,"props":378,"children":380},{"class":368,"line":379},2,[381],{"type":23,"tag":366,"props":382,"children":384},{"style":383},"--shiki-default:#D73A49;--shiki-dark:#F97583",[385],{"type":28,"value":386},"SELECT\n",{"type":23,"tag":366,"props":388,"children":390},{"class":368,"line":389},3,[391,397,402,407,412],{"type":23,"tag":366,"props":392,"children":394},{"style":393},"--shiki-default:#005CC5;--shiki-dark:#79B8FF",[395],{"type":28,"value":396},"  a",{"type":23,"tag":366,"props":398,"children":400},{"style":399},"--shiki-default:#24292E;--shiki-dark:#E1E4E8",[401],{"type":28,"value":117},{"type":23,"tag":366,"props":403,"children":404},{"style":393},[405],{"type":28,"value":406},"Id",{"type":23,"tag":366,"props":408,"children":409},{"style":383},[410],{"type":28,"value":411},"        AS",{"type":23,"tag":366,"props":413,"children":414},{"style":399},[415],{"type":28,"value":416}," lead_id_a,\n",{"type":23,"tag":366,"props":418,"children":420},{"class":368,"line":419},4,[421,425,429,434,439],{"type":23,"tag":366,"props":422,"children":423},{"style":393},[424],{"type":28,"value":396},{"type":23,"tag":366,"props":426,"children":427},{"style":399},[428],{"type":28,"value":117},{"type":23,"tag":366,"props":430,"children":431},{"style":393},[432],{"type":28,"value":433},"FirstName",{"type":23,"tag":366,"props":435,"children":436},{"style":383},[437],{"type":28,"value":438}," AS",{"type":23,"tag":366,"props":440,"children":441},{"style":399},[442],{"type":28,"value":443}," first_name_a,\n",{"type":23,"tag":366,"props":445,"children":447},{"class":368,"line":446},5,[448,452,456,461,466],{"type":23,"tag":366,"props":449,"children":450},{"style":393},[451],{"type":28,"value":396},{"type":23,"tag":366,"props":453,"children":454},{"style":399},[455],{"type":28,"value":117},{"type":23,"tag":366,"props":457,"children":458},{"style":393},[459],{"type":28,"value":460},"LastName",{"type":23,"tag":366,"props":462,"children":463},{"style":383},[464],{"type":28,"value":465},"  AS",{"type":23,"tag":366,"props":467,"children":468},{"style":399},[469],{"type":28,"value":470}," last_name_a,\n",{"type":23,"tag":366,"props":472,"children":474},{"class":368,"line":473},6,[475,479,483,488],{"type":23,"tag":366,"props":476,"children":477},{"style":393},[478],{"type":28,"value":396},{"type":23,"tag":366,"props":480,"children":481},{"style":399},[482],{"type":28,"value":117},{"type":23,"tag":366,"props":484,"children":485},{"style":393},[486],{"type":28,"value":487},"Email",{"type":23,"tag":366,"props":489,"children":490},{"style":399},[491],{"type":28,"value":492},",\n",{"type":23,"tag":366,"props":494,"children":496},{"class":368,"line":495},7,[497,501,505,510,514],{"type":23,"tag":366,"props":498,"children":499},{"style":393},[500],{"type":28,"value":396},{"type":23,"tag":366,"props":502,"children":503},{"style":399},[504],{"type":28,"value":117},{"type":23,"tag":366,"props":506,"children":507},{"style":393},[508],{"type":28,"value":509},"CreatedDate",{"type":23,"tag":366,"props":511,"children":512},{"style":383},[513],{"type":28,"value":438},{"type":23,"tag":366,"props":515,"children":516},{"style":399},[517],{"type":28,"value":518}," created_a,\n",{"type":23,"tag":366,"props":520,"children":522},{"class":368,"line":521},8,[523,528,532,536,540],{"type":23,"tag":366,"props":524,"children":525},{"style":393},[526],{"type":28,"value":527},"  b",{"type":23,"tag":366,"props":529,"children":530},{"style":399},[531],{"type":28,"value":117},{"type":23,"tag":366,"props":533,"children":534},{"style":393},[535],{"type":28,"value":406},{"type":23,"tag":366,"props":537,"children":538},{"style":383},[539],{"type":28,"value":411},{"type":23,"tag":366,"props":541,"children":542},{"style":399},[543],{"type":28,"value":544}," lead_id_b,\n",{"type":23,"tag":366,"props":546,"children":548},{"class":368,"line":547},9,[549,553,557,561,565],{"type":23,"tag":366,"props":550,"children":551},{"style":393},[552],{"type":28,"value":527},{"type":23,"tag":366,"props":554,"children":555},{"style":399},[556],{"type":28,"value":117},{"type":23,"tag":366,"props":558,"children":559},{"style":393},[560],{"type":28,"value":433},{"type":23,"tag":366,"props":562,"children":563},{"style":383},[564],{"type":28,"value":438},{"type":23,"tag":366,"props":566,"children":567},{"style":399},[568],{"type":28,"value":569}," first_name_b,\n",{"type":23,"tag":366,"props":571,"children":573},{"class":368,"line":572},10,[574,578,582,586,590],{"type":23,"tag":366,"props":575,"children":576},{"style":393},[577],{"type":28,"value":527},{"type":23,"tag":366,"props":579,"children":580},{"style":399},[581],{"type":28,"value":117},{"type":23,"tag":366,"props":583,"children":584},{"style":393},[585],{"type":28,"value":460},{"type":23,"tag":366,"props":587,"children":588},{"style":383},[589],{"type":28,"value":465},{"type":23,"tag":366,"props":591,"children":592},{"style":399},[593],{"type":28,"value":594}," last_name_b,\n",{"type":23,"tag":366,"props":596,"children":598},{"class":368,"line":597},11,[599,603,607,611,615],{"type":23,"tag":366,"props":600,"children":601},{"style":393},[602],{"type":28,"value":527},{"type":23,"tag":366,"props":604,"children":605},{"style":399},[606],{"type":28,"value":117},{"type":23,"tag":366,"props":608,"children":609},{"style":393},[610],{"type":28,"value":509},{"type":23,"tag":366,"props":612,"children":613},{"style":383},[614],{"type":28,"value":438},{"type":23,"tag":366,"props":616,"children":617},{"style":399},[618],{"type":28,"value":619}," created_b\n",{"type":23,"tag":366,"props":621,"children":623},{"class":368,"line":622},12,[624,629],{"type":23,"tag":366,"props":625,"children":626},{"style":383},[627],{"type":28,"value":628},"FROM",{"type":23,"tag":366,"props":630,"children":631},{"style":399},[632],{"type":28,"value":633}," Lead a\n",{"type":23,"tag":366,"props":635,"children":637},{"class":368,"line":636},13,[638,643],{"type":23,"tag":366,"props":639,"children":640},{"style":383},[641],{"type":28,"value":642},"JOIN",{"type":23,"tag":366,"props":644,"children":645},{"style":399},[646],{"type":28,"value":647}," Lead b\n",{"type":23,"tag":366,"props":649,"children":651},{"class":368,"line":650},14,[652,657,662,667,671,675,679,684,689,693,697,702,706,710],{"type":23,"tag":366,"props":653,"children":654},{"style":383},[655],{"type":28,"value":656},"  ON",{"type":23,"tag":366,"props":658,"children":659},{"style":393},[660],{"type":28,"value":661}," LOWER",{"type":23,"tag":366,"props":663,"children":664},{"style":399},[665],{"type":28,"value":666},"(",{"type":23,"tag":366,"props":668,"children":669},{"style":393},[670],{"type":28,"value":51},{"type":23,"tag":366,"props":672,"children":673},{"style":399},[674],{"type":28,"value":117},{"type":23,"tag":366,"props":676,"children":677},{"style":393},[678],{"type":28,"value":487},{"type":23,"tag":366,"props":680,"children":681},{"style":399},[682],{"type":28,"value":683},") ",{"type":23,"tag":366,"props":685,"children":686},{"style":383},[687],{"type":28,"value":688},"=",{"type":23,"tag":366,"props":690,"children":691},{"style":393},[692],{"type":28,"value":661},{"type":23,"tag":366,"props":694,"children":695},{"style":399},[696],{"type":28,"value":666},{"type":23,"tag":366,"props":698,"children":699},{"style":393},[700],{"type":28,"value":701},"b",{"type":23,"tag":366,"props":703,"children":704},{"style":399},[705],{"type":28,"value":117},{"type":23,"tag":366,"props":707,"children":708},{"style":393},[709],{"type":28,"value":487},{"type":23,"tag":366,"props":711,"children":712},{"style":399},[713],{"type":28,"value":714},")\n",{"type":23,"tag":366,"props":716,"children":718},{"class":368,"line":717},15,[719,724,729,733,737,742,747,751,755],{"type":23,"tag":366,"props":720,"children":721},{"style":383},[722],{"type":28,"value":723}," AND",{"type":23,"tag":366,"props":725,"children":726},{"style":393},[727],{"type":28,"value":728}," a",{"type":23,"tag":366,"props":730,"children":731},{"style":399},[732],{"type":28,"value":117},{"type":23,"tag":366,"props":734,"children":735},{"style":393},[736],{"type":28,"value":406},{"type":23,"tag":366,"props":738,"children":739},{"style":383},[740],{"type":28,"value":741}," \u003C",{"type":23,"tag":366,"props":743,"children":744},{"style":393},[745],{"type":28,"value":746}," b",{"type":23,"tag":366,"props":748,"children":749},{"style":399},[750],{"type":28,"value":117},{"type":23,"tag":366,"props":752,"children":753},{"style":393},[754],{"type":28,"value":406},{"type":23,"tag":366,"props":756,"children":757},{"style":373},[758],{"type":28,"value":759},"               -- prevent mirror rows\n",{"type":23,"tag":366,"props":761,"children":763},{"class":368,"line":762},16,[764,768,772,776,781,786],{"type":23,"tag":366,"props":765,"children":766},{"style":383},[767],{"type":28,"value":723},{"type":23,"tag":366,"props":769,"children":770},{"style":393},[771],{"type":28,"value":728},{"type":23,"tag":366,"props":773,"children":774},{"style":399},[775],{"type":28,"value":117},{"type":23,"tag":366,"props":777,"children":778},{"style":393},[779],{"type":28,"value":780},"IsDeleted",{"type":23,"tag":366,"props":782,"children":783},{"style":383},[784],{"type":28,"value":785},"  =",{"type":23,"tag":366,"props":787,"children":788},{"style":399},[789],{"type":28,"value":790}," FALSE\n",{"type":23,"tag":366,"props":792,"children":794},{"class":368,"line":793},17,[795,799,803,807,811,815],{"type":23,"tag":366,"props":796,"children":797},{"style":383},[798],{"type":28,"value":723},{"type":23,"tag":366,"props":800,"children":801},{"style":393},[802],{"type":28,"value":746},{"type":23,"tag":366,"props":804,"children":805},{"style":399},[806],{"type":28,"value":117},{"type":23,"tag":366,"props":808,"children":809},{"style":393},[810],{"type":28,"value":780},{"type":23,"tag":366,"props":812,"children":813},{"style":383},[814],{"type":28,"value":785},{"type":23,"tag":366,"props":816,"children":817},{"style":399},[818],{"type":28,"value":790},{"type":23,"tag":366,"props":820,"children":822},{"class":368,"line":821},18,[823,827,831,835,840,845],{"type":23,"tag":366,"props":824,"children":825},{"style":383},[826],{"type":28,"value":723},{"type":23,"tag":366,"props":828,"children":829},{"style":393},[830],{"type":28,"value":728},{"type":23,"tag":366,"props":832,"children":833},{"style":399},[834],{"type":28,"value":117},{"type":23,"tag":366,"props":836,"children":837},{"style":393},[838],{"type":28,"value":839},"IsConverted",{"type":23,"tag":366,"props":841,"children":842},{"style":383},[843],{"type":28,"value":844}," =",{"type":23,"tag":366,"props":846,"children":847},{"style":399},[848],{"type":28,"value":790},{"type":23,"tag":366,"props":850,"children":852},{"class":368,"line":851},19,[853,857,861,865,869,873],{"type":23,"tag":366,"props":854,"children":855},{"style":383},[856],{"type":28,"value":723},{"type":23,"tag":366,"props":858,"children":859},{"style":393},[860],{"type":28,"value":746},{"type":23,"tag":366,"props":862,"children":863},{"style":399},[864],{"type":28,"value":117},{"type":23,"tag":366,"props":866,"children":867},{"style":393},[868],{"type":28,"value":839},{"type":23,"tag":366,"props":870,"children":871},{"style":383},[872],{"type":28,"value":844},{"type":23,"tag":366,"props":874,"children":875},{"style":399},[876],{"type":28,"value":790},{"type":23,"tag":366,"props":878,"children":880},{"class":368,"line":879},20,[881,886,890,894],{"type":23,"tag":366,"props":882,"children":883},{"style":383},[884],{"type":28,"value":885},"ORDER BY",{"type":23,"tag":366,"props":887,"children":888},{"style":393},[889],{"type":28,"value":728},{"type":23,"tag":366,"props":891,"children":892},{"style":399},[893],{"type":28,"value":117},{"type":23,"tag":366,"props":895,"children":896},{"style":393},[897],{"type":28,"value":898},"Email\n",{"type":23,"tag":36,"props":900,"children":902},{"id":901},"duplicate-contacts-in-salesforce",[903],{"type":28,"value":904},"Duplicate Contacts in Salesforce",{"type":23,"tag":24,"props":906,"children":907},{},[908],{"type":28,"value":909},"Same logic for Contacts — typically the higher-risk duplicate because contacts are linked to Accounts and Opportunities.",{"type":23,"tag":355,"props":911,"children":913},{"className":357,"code":912,"language":359,"meta":7,"style":7},"-- Duplicate Contact records in Salesforce (matched by email)\nSELECT\n  a.Id        AS contact_id_a,\n  a.FirstName AS first_name_a,\n  a.LastName  AS last_name_a,\n  a.Email,\n  a.AccountId AS account_a,\n  a.CreatedDate AS created_a,\n  b.Id        AS contact_id_b,\n  b.FirstName AS first_name_b,\n  b.LastName  AS last_name_b,\n  b.AccountId AS account_b,\n  b.CreatedDate AS created_b\nFROM Contact a\nJOIN Contact b\n  ON LOWER(a.Email) = LOWER(b.Email)\n AND a.Id \u003C b.Id\n AND a.IsDeleted = FALSE\n AND b.IsDeleted = FALSE\nORDER BY a.Email\n",[914],{"type":23,"tag":362,"props":915,"children":916},{"__ignoreMap":7},[917,925,932,956,979,1002,1021,1046,1069,1093,1116,1139,1163,1186,1198,1210,1269,1305,1332,1359],{"type":23,"tag":366,"props":918,"children":919},{"class":368,"line":369},[920],{"type":23,"tag":366,"props":921,"children":922},{"style":373},[923],{"type":28,"value":924},"-- Duplicate Contact records in Salesforce (matched by email)\n",{"type":23,"tag":366,"props":926,"children":927},{"class":368,"line":379},[928],{"type":23,"tag":366,"props":929,"children":930},{"style":383},[931],{"type":28,"value":386},{"type":23,"tag":366,"props":933,"children":934},{"class":368,"line":389},[935,939,943,947,951],{"type":23,"tag":366,"props":936,"children":937},{"style":393},[938],{"type":28,"value":396},{"type":23,"tag":366,"props":940,"children":941},{"style":399},[942],{"type":28,"value":117},{"type":23,"tag":366,"props":944,"children":945},{"style":393},[946],{"type":28,"value":406},{"type":23,"tag":366,"props":948,"children":949},{"style":383},[950],{"type":28,"value":411},{"type":23,"tag":366,"props":952,"children":953},{"style":399},[954],{"type":28,"value":955}," contact_id_a,\n",{"type":23,"tag":366,"props":957,"children":958},{"class":368,"line":419},[959,963,967,971,975],{"type":23,"tag":366,"props":960,"children":961},{"style":393},[962],{"type":28,"value":396},{"type":23,"tag":366,"props":964,"children":965},{"style":399},[966],{"type":28,"value":117},{"type":23,"tag":366,"props":968,"children":969},{"style":393},[970],{"type":28,"value":433},{"type":23,"tag":366,"props":972,"children":973},{"style":383},[974],{"type":28,"value":438},{"type":23,"tag":366,"props":976,"children":977},{"style":399},[978],{"type":28,"value":443},{"type":23,"tag":366,"props":980,"children":981},{"class":368,"line":446},[982,986,990,994,998],{"type":23,"tag":366,"props":983,"children":984},{"style":393},[985],{"type":28,"value":396},{"type":23,"tag":366,"props":987,"children":988},{"style":399},[989],{"type":28,"value":117},{"type":23,"tag":366,"props":991,"children":992},{"style":393},[993],{"type":28,"value":460},{"type":23,"tag":366,"props":995,"children":996},{"style":383},[997],{"type":28,"value":465},{"type":23,"tag":366,"props":999,"children":1000},{"style":399},[1001],{"type":28,"value":470},{"type":23,"tag":366,"props":1003,"children":1004},{"class":368,"line":473},[1005,1009,1013,1017],{"type":23,"tag":366,"props":1006,"children":1007},{"style":393},[1008],{"type":28,"value":396},{"type":23,"tag":366,"props":1010,"children":1011},{"style":399},[1012],{"type":28,"value":117},{"type":23,"tag":366,"props":1014,"children":1015},{"style":393},[1016],{"type":28,"value":487},{"type":23,"tag":366,"props":1018,"children":1019},{"style":399},[1020],{"type":28,"value":492},{"type":23,"tag":366,"props":1022,"children":1023},{"class":368,"line":495},[1024,1028,1032,1037,1041],{"type":23,"tag":366,"props":1025,"children":1026},{"style":393},[1027],{"type":28,"value":396},{"type":23,"tag":366,"props":1029,"children":1030},{"style":399},[1031],{"type":28,"value":117},{"type":23,"tag":366,"props":1033,"children":1034},{"style":393},[1035],{"type":28,"value":1036},"AccountId",{"type":23,"tag":366,"props":1038,"children":1039},{"style":383},[1040],{"type":28,"value":438},{"type":23,"tag":366,"props":1042,"children":1043},{"style":399},[1044],{"type":28,"value":1045}," account_a,\n",{"type":23,"tag":366,"props":1047,"children":1048},{"class":368,"line":521},[1049,1053,1057,1061,1065],{"type":23,"tag":366,"props":1050,"children":1051},{"style":393},[1052],{"type":28,"value":396},{"type":23,"tag":366,"props":1054,"children":1055},{"style":399},[1056],{"type":28,"value":117},{"type":23,"tag":366,"props":1058,"children":1059},{"style":393},[1060],{"type":28,"value":509},{"type":23,"tag":366,"props":1062,"children":1063},{"style":383},[1064],{"type":28,"value":438},{"type":23,"tag":366,"props":1066,"children":1067},{"style":399},[1068],{"type":28,"value":518},{"type":23,"tag":366,"props":1070,"children":1071},{"class":368,"line":547},[1072,1076,1080,1084,1088],{"type":23,"tag":366,"props":1073,"children":1074},{"style":393},[1075],{"type":28,"value":527},{"type":23,"tag":366,"props":1077,"children":1078},{"style":399},[1079],{"type":28,"value":117},{"type":23,"tag":366,"props":1081,"children":1082},{"style":393},[1083],{"type":28,"value":406},{"type":23,"tag":366,"props":1085,"children":1086},{"style":383},[1087],{"type":28,"value":411},{"type":23,"tag":366,"props":1089,"children":1090},{"style":399},[1091],{"type":28,"value":1092}," contact_id_b,\n",{"type":23,"tag":366,"props":1094,"children":1095},{"class":368,"line":572},[1096,1100,1104,1108,1112],{"type":23,"tag":366,"props":1097,"children":1098},{"style":393},[1099],{"type":28,"value":527},{"type":23,"tag":366,"props":1101,"children":1102},{"style":399},[1103],{"type":28,"value":117},{"type":23,"tag":366,"props":1105,"children":1106},{"style":393},[1107],{"type":28,"value":433},{"type":23,"tag":366,"props":1109,"children":1110},{"style":383},[1111],{"type":28,"value":438},{"type":23,"tag":366,"props":1113,"children":1114},{"style":399},[1115],{"type":28,"value":569},{"type":23,"tag":366,"props":1117,"children":1118},{"class":368,"line":597},[1119,1123,1127,1131,1135],{"type":23,"tag":366,"props":1120,"children":1121},{"style":393},[1122],{"type":28,"value":527},{"type":23,"tag":366,"props":1124,"children":1125},{"style":399},[1126],{"type":28,"value":117},{"type":23,"tag":366,"props":1128,"children":1129},{"style":393},[1130],{"type":28,"value":460},{"type":23,"tag":366,"props":1132,"children":1133},{"style":383},[1134],{"type":28,"value":465},{"type":23,"tag":366,"props":1136,"children":1137},{"style":399},[1138],{"type":28,"value":594},{"type":23,"tag":366,"props":1140,"children":1141},{"class":368,"line":622},[1142,1146,1150,1154,1158],{"type":23,"tag":366,"props":1143,"children":1144},{"style":393},[1145],{"type":28,"value":527},{"type":23,"tag":366,"props":1147,"children":1148},{"style":399},[1149],{"type":28,"value":117},{"type":23,"tag":366,"props":1151,"children":1152},{"style":393},[1153],{"type":28,"value":1036},{"type":23,"tag":366,"props":1155,"children":1156},{"style":383},[1157],{"type":28,"value":438},{"type":23,"tag":366,"props":1159,"children":1160},{"style":399},[1161],{"type":28,"value":1162}," account_b,\n",{"type":23,"tag":366,"props":1164,"children":1165},{"class":368,"line":636},[1166,1170,1174,1178,1182],{"type":23,"tag":366,"props":1167,"children":1168},{"style":393},[1169],{"type":28,"value":527},{"type":23,"tag":366,"props":1171,"children":1172},{"style":399},[1173],{"type":28,"value":117},{"type":23,"tag":366,"props":1175,"children":1176},{"style":393},[1177],{"type":28,"value":509},{"type":23,"tag":366,"props":1179,"children":1180},{"style":383},[1181],{"type":28,"value":438},{"type":23,"tag":366,"props":1183,"children":1184},{"style":399},[1185],{"type":28,"value":619},{"type":23,"tag":366,"props":1187,"children":1188},{"class":368,"line":650},[1189,1193],{"type":23,"tag":366,"props":1190,"children":1191},{"style":383},[1192],{"type":28,"value":628},{"type":23,"tag":366,"props":1194,"children":1195},{"style":399},[1196],{"type":28,"value":1197}," Contact a\n",{"type":23,"tag":366,"props":1199,"children":1200},{"class":368,"line":717},[1201,1205],{"type":23,"tag":366,"props":1202,"children":1203},{"style":383},[1204],{"type":28,"value":642},{"type":23,"tag":366,"props":1206,"children":1207},{"style":399},[1208],{"type":28,"value":1209}," Contact b\n",{"type":23,"tag":366,"props":1211,"children":1212},{"class":368,"line":762},[1213,1217,1221,1225,1229,1233,1237,1241,1245,1249,1253,1257,1261,1265],{"type":23,"tag":366,"props":1214,"children":1215},{"style":383},[1216],{"type":28,"value":656},{"type":23,"tag":366,"props":1218,"children":1219},{"style":393},[1220],{"type":28,"value":661},{"type":23,"tag":366,"props":1222,"children":1223},{"style":399},[1224],{"type":28,"value":666},{"type":23,"tag":366,"props":1226,"children":1227},{"style":393},[1228],{"type":28,"value":51},{"type":23,"tag":366,"props":1230,"children":1231},{"style":399},[1232],{"type":28,"value":117},{"type":23,"tag":366,"props":1234,"children":1235},{"style":393},[1236],{"type":28,"value":487},{"type":23,"tag":366,"props":1238,"children":1239},{"style":399},[1240],{"type":28,"value":683},{"type":23,"tag":366,"props":1242,"children":1243},{"style":383},[1244],{"type":28,"value":688},{"type":23,"tag":366,"props":1246,"children":1247},{"style":393},[1248],{"type":28,"value":661},{"type":23,"tag":366,"props":1250,"children":1251},{"style":399},[1252],{"type":28,"value":666},{"type":23,"tag":366,"props":1254,"children":1255},{"style":393},[1256],{"type":28,"value":701},{"type":23,"tag":366,"props":1258,"children":1259},{"style":399},[1260],{"type":28,"value":117},{"type":23,"tag":366,"props":1262,"children":1263},{"style":393},[1264],{"type":28,"value":487},{"type":23,"tag":366,"props":1266,"children":1267},{"style":399},[1268],{"type":28,"value":714},{"type":23,"tag":366,"props":1270,"children":1271},{"class":368,"line":793},[1272,1276,1280,1284,1288,1292,1296,1300],{"type":23,"tag":366,"props":1273,"children":1274},{"style":383},[1275],{"type":28,"value":723},{"type":23,"tag":366,"props":1277,"children":1278},{"style":393},[1279],{"type":28,"value":728},{"type":23,"tag":366,"props":1281,"children":1282},{"style":399},[1283],{"type":28,"value":117},{"type":23,"tag":366,"props":1285,"children":1286},{"style":393},[1287],{"type":28,"value":406},{"type":23,"tag":366,"props":1289,"children":1290},{"style":383},[1291],{"type":28,"value":741},{"type":23,"tag":366,"props":1293,"children":1294},{"style":393},[1295],{"type":28,"value":746},{"type":23,"tag":366,"props":1297,"children":1298},{"style":399},[1299],{"type":28,"value":117},{"type":23,"tag":366,"props":1301,"children":1302},{"style":393},[1303],{"type":28,"value":1304},"Id\n",{"type":23,"tag":366,"props":1306,"children":1307},{"class":368,"line":821},[1308,1312,1316,1320,1324,1328],{"type":23,"tag":366,"props":1309,"children":1310},{"style":383},[1311],{"type":28,"value":723},{"type":23,"tag":366,"props":1313,"children":1314},{"style":393},[1315],{"type":28,"value":728},{"type":23,"tag":366,"props":1317,"children":1318},{"style":399},[1319],{"type":28,"value":117},{"type":23,"tag":366,"props":1321,"children":1322},{"style":393},[1323],{"type":28,"value":780},{"type":23,"tag":366,"props":1325,"children":1326},{"style":383},[1327],{"type":28,"value":844},{"type":23,"tag":366,"props":1329,"children":1330},{"style":399},[1331],{"type":28,"value":790},{"type":23,"tag":366,"props":1333,"children":1334},{"class":368,"line":851},[1335,1339,1343,1347,1351,1355],{"type":23,"tag":366,"props":1336,"children":1337},{"style":383},[1338],{"type":28,"value":723},{"type":23,"tag":366,"props":1340,"children":1341},{"style":393},[1342],{"type":28,"value":746},{"type":23,"tag":366,"props":1344,"children":1345},{"style":399},[1346],{"type":28,"value":117},{"type":23,"tag":366,"props":1348,"children":1349},{"style":393},[1350],{"type":28,"value":780},{"type":23,"tag":366,"props":1352,"children":1353},{"style":383},[1354],{"type":28,"value":844},{"type":23,"tag":366,"props":1356,"children":1357},{"style":399},[1358],{"type":28,"value":790},{"type":23,"tag":366,"props":1360,"children":1361},{"class":368,"line":879},[1362,1366,1370,1374],{"type":23,"tag":366,"props":1363,"children":1364},{"style":383},[1365],{"type":28,"value":885},{"type":23,"tag":366,"props":1367,"children":1368},{"style":393},[1369],{"type":28,"value":728},{"type":23,"tag":366,"props":1371,"children":1372},{"style":399},[1373],{"type":28,"value":117},{"type":23,"tag":366,"props":1375,"children":1376},{"style":393},[1377],{"type":28,"value":898},{"type":23,"tag":36,"props":1379,"children":1381},{"id":1380},"leadcontact-duplicates-cross-object",[1382],{"type":28,"value":1383},"Lead–Contact Duplicates (Cross-Object)",{"type":23,"tag":24,"props":1385,"children":1386},{},[1387],{"type":28,"value":1388},"SOQL can't query Leads and Contacts together. SQL can. This query finds cases where the same email exists in both objects — common when leads are partially converted or when contacts are created outside the standard conversion flow.",{"type":23,"tag":355,"props":1390,"children":1392},{"className":357,"code":1391,"language":359,"meta":7,"style":7},"-- Email addresses that exist as both a Lead and a Contact\nSELECT\n  l.Id          AS lead_id,\n  l.FirstName   AS lead_first_name,\n  l.LastName    AS lead_last_name,\n  l.Email,\n  l.CreatedDate AS lead_created,\n  l.IsConverted AS lead_is_converted,\n  c.Id          AS contact_id,\n  c.FirstName   AS contact_first_name,\n  c.LastName    AS contact_last_name,\n  c.CreatedDate AS contact_created\nFROM Lead l\nJOIN Contact c\n  ON LOWER(l.Email) = LOWER(c.Email)\n AND l.IsDeleted = FALSE\n AND c.IsDeleted = FALSE\nORDER BY l.Email\n",[1393],{"type":23,"tag":362,"props":1394,"children":1395},{"__ignoreMap":7},[1396,1404,1411,1437,1462,1487,1506,1530,1554,1579,1603,1627,1651,1663,1675,1736,1764,1792],{"type":23,"tag":366,"props":1397,"children":1398},{"class":368,"line":369},[1399],{"type":23,"tag":366,"props":1400,"children":1401},{"style":373},[1402],{"type":28,"value":1403},"-- Email addresses that exist as both a Lead and a Contact\n",{"type":23,"tag":366,"props":1405,"children":1406},{"class":368,"line":379},[1407],{"type":23,"tag":366,"props":1408,"children":1409},{"style":383},[1410],{"type":28,"value":386},{"type":23,"tag":366,"props":1412,"children":1413},{"class":368,"line":389},[1414,1419,1423,1427,1432],{"type":23,"tag":366,"props":1415,"children":1416},{"style":393},[1417],{"type":28,"value":1418},"  l",{"type":23,"tag":366,"props":1420,"children":1421},{"style":399},[1422],{"type":28,"value":117},{"type":23,"tag":366,"props":1424,"children":1425},{"style":393},[1426],{"type":28,"value":406},{"type":23,"tag":366,"props":1428,"children":1429},{"style":383},[1430],{"type":28,"value":1431},"          AS",{"type":23,"tag":366,"props":1433,"children":1434},{"style":399},[1435],{"type":28,"value":1436}," lead_id,\n",{"type":23,"tag":366,"props":1438,"children":1439},{"class":368,"line":419},[1440,1444,1448,1452,1457],{"type":23,"tag":366,"props":1441,"children":1442},{"style":393},[1443],{"type":28,"value":1418},{"type":23,"tag":366,"props":1445,"children":1446},{"style":399},[1447],{"type":28,"value":117},{"type":23,"tag":366,"props":1449,"children":1450},{"style":393},[1451],{"type":28,"value":433},{"type":23,"tag":366,"props":1453,"children":1454},{"style":383},[1455],{"type":28,"value":1456},"   AS",{"type":23,"tag":366,"props":1458,"children":1459},{"style":399},[1460],{"type":28,"value":1461}," lead_first_name,\n",{"type":23,"tag":366,"props":1463,"children":1464},{"class":368,"line":446},[1465,1469,1473,1477,1482],{"type":23,"tag":366,"props":1466,"children":1467},{"style":393},[1468],{"type":28,"value":1418},{"type":23,"tag":366,"props":1470,"children":1471},{"style":399},[1472],{"type":28,"value":117},{"type":23,"tag":366,"props":1474,"children":1475},{"style":393},[1476],{"type":28,"value":460},{"type":23,"tag":366,"props":1478,"children":1479},{"style":383},[1480],{"type":28,"value":1481},"    AS",{"type":23,"tag":366,"props":1483,"children":1484},{"style":399},[1485],{"type":28,"value":1486}," lead_last_name,\n",{"type":23,"tag":366,"props":1488,"children":1489},{"class":368,"line":473},[1490,1494,1498,1502],{"type":23,"tag":366,"props":1491,"children":1492},{"style":393},[1493],{"type":28,"value":1418},{"type":23,"tag":366,"props":1495,"children":1496},{"style":399},[1497],{"type":28,"value":117},{"type":23,"tag":366,"props":1499,"children":1500},{"style":393},[1501],{"type":28,"value":487},{"type":23,"tag":366,"props":1503,"children":1504},{"style":399},[1505],{"type":28,"value":492},{"type":23,"tag":366,"props":1507,"children":1508},{"class":368,"line":495},[1509,1513,1517,1521,1525],{"type":23,"tag":366,"props":1510,"children":1511},{"style":393},[1512],{"type":28,"value":1418},{"type":23,"tag":366,"props":1514,"children":1515},{"style":399},[1516],{"type":28,"value":117},{"type":23,"tag":366,"props":1518,"children":1519},{"style":393},[1520],{"type":28,"value":509},{"type":23,"tag":366,"props":1522,"children":1523},{"style":383},[1524],{"type":28,"value":438},{"type":23,"tag":366,"props":1526,"children":1527},{"style":399},[1528],{"type":28,"value":1529}," lead_created,\n",{"type":23,"tag":366,"props":1531,"children":1532},{"class":368,"line":521},[1533,1537,1541,1545,1549],{"type":23,"tag":366,"props":1534,"children":1535},{"style":393},[1536],{"type":28,"value":1418},{"type":23,"tag":366,"props":1538,"children":1539},{"style":399},[1540],{"type":28,"value":117},{"type":23,"tag":366,"props":1542,"children":1543},{"style":393},[1544],{"type":28,"value":839},{"type":23,"tag":366,"props":1546,"children":1547},{"style":383},[1548],{"type":28,"value":438},{"type":23,"tag":366,"props":1550,"children":1551},{"style":399},[1552],{"type":28,"value":1553}," lead_is_converted,\n",{"type":23,"tag":366,"props":1555,"children":1556},{"class":368,"line":547},[1557,1562,1566,1570,1574],{"type":23,"tag":366,"props":1558,"children":1559},{"style":393},[1560],{"type":28,"value":1561},"  c",{"type":23,"tag":366,"props":1563,"children":1564},{"style":399},[1565],{"type":28,"value":117},{"type":23,"tag":366,"props":1567,"children":1568},{"style":393},[1569],{"type":28,"value":406},{"type":23,"tag":366,"props":1571,"children":1572},{"style":383},[1573],{"type":28,"value":1431},{"type":23,"tag":366,"props":1575,"children":1576},{"style":399},[1577],{"type":28,"value":1578}," contact_id,\n",{"type":23,"tag":366,"props":1580,"children":1581},{"class":368,"line":572},[1582,1586,1590,1594,1598],{"type":23,"tag":366,"props":1583,"children":1584},{"style":393},[1585],{"type":28,"value":1561},{"type":23,"tag":366,"props":1587,"children":1588},{"style":399},[1589],{"type":28,"value":117},{"type":23,"tag":366,"props":1591,"children":1592},{"style":393},[1593],{"type":28,"value":433},{"type":23,"tag":366,"props":1595,"children":1596},{"style":383},[1597],{"type":28,"value":1456},{"type":23,"tag":366,"props":1599,"children":1600},{"style":399},[1601],{"type":28,"value":1602}," contact_first_name,\n",{"type":23,"tag":366,"props":1604,"children":1605},{"class":368,"line":597},[1606,1610,1614,1618,1622],{"type":23,"tag":366,"props":1607,"children":1608},{"style":393},[1609],{"type":28,"value":1561},{"type":23,"tag":366,"props":1611,"children":1612},{"style":399},[1613],{"type":28,"value":117},{"type":23,"tag":366,"props":1615,"children":1616},{"style":393},[1617],{"type":28,"value":460},{"type":23,"tag":366,"props":1619,"children":1620},{"style":383},[1621],{"type":28,"value":1481},{"type":23,"tag":366,"props":1623,"children":1624},{"style":399},[1625],{"type":28,"value":1626}," contact_last_name,\n",{"type":23,"tag":366,"props":1628,"children":1629},{"class":368,"line":622},[1630,1634,1638,1642,1646],{"type":23,"tag":366,"props":1631,"children":1632},{"style":393},[1633],{"type":28,"value":1561},{"type":23,"tag":366,"props":1635,"children":1636},{"style":399},[1637],{"type":28,"value":117},{"type":23,"tag":366,"props":1639,"children":1640},{"style":393},[1641],{"type":28,"value":509},{"type":23,"tag":366,"props":1643,"children":1644},{"style":383},[1645],{"type":28,"value":438},{"type":23,"tag":366,"props":1647,"children":1648},{"style":399},[1649],{"type":28,"value":1650}," contact_created\n",{"type":23,"tag":366,"props":1652,"children":1653},{"class":368,"line":636},[1654,1658],{"type":23,"tag":366,"props":1655,"children":1656},{"style":383},[1657],{"type":28,"value":628},{"type":23,"tag":366,"props":1659,"children":1660},{"style":399},[1661],{"type":28,"value":1662}," Lead l\n",{"type":23,"tag":366,"props":1664,"children":1665},{"class":368,"line":650},[1666,1670],{"type":23,"tag":366,"props":1667,"children":1668},{"style":383},[1669],{"type":28,"value":642},{"type":23,"tag":366,"props":1671,"children":1672},{"style":399},[1673],{"type":28,"value":1674}," Contact c\n",{"type":23,"tag":366,"props":1676,"children":1677},{"class":368,"line":717},[1678,1682,1686,1690,1695,1699,1703,1707,1711,1715,1719,1724,1728,1732],{"type":23,"tag":366,"props":1679,"children":1680},{"style":383},[1681],{"type":28,"value":656},{"type":23,"tag":366,"props":1683,"children":1684},{"style":393},[1685],{"type":28,"value":661},{"type":23,"tag":366,"props":1687,"children":1688},{"style":399},[1689],{"type":28,"value":666},{"type":23,"tag":366,"props":1691,"children":1692},{"style":393},[1693],{"type":28,"value":1694},"l",{"type":23,"tag":366,"props":1696,"children":1697},{"style":399},[1698],{"type":28,"value":117},{"type":23,"tag":366,"props":1700,"children":1701},{"style":393},[1702],{"type":28,"value":487},{"type":23,"tag":366,"props":1704,"children":1705},{"style":399},[1706],{"type":28,"value":683},{"type":23,"tag":366,"props":1708,"children":1709},{"style":383},[1710],{"type":28,"value":688},{"type":23,"tag":366,"props":1712,"children":1713},{"style":393},[1714],{"type":28,"value":661},{"type":23,"tag":366,"props":1716,"children":1717},{"style":399},[1718],{"type":28,"value":666},{"type":23,"tag":366,"props":1720,"children":1721},{"style":393},[1722],{"type":28,"value":1723},"c",{"type":23,"tag":366,"props":1725,"children":1726},{"style":399},[1727],{"type":28,"value":117},{"type":23,"tag":366,"props":1729,"children":1730},{"style":393},[1731],{"type":28,"value":487},{"type":23,"tag":366,"props":1733,"children":1734},{"style":399},[1735],{"type":28,"value":714},{"type":23,"tag":366,"props":1737,"children":1738},{"class":368,"line":762},[1739,1743,1748,1752,1756,1760],{"type":23,"tag":366,"props":1740,"children":1741},{"style":383},[1742],{"type":28,"value":723},{"type":23,"tag":366,"props":1744,"children":1745},{"style":393},[1746],{"type":28,"value":1747}," l",{"type":23,"tag":366,"props":1749,"children":1750},{"style":399},[1751],{"type":28,"value":117},{"type":23,"tag":366,"props":1753,"children":1754},{"style":393},[1755],{"type":28,"value":780},{"type":23,"tag":366,"props":1757,"children":1758},{"style":383},[1759],{"type":28,"value":844},{"type":23,"tag":366,"props":1761,"children":1762},{"style":399},[1763],{"type":28,"value":790},{"type":23,"tag":366,"props":1765,"children":1766},{"class":368,"line":793},[1767,1771,1776,1780,1784,1788],{"type":23,"tag":366,"props":1768,"children":1769},{"style":383},[1770],{"type":28,"value":723},{"type":23,"tag":366,"props":1772,"children":1773},{"style":393},[1774],{"type":28,"value":1775}," c",{"type":23,"tag":366,"props":1777,"children":1778},{"style":399},[1779],{"type":28,"value":117},{"type":23,"tag":366,"props":1781,"children":1782},{"style":393},[1783],{"type":28,"value":780},{"type":23,"tag":366,"props":1785,"children":1786},{"style":383},[1787],{"type":28,"value":844},{"type":23,"tag":366,"props":1789,"children":1790},{"style":399},[1791],{"type":28,"value":790},{"type":23,"tag":366,"props":1793,"children":1794},{"class":368,"line":821},[1795,1799,1803,1807],{"type":23,"tag":366,"props":1796,"children":1797},{"style":383},[1798],{"type":28,"value":885},{"type":23,"tag":366,"props":1800,"children":1801},{"style":393},[1802],{"type":28,"value":1747},{"type":23,"tag":366,"props":1804,"children":1805},{"style":399},[1806],{"type":28,"value":117},{"type":23,"tag":366,"props":1808,"children":1809},{"style":393},[1810],{"type":28,"value":898},{"type":23,"tag":24,"props":1812,"children":1813},{},[1814],{"type":28,"value":1815},"This surfaces three actionable scenarios: the lead was converted but not merged, the contact was created without going through lead conversion, or both records are genuine (two different people sharing a corporate alias — worth reviewing manually).",{"type":23,"tag":36,"props":1817,"children":1819},{"id":1818},"lead-field-completeness-over-time",[1820],{"type":28,"value":1821},"Lead Field Completeness Over Time",{"type":23,"tag":24,"props":1823,"children":1824},{},[1825],{"type":28,"value":1826},"Duplicate records are visible. Incomplete records are invisible — they don't throw errors, they just quietly degrade your segmentation and reporting. This query measures how many leads created each month have the four fields that matter most for qualification.",{"type":23,"tag":355,"props":1828,"children":1830},{"className":357,"code":1829,"language":359,"meta":7,"style":7},"-- Lead completeness trend: % of new leads with Name, Title, Email, and Phone populated\nSELECT\n  DATE_TRUNC('month', CreatedDate)                                       AS month,\n  COUNT(*)                                                               AS total_leads,\n  SUM(CASE WHEN FirstName IS NOT NULL AND FirstName \u003C> '' THEN 1 ELSE 0 END) AS has_first_name,\n  SUM(CASE WHEN LastName  IS NOT NULL AND LastName  \u003C> '' THEN 1 ELSE 0 END) AS has_last_name,\n  SUM(CASE WHEN Title     IS NOT NULL AND Title     \u003C> '' THEN 1 ELSE 0 END) AS has_title,\n  SUM(CASE WHEN Email     IS NOT NULL AND Email     \u003C> '' THEN 1 ELSE 0 END) AS has_email,\n  SUM(CASE WHEN Phone     IS NOT NULL AND Phone     \u003C> '' THEN 1 ELSE 0 END) AS has_phone,\n  ROUND(100.0 * SUM(CASE WHEN FirstName IS NOT NULL AND FirstName \u003C> '' AND\n                              LastName  IS NOT NULL AND LastName  \u003C> '' AND\n                              Title     IS NOT NULL AND Title     \u003C> '' AND\n                              Email     IS NOT NULL AND Email     \u003C> '' AND\n                              Phone     IS NOT NULL AND Phone     \u003C> ''\n                         THEN 1 ELSE 0 END) \u002F COUNT(*), 1)              AS pct_fully_complete\nFROM Lead\nWHERE IsDeleted = FALSE\n  AND CreatedDate >= DATEADD('month', -12, DATE_TRUNC('month', CURRENT_DATE))\nGROUP BY DATE_TRUNC('month', CreatedDate)\nORDER BY month\n",[1831],{"type":23,"tag":362,"props":1832,"children":1833},{"__ignoreMap":7},[1834,1842,1849,1882,1913,2001,2078,2155,2232,2309,2386,2418,2450,2482,2511,2581,2593,2614,2673,2695],{"type":23,"tag":366,"props":1835,"children":1836},{"class":368,"line":369},[1837],{"type":23,"tag":366,"props":1838,"children":1839},{"style":373},[1840],{"type":28,"value":1841},"-- Lead completeness trend: % of new leads with Name, Title, Email, and Phone populated\n",{"type":23,"tag":366,"props":1843,"children":1844},{"class":368,"line":379},[1845],{"type":23,"tag":366,"props":1846,"children":1847},{"style":383},[1848],{"type":28,"value":386},{"type":23,"tag":366,"props":1850,"children":1851},{"class":368,"line":389},[1852,1857,1863,1868,1873,1878],{"type":23,"tag":366,"props":1853,"children":1854},{"style":399},[1855],{"type":28,"value":1856},"  DATE_TRUNC(",{"type":23,"tag":366,"props":1858,"children":1860},{"style":1859},"--shiki-default:#032F62;--shiki-dark:#9ECBFF",[1861],{"type":28,"value":1862},"'month'",{"type":23,"tag":366,"props":1864,"children":1865},{"style":399},[1866],{"type":28,"value":1867},", CreatedDate)                                       ",{"type":23,"tag":366,"props":1869,"children":1870},{"style":383},[1871],{"type":28,"value":1872},"AS",{"type":23,"tag":366,"props":1874,"children":1875},{"style":383},[1876],{"type":28,"value":1877}," month",{"type":23,"tag":366,"props":1879,"children":1880},{"style":399},[1881],{"type":28,"value":492},{"type":23,"tag":366,"props":1883,"children":1884},{"class":368,"line":419},[1885,1890,1894,1899,1904,1908],{"type":23,"tag":366,"props":1886,"children":1887},{"style":393},[1888],{"type":28,"value":1889},"  COUNT",{"type":23,"tag":366,"props":1891,"children":1892},{"style":399},[1893],{"type":28,"value":666},{"type":23,"tag":366,"props":1895,"children":1896},{"style":383},[1897],{"type":28,"value":1898},"*",{"type":23,"tag":366,"props":1900,"children":1901},{"style":399},[1902],{"type":28,"value":1903},")                                                               ",{"type":23,"tag":366,"props":1905,"children":1906},{"style":383},[1907],{"type":28,"value":1872},{"type":23,"tag":366,"props":1909,"children":1910},{"style":399},[1911],{"type":28,"value":1912}," total_leads,\n",{"type":23,"tag":366,"props":1914,"children":1915},{"class":368,"line":446},[1916,1921,1925,1930,1935,1940,1945,1949,1953,1958,1963,1968,1973,1978,1983,1988,1992,1996],{"type":23,"tag":366,"props":1917,"children":1918},{"style":393},[1919],{"type":28,"value":1920},"  SUM",{"type":23,"tag":366,"props":1922,"children":1923},{"style":399},[1924],{"type":28,"value":666},{"type":23,"tag":366,"props":1926,"children":1927},{"style":383},[1928],{"type":28,"value":1929},"CASE",{"type":23,"tag":366,"props":1931,"children":1932},{"style":383},[1933],{"type":28,"value":1934}," WHEN",{"type":23,"tag":366,"props":1936,"children":1937},{"style":399},[1938],{"type":28,"value":1939}," FirstName ",{"type":23,"tag":366,"props":1941,"children":1942},{"style":383},[1943],{"type":28,"value":1944},"IS NOT NULL",{"type":23,"tag":366,"props":1946,"children":1947},{"style":383},[1948],{"type":28,"value":723},{"type":23,"tag":366,"props":1950,"children":1951},{"style":399},[1952],{"type":28,"value":1939},{"type":23,"tag":366,"props":1954,"children":1955},{"style":383},[1956],{"type":28,"value":1957},"\u003C>",{"type":23,"tag":366,"props":1959,"children":1960},{"style":1859},[1961],{"type":28,"value":1962}," ''",{"type":23,"tag":366,"props":1964,"children":1965},{"style":383},[1966],{"type":28,"value":1967}," THEN",{"type":23,"tag":366,"props":1969,"children":1970},{"style":393},[1971],{"type":28,"value":1972}," 1",{"type":23,"tag":366,"props":1974,"children":1975},{"style":383},[1976],{"type":28,"value":1977}," ELSE",{"type":23,"tag":366,"props":1979,"children":1980},{"style":393},[1981],{"type":28,"value":1982}," 0",{"type":23,"tag":366,"props":1984,"children":1985},{"style":383},[1986],{"type":28,"value":1987}," END",{"type":23,"tag":366,"props":1989,"children":1990},{"style":399},[1991],{"type":28,"value":683},{"type":23,"tag":366,"props":1993,"children":1994},{"style":383},[1995],{"type":28,"value":1872},{"type":23,"tag":366,"props":1997,"children":1998},{"style":399},[1999],{"type":28,"value":2000}," has_first_name,\n",{"type":23,"tag":366,"props":2002,"children":2003},{"class":368,"line":473},[2004,2008,2012,2016,2020,2025,2029,2033,2037,2041,2045,2049,2053,2057,2061,2065,2069,2073],{"type":23,"tag":366,"props":2005,"children":2006},{"style":393},[2007],{"type":28,"value":1920},{"type":23,"tag":366,"props":2009,"children":2010},{"style":399},[2011],{"type":28,"value":666},{"type":23,"tag":366,"props":2013,"children":2014},{"style":383},[2015],{"type":28,"value":1929},{"type":23,"tag":366,"props":2017,"children":2018},{"style":383},[2019],{"type":28,"value":1934},{"type":23,"tag":366,"props":2021,"children":2022},{"style":399},[2023],{"type":28,"value":2024}," LastName  ",{"type":23,"tag":366,"props":2026,"children":2027},{"style":383},[2028],{"type":28,"value":1944},{"type":23,"tag":366,"props":2030,"children":2031},{"style":383},[2032],{"type":28,"value":723},{"type":23,"tag":366,"props":2034,"children":2035},{"style":399},[2036],{"type":28,"value":2024},{"type":23,"tag":366,"props":2038,"children":2039},{"style":383},[2040],{"type":28,"value":1957},{"type":23,"tag":366,"props":2042,"children":2043},{"style":1859},[2044],{"type":28,"value":1962},{"type":23,"tag":366,"props":2046,"children":2047},{"style":383},[2048],{"type":28,"value":1967},{"type":23,"tag":366,"props":2050,"children":2051},{"style":393},[2052],{"type":28,"value":1972},{"type":23,"tag":366,"props":2054,"children":2055},{"style":383},[2056],{"type":28,"value":1977},{"type":23,"tag":366,"props":2058,"children":2059},{"style":393},[2060],{"type":28,"value":1982},{"type":23,"tag":366,"props":2062,"children":2063},{"style":383},[2064],{"type":28,"value":1987},{"type":23,"tag":366,"props":2066,"children":2067},{"style":399},[2068],{"type":28,"value":683},{"type":23,"tag":366,"props":2070,"children":2071},{"style":383},[2072],{"type":28,"value":1872},{"type":23,"tag":366,"props":2074,"children":2075},{"style":399},[2076],{"type":28,"value":2077}," has_last_name,\n",{"type":23,"tag":366,"props":2079,"children":2080},{"class":368,"line":495},[2081,2085,2089,2093,2097,2102,2106,2110,2114,2118,2122,2126,2130,2134,2138,2142,2146,2150],{"type":23,"tag":366,"props":2082,"children":2083},{"style":393},[2084],{"type":28,"value":1920},{"type":23,"tag":366,"props":2086,"children":2087},{"style":399},[2088],{"type":28,"value":666},{"type":23,"tag":366,"props":2090,"children":2091},{"style":383},[2092],{"type":28,"value":1929},{"type":23,"tag":366,"props":2094,"children":2095},{"style":383},[2096],{"type":28,"value":1934},{"type":23,"tag":366,"props":2098,"children":2099},{"style":399},[2100],{"type":28,"value":2101}," Title     ",{"type":23,"tag":366,"props":2103,"children":2104},{"style":383},[2105],{"type":28,"value":1944},{"type":23,"tag":366,"props":2107,"children":2108},{"style":383},[2109],{"type":28,"value":723},{"type":23,"tag":366,"props":2111,"children":2112},{"style":399},[2113],{"type":28,"value":2101},{"type":23,"tag":366,"props":2115,"children":2116},{"style":383},[2117],{"type":28,"value":1957},{"type":23,"tag":366,"props":2119,"children":2120},{"style":1859},[2121],{"type":28,"value":1962},{"type":23,"tag":366,"props":2123,"children":2124},{"style":383},[2125],{"type":28,"value":1967},{"type":23,"tag":366,"props":2127,"children":2128},{"style":393},[2129],{"type":28,"value":1972},{"type":23,"tag":366,"props":2131,"children":2132},{"style":383},[2133],{"type":28,"value":1977},{"type":23,"tag":366,"props":2135,"children":2136},{"style":393},[2137],{"type":28,"value":1982},{"type":23,"tag":366,"props":2139,"children":2140},{"style":383},[2141],{"type":28,"value":1987},{"type":23,"tag":366,"props":2143,"children":2144},{"style":399},[2145],{"type":28,"value":683},{"type":23,"tag":366,"props":2147,"children":2148},{"style":383},[2149],{"type":28,"value":1872},{"type":23,"tag":366,"props":2151,"children":2152},{"style":399},[2153],{"type":28,"value":2154}," has_title,\n",{"type":23,"tag":366,"props":2156,"children":2157},{"class":368,"line":521},[2158,2162,2166,2170,2174,2179,2183,2187,2191,2195,2199,2203,2207,2211,2215,2219,2223,2227],{"type":23,"tag":366,"props":2159,"children":2160},{"style":393},[2161],{"type":28,"value":1920},{"type":23,"tag":366,"props":2163,"children":2164},{"style":399},[2165],{"type":28,"value":666},{"type":23,"tag":366,"props":2167,"children":2168},{"style":383},[2169],{"type":28,"value":1929},{"type":23,"tag":366,"props":2171,"children":2172},{"style":383},[2173],{"type":28,"value":1934},{"type":23,"tag":366,"props":2175,"children":2176},{"style":399},[2177],{"type":28,"value":2178}," Email     ",{"type":23,"tag":366,"props":2180,"children":2181},{"style":383},[2182],{"type":28,"value":1944},{"type":23,"tag":366,"props":2184,"children":2185},{"style":383},[2186],{"type":28,"value":723},{"type":23,"tag":366,"props":2188,"children":2189},{"style":399},[2190],{"type":28,"value":2178},{"type":23,"tag":366,"props":2192,"children":2193},{"style":383},[2194],{"type":28,"value":1957},{"type":23,"tag":366,"props":2196,"children":2197},{"style":1859},[2198],{"type":28,"value":1962},{"type":23,"tag":366,"props":2200,"children":2201},{"style":383},[2202],{"type":28,"value":1967},{"type":23,"tag":366,"props":2204,"children":2205},{"style":393},[2206],{"type":28,"value":1972},{"type":23,"tag":366,"props":2208,"children":2209},{"style":383},[2210],{"type":28,"value":1977},{"type":23,"tag":366,"props":2212,"children":2213},{"style":393},[2214],{"type":28,"value":1982},{"type":23,"tag":366,"props":2216,"children":2217},{"style":383},[2218],{"type":28,"value":1987},{"type":23,"tag":366,"props":2220,"children":2221},{"style":399},[2222],{"type":28,"value":683},{"type":23,"tag":366,"props":2224,"children":2225},{"style":383},[2226],{"type":28,"value":1872},{"type":23,"tag":366,"props":2228,"children":2229},{"style":399},[2230],{"type":28,"value":2231}," has_email,\n",{"type":23,"tag":366,"props":2233,"children":2234},{"class":368,"line":547},[2235,2239,2243,2247,2251,2256,2260,2264,2268,2272,2276,2280,2284,2288,2292,2296,2300,2304],{"type":23,"tag":366,"props":2236,"children":2237},{"style":393},[2238],{"type":28,"value":1920},{"type":23,"tag":366,"props":2240,"children":2241},{"style":399},[2242],{"type":28,"value":666},{"type":23,"tag":366,"props":2244,"children":2245},{"style":383},[2246],{"type":28,"value":1929},{"type":23,"tag":366,"props":2248,"children":2249},{"style":383},[2250],{"type":28,"value":1934},{"type":23,"tag":366,"props":2252,"children":2253},{"style":399},[2254],{"type":28,"value":2255}," Phone     ",{"type":23,"tag":366,"props":2257,"children":2258},{"style":383},[2259],{"type":28,"value":1944},{"type":23,"tag":366,"props":2261,"children":2262},{"style":383},[2263],{"type":28,"value":723},{"type":23,"tag":366,"props":2265,"children":2266},{"style":399},[2267],{"type":28,"value":2255},{"type":23,"tag":366,"props":2269,"children":2270},{"style":383},[2271],{"type":28,"value":1957},{"type":23,"tag":366,"props":2273,"children":2274},{"style":1859},[2275],{"type":28,"value":1962},{"type":23,"tag":366,"props":2277,"children":2278},{"style":383},[2279],{"type":28,"value":1967},{"type":23,"tag":366,"props":2281,"children":2282},{"style":393},[2283],{"type":28,"value":1972},{"type":23,"tag":366,"props":2285,"children":2286},{"style":383},[2287],{"type":28,"value":1977},{"type":23,"tag":366,"props":2289,"children":2290},{"style":393},[2291],{"type":28,"value":1982},{"type":23,"tag":366,"props":2293,"children":2294},{"style":383},[2295],{"type":28,"value":1987},{"type":23,"tag":366,"props":2297,"children":2298},{"style":399},[2299],{"type":28,"value":683},{"type":23,"tag":366,"props":2301,"children":2302},{"style":383},[2303],{"type":28,"value":1872},{"type":23,"tag":366,"props":2305,"children":2306},{"style":399},[2307],{"type":28,"value":2308}," has_phone,\n",{"type":23,"tag":366,"props":2310,"children":2311},{"class":368,"line":572},[2312,2317,2321,2326,2330,2335,2340,2345,2349,2353,2357,2361,2365,2369,2373,2377,2381],{"type":23,"tag":366,"props":2313,"children":2314},{"style":393},[2315],{"type":28,"value":2316},"  ROUND",{"type":23,"tag":366,"props":2318,"children":2319},{"style":399},[2320],{"type":28,"value":666},{"type":23,"tag":366,"props":2322,"children":2323},{"style":393},[2324],{"type":28,"value":2325},"100",{"type":23,"tag":366,"props":2327,"children":2328},{"style":399},[2329],{"type":28,"value":117},{"type":23,"tag":366,"props":2331,"children":2332},{"style":393},[2333],{"type":28,"value":2334},"0",{"type":23,"tag":366,"props":2336,"children":2337},{"style":383},[2338],{"type":28,"value":2339}," *",{"type":23,"tag":366,"props":2341,"children":2342},{"style":393},[2343],{"type":28,"value":2344}," SUM",{"type":23,"tag":366,"props":2346,"children":2347},{"style":399},[2348],{"type":28,"value":666},{"type":23,"tag":366,"props":2350,"children":2351},{"style":383},[2352],{"type":28,"value":1929},{"type":23,"tag":366,"props":2354,"children":2355},{"style":383},[2356],{"type":28,"value":1934},{"type":23,"tag":366,"props":2358,"children":2359},{"style":399},[2360],{"type":28,"value":1939},{"type":23,"tag":366,"props":2362,"children":2363},{"style":383},[2364],{"type":28,"value":1944},{"type":23,"tag":366,"props":2366,"children":2367},{"style":383},[2368],{"type":28,"value":723},{"type":23,"tag":366,"props":2370,"children":2371},{"style":399},[2372],{"type":28,"value":1939},{"type":23,"tag":366,"props":2374,"children":2375},{"style":383},[2376],{"type":28,"value":1957},{"type":23,"tag":366,"props":2378,"children":2379},{"style":1859},[2380],{"type":28,"value":1962},{"type":23,"tag":366,"props":2382,"children":2383},{"style":383},[2384],{"type":28,"value":2385}," AND\n",{"type":23,"tag":366,"props":2387,"children":2388},{"class":368,"line":597},[2389,2394,2398,2402,2406,2410,2414],{"type":23,"tag":366,"props":2390,"children":2391},{"style":399},[2392],{"type":28,"value":2393},"                              LastName  ",{"type":23,"tag":366,"props":2395,"children":2396},{"style":383},[2397],{"type":28,"value":1944},{"type":23,"tag":366,"props":2399,"children":2400},{"style":383},[2401],{"type":28,"value":723},{"type":23,"tag":366,"props":2403,"children":2404},{"style":399},[2405],{"type":28,"value":2024},{"type":23,"tag":366,"props":2407,"children":2408},{"style":383},[2409],{"type":28,"value":1957},{"type":23,"tag":366,"props":2411,"children":2412},{"style":1859},[2413],{"type":28,"value":1962},{"type":23,"tag":366,"props":2415,"children":2416},{"style":383},[2417],{"type":28,"value":2385},{"type":23,"tag":366,"props":2419,"children":2420},{"class":368,"line":622},[2421,2426,2430,2434,2438,2442,2446],{"type":23,"tag":366,"props":2422,"children":2423},{"style":399},[2424],{"type":28,"value":2425},"                              Title     ",{"type":23,"tag":366,"props":2427,"children":2428},{"style":383},[2429],{"type":28,"value":1944},{"type":23,"tag":366,"props":2431,"children":2432},{"style":383},[2433],{"type":28,"value":723},{"type":23,"tag":366,"props":2435,"children":2436},{"style":399},[2437],{"type":28,"value":2101},{"type":23,"tag":366,"props":2439,"children":2440},{"style":383},[2441],{"type":28,"value":1957},{"type":23,"tag":366,"props":2443,"children":2444},{"style":1859},[2445],{"type":28,"value":1962},{"type":23,"tag":366,"props":2447,"children":2448},{"style":383},[2449],{"type":28,"value":2385},{"type":23,"tag":366,"props":2451,"children":2452},{"class":368,"line":636},[2453,2458,2462,2466,2470,2474,2478],{"type":23,"tag":366,"props":2454,"children":2455},{"style":399},[2456],{"type":28,"value":2457},"                              Email     ",{"type":23,"tag":366,"props":2459,"children":2460},{"style":383},[2461],{"type":28,"value":1944},{"type":23,"tag":366,"props":2463,"children":2464},{"style":383},[2465],{"type":28,"value":723},{"type":23,"tag":366,"props":2467,"children":2468},{"style":399},[2469],{"type":28,"value":2178},{"type":23,"tag":366,"props":2471,"children":2472},{"style":383},[2473],{"type":28,"value":1957},{"type":23,"tag":366,"props":2475,"children":2476},{"style":1859},[2477],{"type":28,"value":1962},{"type":23,"tag":366,"props":2479,"children":2480},{"style":383},[2481],{"type":28,"value":2385},{"type":23,"tag":366,"props":2483,"children":2484},{"class":368,"line":650},[2485,2490,2494,2498,2502,2506],{"type":23,"tag":366,"props":2486,"children":2487},{"style":399},[2488],{"type":28,"value":2489},"                              Phone     ",{"type":23,"tag":366,"props":2491,"children":2492},{"style":383},[2493],{"type":28,"value":1944},{"type":23,"tag":366,"props":2495,"children":2496},{"style":383},[2497],{"type":28,"value":723},{"type":23,"tag":366,"props":2499,"children":2500},{"style":399},[2501],{"type":28,"value":2255},{"type":23,"tag":366,"props":2503,"children":2504},{"style":383},[2505],{"type":28,"value":1957},{"type":23,"tag":366,"props":2507,"children":2508},{"style":1859},[2509],{"type":28,"value":2510}," ''\n",{"type":23,"tag":366,"props":2512,"children":2513},{"class":368,"line":717},[2514,2519,2523,2527,2531,2535,2539,2544,2549,2553,2557,2562,2567,2572,2576],{"type":23,"tag":366,"props":2515,"children":2516},{"style":383},[2517],{"type":28,"value":2518},"                         THEN",{"type":23,"tag":366,"props":2520,"children":2521},{"style":393},[2522],{"type":28,"value":1972},{"type":23,"tag":366,"props":2524,"children":2525},{"style":383},[2526],{"type":28,"value":1977},{"type":23,"tag":366,"props":2528,"children":2529},{"style":393},[2530],{"type":28,"value":1982},{"type":23,"tag":366,"props":2532,"children":2533},{"style":383},[2534],{"type":28,"value":1987},{"type":23,"tag":366,"props":2536,"children":2537},{"style":399},[2538],{"type":28,"value":683},{"type":23,"tag":366,"props":2540,"children":2541},{"style":383},[2542],{"type":28,"value":2543},"\u002F",{"type":23,"tag":366,"props":2545,"children":2546},{"style":393},[2547],{"type":28,"value":2548}," COUNT",{"type":23,"tag":366,"props":2550,"children":2551},{"style":399},[2552],{"type":28,"value":666},{"type":23,"tag":366,"props":2554,"children":2555},{"style":383},[2556],{"type":28,"value":1898},{"type":23,"tag":366,"props":2558,"children":2559},{"style":399},[2560],{"type":28,"value":2561},"), ",{"type":23,"tag":366,"props":2563,"children":2564},{"style":393},[2565],{"type":28,"value":2566},"1",{"type":23,"tag":366,"props":2568,"children":2569},{"style":399},[2570],{"type":28,"value":2571},")              ",{"type":23,"tag":366,"props":2573,"children":2574},{"style":383},[2575],{"type":28,"value":1872},{"type":23,"tag":366,"props":2577,"children":2578},{"style":399},[2579],{"type":28,"value":2580}," pct_fully_complete\n",{"type":23,"tag":366,"props":2582,"children":2583},{"class":368,"line":762},[2584,2588],{"type":23,"tag":366,"props":2585,"children":2586},{"style":383},[2587],{"type":28,"value":628},{"type":23,"tag":366,"props":2589,"children":2590},{"style":399},[2591],{"type":28,"value":2592}," Lead\n",{"type":23,"tag":366,"props":2594,"children":2595},{"class":368,"line":793},[2596,2601,2606,2610],{"type":23,"tag":366,"props":2597,"children":2598},{"style":383},[2599],{"type":28,"value":2600},"WHERE",{"type":23,"tag":366,"props":2602,"children":2603},{"style":399},[2604],{"type":28,"value":2605}," IsDeleted ",{"type":23,"tag":366,"props":2607,"children":2608},{"style":383},[2609],{"type":28,"value":688},{"type":23,"tag":366,"props":2611,"children":2612},{"style":399},[2613],{"type":28,"value":790},{"type":23,"tag":366,"props":2615,"children":2616},{"class":368,"line":821},[2617,2622,2627,2632,2637,2641,2645,2649,2654,2659,2664,2668],{"type":23,"tag":366,"props":2618,"children":2619},{"style":383},[2620],{"type":28,"value":2621},"  AND",{"type":23,"tag":366,"props":2623,"children":2624},{"style":399},[2625],{"type":28,"value":2626}," CreatedDate ",{"type":23,"tag":366,"props":2628,"children":2629},{"style":383},[2630],{"type":28,"value":2631},">=",{"type":23,"tag":366,"props":2633,"children":2634},{"style":393},[2635],{"type":28,"value":2636}," DATEADD",{"type":23,"tag":366,"props":2638,"children":2639},{"style":399},[2640],{"type":28,"value":666},{"type":23,"tag":366,"props":2642,"children":2643},{"style":1859},[2644],{"type":28,"value":1862},{"type":23,"tag":366,"props":2646,"children":2647},{"style":399},[2648],{"type":28,"value":97},{"type":23,"tag":366,"props":2650,"children":2651},{"style":383},[2652],{"type":28,"value":2653},"-",{"type":23,"tag":366,"props":2655,"children":2656},{"style":393},[2657],{"type":28,"value":2658},"12",{"type":23,"tag":366,"props":2660,"children":2661},{"style":399},[2662],{"type":28,"value":2663},", DATE_TRUNC(",{"type":23,"tag":366,"props":2665,"children":2666},{"style":1859},[2667],{"type":28,"value":1862},{"type":23,"tag":366,"props":2669,"children":2670},{"style":399},[2671],{"type":28,"value":2672},", CURRENT_DATE))\n",{"type":23,"tag":366,"props":2674,"children":2675},{"class":368,"line":851},[2676,2681,2686,2690],{"type":23,"tag":366,"props":2677,"children":2678},{"style":383},[2679],{"type":28,"value":2680},"GROUP BY",{"type":23,"tag":366,"props":2682,"children":2683},{"style":399},[2684],{"type":28,"value":2685}," DATE_TRUNC(",{"type":23,"tag":366,"props":2687,"children":2688},{"style":1859},[2689],{"type":28,"value":1862},{"type":23,"tag":366,"props":2691,"children":2692},{"style":399},[2693],{"type":28,"value":2694},", CreatedDate)\n",{"type":23,"tag":366,"props":2696,"children":2697},{"class":368,"line":879},[2698,2702],{"type":23,"tag":366,"props":2699,"children":2700},{"style":383},[2701],{"type":28,"value":885},{"type":23,"tag":366,"props":2703,"children":2704},{"style":383},[2705],{"type":28,"value":2706}," month\n",{"type":23,"tag":24,"props":2708,"children":2709},{},[2710,2712,2718],{"type":28,"value":2711},"If ",{"type":23,"tag":362,"props":2713,"children":2715},{"className":2714},[],[2716],{"type":28,"value":2717},"pct_fully_complete",{"type":28,"value":2719}," is trending down, your lead capture forms or data entry workflows need attention. If it's trending up, your governance efforts are working.",{"type":23,"tag":36,"props":2721,"children":2723},{"id":2722},"putting-it-together",[2724],{"type":28,"value":2725},"Putting It Together",{"type":23,"tag":24,"props":2727,"children":2728},{},[2729],{"type":28,"value":2730},"Governance is not a one-time project. It's a recurring operating rhythm:",{"type":23,"tag":2732,"props":2733,"children":2734},"ol",{},[2735,2745,2755,2765],{"type":23,"tag":47,"props":2736,"children":2737},{},[2738,2743],{"type":23,"tag":91,"props":2739,"children":2740},{},[2741],{"type":28,"value":2742},"Assign the RACI.",{"type":28,"value":2744}," Document owners, stewards, and custodians for every critical Salesforce object and policy.",{"type":23,"tag":47,"props":2746,"children":2747},{},[2748,2753],{"type":23,"tag":91,"props":2749,"children":2750},{},[2751],{"type":28,"value":2752},"Instrument the controls.",{"type":28,"value":2754}," Wire each assignment to a Salesforce permission, validation rule, or approval process.",{"type":23,"tag":47,"props":2756,"children":2757},{},[2758,2763],{"type":23,"tag":91,"props":2759,"children":2760},{},[2761],{"type":28,"value":2762},"Measure compliance.",{"type":28,"value":2764}," Schedule the SQL queries above to run weekly or monthly and deliver results to the relevant data steward.",{"type":23,"tag":47,"props":2766,"children":2767},{},[2768,2773],{"type":23,"tag":91,"props":2769,"children":2770},{},[2771],{"type":28,"value":2772},"Review and update.",{"type":28,"value":2774}," Revisit RACI assignments when processes change — new campaigns, new objects, or new integrations all shift ownership.",{"type":23,"tag":24,"props":2776,"children":2777},{},[2778],{"type":28,"value":2779},"Clean data doesn't happen by accident. It happens when the right person has the right access, the right responsibility, and a dashboard that tells them whether they're meeting the standard.",{"type":23,"tag":76,"props":2781,"children":2782},{},[],{"type":23,"tag":24,"props":2784,"children":2785},{},[2786],{"type":23,"tag":2787,"props":2788,"children":2789},"em",{},[2790,2792,2798,2800,2808],{"type":28,"value":2791},"Want to run these queries against your own Salesforce and Marketo data? ",{"type":23,"tag":51,"props":2793,"children":2795},{"href":2794},"\u002F#videos",[2796],{"type":28,"value":2797},"Watch a demo",{"type":28,"value":2799}," or ",{"type":23,"tag":51,"props":2801,"children":2805},{"href":2802,"rel":2803},"https:\u002F\u002Fapp.datachef.com\u002Flogin?utm_source=blog&utm_content=raci-for-salesforce-data-governance",[2804],"nofollow",[2806],{"type":28,"value":2807},"try Datachef free for 30 days",{"type":28,"value":117},{"type":23,"tag":2810,"props":2811,"children":2812},"style",{},[2813],{"type":28,"value":2814},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":7,"searchDepth":379,"depth":379,"links":2816},[2817,2818,2819,2820,2821,2822],{"id":38,"depth":379,"text":41},{"id":345,"depth":379,"text":348},{"id":901,"depth":379,"text":904},{"id":1380,"depth":379,"text":1383},{"id":1818,"depth":379,"text":1821},{"id":2722,"depth":379,"text":2725},"markdown","content:blog:raci-for-salesforce-data-governance.md","content","blog\u002Fraci-for-salesforce-data-governance.md","blog\u002Fraci-for-salesforce-data-governance","md",1792179157370]