[{"data":1,"prerenderedAt":463},["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":458,"_id":459,"_source":460,"_file":461,"_extension":462},"/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-27",{"name":12,"title":13},"Joe Fusaro","Founder, Datachef",[15,16],"marketing attribution","salesforce","/datachef.png",{"type":19,"children":20,"toc":454},"root",[21,29,34,47,59,72,77,92,105,112,162,166,172,177,186,191,196,208,213,218,226,235,240,248,253,258,266,271,357,363,368,373,381,386,394,402,407,412,420,423,431],{"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 & marketing, where we engage multiple people across multiple channels.",{"type":22,"tag":23,"props":35,"children":36},{},[37,39,45],{"type":27,"value":38},"Trying to determine which ",{"type":22,"tag":40,"props":41,"children":42},"em",{},[43],{"type":27,"value":44},"one thing",{"type":27,"value":46}," resulted in a sale could be very misleading.",{"type":22,"tag":23,"props":48,"children":49},{},[50,52,57],{"type":27,"value":51},"Many sales and marketing teams come to the conclusion that something that ",{"type":22,"tag":40,"props":53,"children":54},{},[55],{"type":27,"value":56},"distributes",{"type":27,"value":58}," credit across the tactics that influenced pipeline and revenue is what is needed.",{"type":22,"tag":23,"props":60,"children":61},{},[62,64,70],{"type":27,"value":63},"Enter: ",{"type":22,"tag":65,"props":66,"children":67},"strong",{},[68],{"type":27,"value":69},"multi-touch marketing attribution models",{"type":27,"value":71},".",{"type":22,"tag":23,"props":73,"children":74},{},[75],{"type":27,"value":76},"The challenge with multi-touch marketing attribution models is that data & logic requirements become expontentially more complex -- way more complex than source systems (e.g. Salesforce, Marketo) can handle natively.",{"type":22,"tag":23,"props":78,"children":79},{},[80,82,90],{"type":27,"value":81},"This is an area where ",{"type":22,"tag":83,"props":84,"children":87},"a",{"target":85,"href":86},"_blank","https://app.datachef.com",[88],{"type":27,"value":89},"Datachef",{"type":27,"value":91}," shines.",{"type":22,"tag":23,"props":93,"children":94},{},[95,97,103],{"type":27,"value":96},"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":83,"props":98,"children":100},{"target":85,"href":99},"/blog/marketing-analytics-has-a-reputation-problem#_3-attribution-models-must-be-explainable-and-defensible",[101],{"type":27,"value":102},"previously written about",{"type":27,"value":104}," 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":106,"props":107,"children":109},"h2",{"id":108},"table-of-contents",[110],{"type":27,"value":111},"Table of Contents",{"type":22,"tag":113,"props":114,"children":115},"ul",{},[116,126,135,144,153],{"type":22,"tag":117,"props":118,"children":119},"li",{},[120],{"type":22,"tag":83,"props":121,"children":123},{"href":122},"#start-with-a-prompt-to-describe-your-multi-touch-attribution-model",[124],{"type":27,"value":125},"Start with a prompt to describe your multi-touch attribution model",{"type":22,"tag":117,"props":127,"children":128},{},[129],{"type":22,"tag":83,"props":130,"children":132},{"href":131},"#adjust-synced-fields-if-needed",[133],{"type":27,"value":134},"Adjust synced fields, if needed",{"type":22,"tag":117,"props":136,"children":137},{},[138],{"type":22,"tag":83,"props":139,"children":141},{"href":140},"#review-the-generated-query-table",[142],{"type":27,"value":143},"Review the generated query & table",{"type":22,"tag":117,"props":145,"children":146},{},[147],{"type":22,"tag":83,"props":148,"children":150},{"href":149},"#codify-your-data-model",[151],{"type":27,"value":152},"Codify your data model",{"type":22,"tag":117,"props":154,"children":155},{},[156],{"type":22,"tag":83,"props":157,"children":159},{"href":158},"#create-share-visualizations",[160],{"type":27,"value":161},"Create & share visualizations",{"type":22,"tag":163,"props":164,"children":165},"hr",{},[],{"type":22,"tag":167,"props":168,"children":170},"h1",{"id":169},"start-with-a-prompt-to-describe-your-multi-touch-attribution-model",[171],{"type":27,"value":125},{"type":22,"tag":23,"props":173,"children":174},{},[175],{"type":27,"value":176},"We'll start with a prompt that explains the parameters for our multi-touch attribution model:",{"type":22,"tag":178,"props":179,"children":180},"blockquote",{},[181],{"type":22,"tag":23,"props":182,"children":183},{},[184],{"type":27,"value":185},"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":187,"children":188},{},[189],{"type":27,"value":190},"You can use this as a starting point, or you can go straight to the SQL editor if you prefer.",{"type":22,"tag":167,"props":192,"children":194},{"id":193},"adjust-synced-fields-if-needed",[195],{"type":27,"value":134},{"type":22,"tag":23,"props":197,"children":198},{},[199,201,206],{"type":27,"value":200},"Datachef combines (a) full awareness of your source system metadata, and (b) a knowledgebase for each system that we support. This allows our AI to reason out which fields it should use to provide the ",{"type":22,"tag":65,"props":202,"children":203},{},[204],{"type":27,"value":205},"right",{"type":27,"value":207}," answer. Otherwise, your LLM will hallucinate and give the best answer with the fields it already has access to.",{"type":22,"tag":23,"props":209,"children":210},{},[211],{"type":27,"value":212},"Datachef will raise when it needs additional tables and/or fields to perform analysis.",{"type":22,"tag":23,"props":214,"children":215},{},[216],{"type":27,"value":217},"In this example, it tells us:",{"type":22,"tag":178,"props":219,"children":220},{},[221],{"type":22,"tag":23,"props":222,"children":223},{},[224],{"type":27,"value":225},"To answer this question, I need access to the \"campaign\" table, and the following columns: id, name, isdeleted.",{"type":22,"tag":23,"props":227,"children":228},{},[229],{"type":22,"tag":230,"props":231,"children":234},"img",{"alt":232,"src":233},"Create a multi-touch attribution model: validation","/blog/create-attribution-with-natural-language-1-validation-of-tables-fields.png",[],{"type":22,"tag":23,"props":236,"children":237},{},[238],{"type":27,"value":239},"You can easily remedy this by syncing these fields for your connection.",{"type":22,"tag":23,"props":241,"children":242},{},[243],{"type":22,"tag":230,"props":244,"children":247},{"alt":245,"src":246},"Create a multi-touch attribution model: sync additional fields","/blog/multi-touch-marketing-attribution-sync-campaign-fields.gif",[],{"type":22,"tag":167,"props":249,"children":251},{"id":250},"review-the-generated-query-table",[252],{"type":27,"value":143},{"type":22,"tag":23,"props":254,"children":255},{},[256],{"type":27,"value":257},"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":259,"children":260},{},[261],{"type":22,"tag":230,"props":262,"children":265},{"alt":263,"src":264},"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":267,"children":268},{},[269],{"type":27,"value":270},"The output of our query returns a simple table:",{"type":22,"tag":272,"props":273,"children":274},"table",{},[275,299],{"type":22,"tag":276,"props":277,"children":278},"thead",{},[279],{"type":22,"tag":280,"props":281,"children":282},"tr",{},[283,289,294],{"type":22,"tag":284,"props":285,"children":286},"th",{},[287],{"type":27,"value":288},"Campaign Name",{"type":22,"tag":284,"props":290,"children":291},{},[292],{"type":27,"value":293},"Attributed Pipeline",{"type":22,"tag":284,"props":295,"children":296},{},[297],{"type":27,"value":298},"Attributed Closed Won Revenue",{"type":22,"tag":300,"props":301,"children":302},"tbody",{},[303,322,339],{"type":22,"tag":280,"props":304,"children":305},{},[306,312,317],{"type":22,"tag":307,"props":308,"children":309},"td",{},[310],{"type":27,"value":311},"User Conference",{"type":22,"tag":307,"props":313,"children":314},{},[315],{"type":27,"value":316},"30000",{"type":22,"tag":307,"props":318,"children":319},{},[320],{"type":27,"value":321},"22500",{"type":22,"tag":280,"props":323,"children":324},{},[325,330,335],{"type":22,"tag":307,"props":326,"children":327},{},[328],{"type":27,"value":329},"ABM Performance Webinar",{"type":22,"tag":307,"props":331,"children":332},{},[333],{"type":27,"value":334},"60000",{"type":22,"tag":307,"props":336,"children":337},{},[338],{"type":27,"value":321},{"type":22,"tag":280,"props":340,"children":341},{},[342,347,352],{"type":22,"tag":307,"props":343,"children":344},{},[345],{"type":27,"value":346},"total",{"type":22,"tag":307,"props":348,"children":349},{},[350],{"type":27,"value":351},"90000",{"type":22,"tag":307,"props":353,"children":354},{},[355],{"type":27,"value":356},"45000",{"type":22,"tag":167,"props":358,"children":360},{"id":359},"create-a-model",[361],{"type":27,"value":362},"Create a model",{"type":22,"tag":23,"props":364,"children":365},{},[366],{"type":27,"value":367},"Models ensure that every user gets consistent results vs. different models being spun up on the fly by the LLM and returning different results.",{"type":22,"tag":23,"props":369,"children":370},{},[371],{"type":27,"value":372},"Once we've validated that our query is working as expected, we can easily create a model from it.",{"type":22,"tag":23,"props":374,"children":375},{},[376],{"type":22,"tag":230,"props":377,"children":380},{"alt":378,"src":379},"Create the multi-touch model","/blog/create-multi-touch-attribution-model.gif",[],{"type":22,"tag":23,"props":382,"children":383},{},[384],{"type":27,"value":385},"The next time I ask about campaign attribution, Datachef will know to use our attribution model.",{"type":22,"tag":178,"props":387,"children":388},{},[389],{"type":22,"tag":23,"props":390,"children":391},{},[392],{"type":27,"value":393},"How much pipeline and revenue is attributed to the ABM Campaign?",{"type":22,"tag":23,"props":395,"children":396},{},[397],{"type":22,"tag":230,"props":398,"children":401},{"alt":399,"src":400},"Reuse your multi-touch marketing attribution model","/blog/multi-touch-attribution-data-model-reference.png",[],{"type":22,"tag":167,"props":403,"children":405},{"id":404},"create-share-visualizations",[406],{"type":27,"value":161},{"type":22,"tag":23,"props":408,"children":409},{},[410],{"type":27,"value":411},"Lastly, if I want, I can create a simple visualization to show the output of my model.",{"type":22,"tag":23,"props":413,"children":414},{},[415],{"type":22,"tag":230,"props":416,"children":419},{"alt":417,"src":418},"Visualize your multi-touch attribution model","/blog/build-multi-touch-attribution-visualization.gif",[],{"type":22,"tag":163,"props":421,"children":422},{},[],{"type":22,"tag":23,"props":424,"children":425},{},[426],{"type":22,"tag":40,"props":427,"children":428},{},[429],{"type":27,"value":430},"Want to build your own multi-touch marketing attribution model?",{"type":22,"tag":23,"props":432,"children":433},{},[434],{"type":22,"tag":40,"props":435,"children":436},{},[437,443,445,453],{"type":22,"tag":83,"props":438,"children":440},{"href":439},"/demo",[441],{"type":27,"value":442},"Check out additional video demos",{"type":27,"value":444}," or ",{"type":22,"tag":83,"props":446,"children":450},{"href":447,"rel":448},"https://app.datachef.com/login?utm_source=blog&utm_content=sql-for-marketers",[449],"nofollow",[451],{"type":27,"value":452},"try Datachef free for 14 days",{"type":27,"value":71},{"title":7,"searchDepth":455,"depth":455,"links":456},2,[457],{"id":108,"depth":455,"text":111},"markdown","content:blog:create-multi-touch-attribution-model-from-one-prompt.md","content","blog/create-multi-touch-attribution-model-from-one-prompt.md","md",1779898546925]