[{"data":1,"prerenderedAt":369},["Reactive",2],{"blog-create-multi-touch-attribution-model-from-one-prompt":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"author":11,"tags":14,"image":17,"body":18,"_type":364,"_id":365,"_source":366,"_file":367,"_extension":368},"/blog/create-multi-touch-attribution-model-from-one-prompt","blog",false,"","Multi-Touch Attribution with Datachef and a single prompt","Create an explainable, defensible multi-touch marketing attribution model that intelligently distributes credit among sales and marketing tactics","2026-04-06",{"name":12,"title":13},"Joe Fusaro","Founder, Datachef",[15,16],"marketing attribution","salesforce","/datachef.png",{"type":19,"children":20,"toc":361},"root",[21,29,34,47,60,65,80,93,100,105,114,119,125,130,135,143,152,157,165,171,176,184,189,275,281,286,291,299,307,313,318,326,330,338],{"type":22,"tag":23,"props":24,"children":25},"element","p",{},[26],{"type":27,"value":28},"text","Marketing attribution is a contentious topic. Single-touch attribution models -- the one that most CRM systems like Salesforce default to -- typically result in different teams jostling for credit.",{"type":22,"tag":23,"props":30,"children":31},{},[32],{"type":27,"value":33},"This is especially true in B2B sales, where we engage multiple people across multiple channels.",{"type":22,"tag":23,"props":35,"children":36},{},[37,39,45],{"type":27,"value":38},"Many marketers come to the conclusion that something that ",{"type":22,"tag":40,"props":41,"children":42},"em",{},[43],{"type":27,"value":44},"distributes",{"type":27,"value":46}," credit is what is needed.",{"type":22,"tag":23,"props":48,"children":49},{},[50,52,58],{"type":27,"value":51},"Enter: ",{"type":22,"tag":53,"props":54,"children":55},"strong",{},[56],{"type":27,"value":57},"multi-touch marketing attribution models",{"type":27,"value":59},".",{"type":22,"tag":23,"props":61,"children":62},{},[63],{"type":27,"value":64},"The challenge with multi-touch marketing attribution models is that data & logic requirements become expontentially more complex here, significantly more complex than source systems (e.g. Salesforce) can handle natively.",{"type":22,"tag":23,"props":66,"children":67},{},[68,70,78],{"type":27,"value":69},"This is an area where ",{"type":22,"tag":71,"props":72,"children":75},"a",{"target":73,"href":74},"_blank","https://app.datachef.com",[76],{"type":27,"value":77},"Datachef",{"type":27,"value":79}," shines.",{"type":22,"tag":23,"props":81,"children":82},{},[83,85,91],{"type":27,"value":84},"In this post, we'll walk through the creation of a multi-touch attribution model that adheres to some of the core principles that I've ",{"type":22,"tag":71,"props":86,"children":88},{"target":73,"href":87},"/blog/marketing-analytics-has-a-reputation-problem#_3-attribution-models-must-be-explainable-and-defensible",[89],{"type":27,"value":90},"previously written about",{"type":27,"value":92}," while reducing the complexity that has historically been associated with such models. You no longer need a data engineer, CRM admin, and a team of analysts to build out your marketing attribution model; you can build out all of this with Datachef and a single, well-written prompt.",{"type":22,"tag":94,"props":95,"children":97},"h1",{"id":96},"start-with-a-prompt-to-describe-your-multi-touch-attribution-model",[98],{"type":27,"value":99},"Start with a prompt to describe your multi-touch attribution model",{"type":22,"tag":23,"props":101,"children":102},{},[103],{"type":27,"value":104},"We'll start with a prompt that explains the parameters for our multi-touch attribution model:",{"type":22,"tag":106,"props":107,"children":108},"blockquote",{},[109],{"type":22,"tag":23,"props":110,"children":111},{},[112],{"type":27,"value":113},"I want to know the total value of open pipeline and closed won pipeline attributed to campaigns using a multi-touch attribution model. A campaign may get attribution credit only if the campaign member response preceded the opportunity creation by up to 180 days. Do NOT use the Opportunity campaignid, which will only consider single-touch attribution.",{"type":22,"tag":23,"props":115,"children":116},{},[117],{"type":27,"value":118},"You can use this as a starting point, or you can go straight to the SQL editor if you prefer.",{"type":22,"tag":94,"props":120,"children":122},{"id":121},"adjust-synced-fields-if-needed",[123],{"type":27,"value":124},"Adjust synced fields, if needed",{"type":22,"tag":23,"props":126,"children":127},{},[128],{"type":27,"value":129},"Datachef will raise when it needs additional tables and/or fields to perform analysis.",{"type":22,"tag":23,"props":131,"children":132},{},[133],{"type":27,"value":134},"In this example, it tells us:",{"type":22,"tag":106,"props":136,"children":137},{},[138],{"type":22,"tag":23,"props":139,"children":140},{},[141],{"type":27,"value":142},"To answer this question, I need access to the \"campaign\" table, and the following columns: id, name, isdeleted.",{"type":22,"tag":23,"props":144,"children":145},{},[146],{"type":22,"tag":147,"props":148,"children":151},"img",{"alt":149,"src":150},"Create a multi-touch attribution model: validation","/blog/create-attribution-with-natural-language-1-validation-of-tables-fields.png",[],{"type":22,"tag":23,"props":153,"children":154},{},[155],{"type":27,"value":156},"You can easily remedy this by syncing these fields for your connection.",{"type":22,"tag":23,"props":158,"children":159},{},[160],{"type":22,"tag":147,"props":161,"children":164},{"alt":162,"src":163},"Create a multi-touch attribution model: sync additional fields","/blog/multi-touch-marketing-attribution-sync-campaign-fields.gif",[],{"type":22,"tag":94,"props":166,"children":168},{"id":167},"review-the-generated-query-table",[169],{"type":27,"value":170},"Review the generated query & table",{"type":22,"tag":23,"props":172,"children":173},{},[174],{"type":27,"value":175},"After all of the tables and fields are synced to Datachef, I see can toggle to inspect the query that's been constructed.",{"type":22,"tag":23,"props":177,"children":178},{},[179],{"type":22,"tag":147,"props":180,"children":183},{"alt":181,"src":182},"Toggle between natural language description of a multi-touch attribution model and the SQL query","/blog/multi-touch-marketing-attribution-toggle-natural-language-to-sql.gif",[],{"type":22,"tag":23,"props":185,"children":186},{},[187],{"type":27,"value":188},"The output of our query returns a simple table:",{"type":22,"tag":190,"props":191,"children":192},"table",{},[193,217],{"type":22,"tag":194,"props":195,"children":196},"thead",{},[197],{"type":22,"tag":198,"props":199,"children":200},"tr",{},[201,207,212],{"type":22,"tag":202,"props":203,"children":204},"th",{},[205],{"type":27,"value":206},"Campaign Name",{"type":22,"tag":202,"props":208,"children":209},{},[210],{"type":27,"value":211},"Attributed Pipeline",{"type":22,"tag":202,"props":213,"children":214},{},[215],{"type":27,"value":216},"Attributed Closed Won Revenue",{"type":22,"tag":218,"props":219,"children":220},"tbody",{},[221,240,257],{"type":22,"tag":198,"props":222,"children":223},{},[224,230,235],{"type":22,"tag":225,"props":226,"children":227},"td",{},[228],{"type":27,"value":229},"User Conference",{"type":22,"tag":225,"props":231,"children":232},{},[233],{"type":27,"value":234},"30000",{"type":22,"tag":225,"props":236,"children":237},{},[238],{"type":27,"value":239},"22500",{"type":22,"tag":198,"props":241,"children":242},{},[243,248,253],{"type":22,"tag":225,"props":244,"children":245},{},[246],{"type":27,"value":247},"ABM Performance Webinar",{"type":22,"tag":225,"props":249,"children":250},{},[251],{"type":27,"value":252},"60000",{"type":22,"tag":225,"props":254,"children":255},{},[256],{"type":27,"value":239},{"type":22,"tag":198,"props":258,"children":259},{},[260,265,270],{"type":22,"tag":225,"props":261,"children":262},{},[263],{"type":27,"value":264},"total",{"type":22,"tag":225,"props":266,"children":267},{},[268],{"type":27,"value":269},"90000",{"type":22,"tag":225,"props":271,"children":272},{},[273],{"type":27,"value":274},"45000",{"type":22,"tag":94,"props":276,"children":278},{"id":277},"codify-your-data-model",[279],{"type":27,"value":280},"Codify your data model",{"type":22,"tag":23,"props":282,"children":283},{},[284],{"type":27,"value":285},"Next, we'll copy the SQL generated to a Data Model. This will allow use to reuse our attribution model in future questions and in visualizations.",{"type":22,"tag":23,"props":287,"children":288},{},[289],{"type":27,"value":290},"The next time I ask about campaign attribution, Datachef will know to use our attribution model.",{"type":22,"tag":106,"props":292,"children":293},{},[294],{"type":22,"tag":23,"props":295,"children":296},{},[297],{"type":27,"value":298},"How much pipeline and revenue is attributed to the ABM Campaign?",{"type":22,"tag":23,"props":300,"children":301},{},[302],{"type":22,"tag":147,"props":303,"children":306},{"alt":304,"src":305},"Reuse your multi-touch marketing attribution model","/blog/multi-touch-attribution-data-model-reference.png",[],{"type":22,"tag":94,"props":308,"children":310},{"id":309},"create-share-visualizations",[311],{"type":27,"value":312},"Create & share visualizations",{"type":22,"tag":23,"props":314,"children":315},{},[316],{"type":27,"value":317},"Lastly, if I want, I can create a simple visualization to show the output of my model.",{"type":22,"tag":23,"props":319,"children":320},{},[321],{"type":22,"tag":147,"props":322,"children":325},{"alt":323,"src":324},"Visualize your multi-touch attribution model","/blog/build-multi-touch-attribution-visualization.gif",[],{"type":22,"tag":327,"props":328,"children":329},"hr",{},[],{"type":22,"tag":23,"props":331,"children":332},{},[333],{"type":22,"tag":40,"props":334,"children":335},{},[336],{"type":27,"value":337},"Want to build your own multi-touch marketing attribution model?",{"type":22,"tag":23,"props":339,"children":340},{},[341],{"type":22,"tag":40,"props":342,"children":343},{},[344,350,352,360],{"type":22,"tag":71,"props":345,"children":347},{"href":346},"/demo",[348],{"type":27,"value":349},"Check out additional video demos",{"type":27,"value":351}," or ",{"type":22,"tag":71,"props":353,"children":357},{"href":354,"rel":355},"https://app.datachef.com/login?utm_source=blog&utm_content=sql-for-marketers",[356],"nofollow",[358],{"type":27,"value":359},"try Datachef free for 14 days",{"type":27,"value":59},{"title":7,"searchDepth":362,"depth":362,"links":363},2,[],"markdown","content:blog:create-multi-touch-attribution-model-from-one-prompt.md","content","blog/create-multi-touch-attribution-model-from-one-prompt.md","md",1777561148442]