<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Cansu Sari on Medium]]></title>
        <description><![CDATA[Stories by Cansu Sari on Medium]]></description>
        <link>https://medium.com/@cansusari?source=rss-8d4b040361f9------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*27olEoJcgGCyRj4_aMCm2Q.png</url>
            <title>Stories by Cansu Sari on Medium</title>
            <link>https://medium.com/@cansusari?source=rss-8d4b040361f9------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 05:52:25 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@cansusari/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Empowering Assumption Management with Automation: A Profitability Use Case]]></title>
            <link>https://medium.com/trendyol-tech/empowering-assumption-management-with-automation-a-profitability-use-case-ddd9a783c59d?source=rss-8d4b040361f9------2</link>
            <guid isPermaLink="false">https://medium.com/p/ddd9a783c59d</guid>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[analytics-engineering]]></category>
            <category><![CDATA[google-sheets]]></category>
            <category><![CDATA[google-apps-script]]></category>
            <category><![CDATA[process-improvement]]></category>
            <dc:creator><![CDATA[Cansu Sari]]></dc:creator>
            <pubDate>Tue, 02 Dec 2025 14:29:03 GMT</pubDate>
            <atom:updated>2025-12-03T06:24:59.041Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ulOFRyGsm6V5PVduFQoZog.png" /><figcaption>AI Generated Image</figcaption></figure><p>In fast-paced e-commerce operations, calculating profitability in near real-time is not a luxury — it’s a necessity. But when many of the inputs that drive these calculations rely on manual updates and assumptions, keeping everything both accurate and scalable becomes a serious challenge.</p><p>At Trendyol Tech, we faced this exact problem in our PM2 pipeline — our profitability metric. As Analytics Engineers, we needed a way to make assumption management both reliable and scalable. This is the story of how we automated that process using Google Sheets, Apps Script, and simple validation logic — a lightweight solution built in weeks, now powering seamless updates every month.</p><h3>The Problem: Assumptions Are Inevitable — But Updating Them Was a Pain</h3><p>At Trendyol, we track the profitability of sales made on our international storefronts using a comprehensive metric (PM2) composed of 30+ sub-metrics. These span areas like revenue drivers, logistics and fulfillment costs, discount mechanisms, operational and warehouse expenses, compliance and customs-related fees, as well as payment processing costs. Many of them depend on <strong>estimated values made at the time of order</strong> — well before actual invoices arrive.</p><p>To handle this, we use a <strong>dual structure</strong>:</p><ul><li><strong>Assumptions</strong>, for near real-time calculations</li><li><strong>Realizations</strong>, once actual invoice data arrives</li></ul><p>Take <strong>last mile shipping cost</strong> as an example. Since we can’t know the exact cost before a package is delivered, we estimate it based on the cargo provider, expected deci, origin/destination countries, and more.</p><p>Other examples:</p><ul><li><strong>Unit costs</strong>, where warehouse totals are allocated across product sizes and fulfillment types</li><li><strong>Customs and clearance costs</strong>, estimated from declared value and country-specific rules</li><li><strong>Charter (plane) costs</strong>, which need to be distributed proportionally</li></ul><p>We store all these assumption tables in <strong>Google Sheets</strong>. It’s a tool our business teams know well, and we load them directly into BigQuery to use in our pipelines.</p><p>But as our operation scales across regions and partners, these sheets need <strong>frequent updates</strong>:</p><ul><li>When a new cargo provider or country is added</li><li>When cost agreements change or discounts are applied</li><li>When legal rules or customs thresholds shift</li><li>Simply when new dates roll in</li></ul><p>This led to a bottleneck: <strong>the process for updating and validating assumption data was manual, fragile, and time-consuming.</strong></p><h4>Before Automation: A Slow, Manual Flow</h4><p>Before our automation, updating these assumptions looked something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4fFkrALpxQJxO75JJlqbKg.png" /><figcaption>Process Flow Before Automation</figcaption></figure><ol><li>Business team sends a new Google Sheet with updates (often a duplicate of the existing one)</li><li>The analytics engineering team creates a temporary table for validation</li><li>Manual checks for: date overlaps, ID duplicates, value outliers, potential join duplications, specific rulesets etc.</li><li>Issues found → feedback sent back to the business team</li><li>Team revises the data → process restarts</li><li>Once validated, values are changed in the production sheet</li><li>The BigQuery table used in the flow is refreshed using extraction table</li><li>Sales flow is re-run with the new assumptions</li></ol><p>This back-and-forth process took <strong>~2 hours on average</strong> per update — not ideal when you’re managing multiple regions with a loaded backlog, and fast-moving operations.</p><h3>The Solution: Empowering Teams with Self-Validation</h3><p>We didn’t want to build a complex frontend or launch a new tool just for this. The ideal solution had to be:</p><ul><li>Close to our users (business teams)</li><li>Easy to adopt with minimal onboarding</li><li>Flexible enough to support edge cases across different cost types</li><li>And most importantly, <strong>automated</strong> to reduce back-and-forth with the business and analytics engineering teams</li></ul><p><strong>So we built the solution right where the assumptions already lived: in Google Sheets.</strong></p><p>Using <strong>Apps Script</strong>, we developed a lightweight validation engine that runs inside the sheets. Business users now manage assumption updates in dedicated WIP sheets, and a simple “Validate” menu lets them check the quality of their data <em>before</em> coming to us.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5_jdINAbjsmL4y-kRdHfTQ.png" /><figcaption>Assumption Update Automation Validate Menu in Google Sheets</figcaption></figure><p>Here’s what gets automatically checked with a single click:</p><ul><li>Required fields are filled</li><li>No overlapping date ranges within matching groups</li><li>No duplicate IDs (when applicable)</li><li>Outlier detection on cost columns</li><li>Consistent formatting for date and numeric fields</li></ul><p>Each row gets highlighted in a color code based on the issue, and users can iterate and fix directly without needing help from data teams.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/450/1*X0BT1P2lnqY_ezMCP6ORBg.png" /><figcaption>Example Pop-Up Validation Result</figcaption></figure><p>Once the data is clean, our team can quickly scan the sheet and hit “Publish” from our own secure menu. Here’s what happens in the background:</p><ol><li>All changes are pushed to the production sheet</li><li>A hidden backup is created automatically (we keep the last 2)</li><li>The WIP sheet is cleared and removed to avoid clutter</li><li>Dates and cost values are auto-formatted for consistency</li></ol><p>We also automated the backend scheduling to complete the loop:</p><ul><li>A daily BigQuery refresh pulls in the latest assumption values from the extraction layer</li><li>The sales flow is re-run each evening automatically, ensuring profitability outputs are always in sync</li></ul><p>Here is a summary of the new process flow:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3owyNRej7wWJ6w4_uJYxvQ.png" /><figcaption>Process Flow After Automation</figcaption></figure><p>In the new flow, once business teams input data into the designated Google Sheet, they can immediately trigger a validation process themselves — no more sending data links or waiting in a feedback loop. If any issues are flagged (like overlapping dates or duplicate IDs), they’re clearly highlighted in the sheet, making it easy to fix and retest.</p><p>If everything passes validation, the sheet is ready for our team to publish. This new flow is lean, clear, and eliminates unnecessary back-and-forth. The business teams were quick to adopt it and appreciate the autonomy it provides — giving them more control over their updates while reducing delays.</p><p>Their feedback?</p><blockquote>“This makes updates so much easier — we can see what’s wrong before even contacting you.”</blockquote><h4>Highlights &amp; Design Principles:</h4><p>Our goal was to build something business-friendly, safe, and scalable — without introducing new tools or overhead.</p><ul><li><strong>All-in-Google Sheets</strong>: No external tools — everything runs in Sheets using Apps Script.</li><li><strong>Object-oriented logic</strong>: Handles different assumption types (flat values, deci/kg ranges, min-max windows, different breakdowns and rulesets) with configurable validation rules.</li><li><strong>Visual feedback</strong>: Red for errors, yellow for changes, purple for missing values, blue for outliers etc, explained in a legend in the cover page of the data sheet.</li><li><strong>Safe publishing flow:</strong><br>- Restricted to authorized users<br>- Auto-blocks if there are errors, no changes, or missing WIP page<br>- Auto-backup + formatting + WIP cleanup on publish</li><li><strong>Covers tricky edge cases</strong>: Overlapping date/range logic, float/text mismatch in dates, optional uniqueness by ID, and configurable nullable columns for required field validation.</li></ul><h3>The Results: Faster Updates, Happier Teams</h3><p>Since launching the automation in July, we’ve processed <strong>48 assumption updates</strong> — each one tested and validated through the new system.</p><p>What used to take nearly <strong>2 hours per update</strong> — including back-and-forth iterations, validations, and manual refreshes — can now be done in <strong>minutes</strong>.</p><p>Even better? Not a single one caused an issue downstream in our profitability pipeline. Previously, we relied on SQL controls as a safety net to catch late-stage issues like duplicates or broken joins. Those controls are still in place, but thanks to our pre-validation steps, they haven’t had to catch anything.</p><p>Business teams can now <strong>validate their own changes</strong> directly in the sheet, long before they loop in the data team. This has shifted the ownership of assumptions closer to where the inputs originate, which helps everyone move faster.</p><p>We’ve also seen:</p><ul><li><strong>No blocked updates</strong> since launch</li><li><strong>No duplication errors</strong> in PM2 outputs due to manual inputs</li><li><strong>More structured, consistent sheets</strong> across cost types</li><li><strong>Positive feedback</strong> from teams using the tool — especially for the clear validation colors and how easy it is to test before asking for help</li></ul><p>While publishing still stays in the hands of authorized users, we’ve drastically reduced friction in the assumption update process and increased our confidence in the data quality being pushed downstream.</p><h3>Lessons Learned Along the Way</h3><p>This wasn’t just a technical project — it was a process of discovery, iteration, and small design decisions that paid off over time. Here are a few takeaways we didn’t fully anticipate at the start:</p><ul><li><strong>Automation doesn’t have to mean complexity.</strong> Initially, we considered building a completely separate interface for assumption management. But choosing to stay within Google Sheets turned out to be the right call. It required no onboarding, aligned with the team’s existing habits, and gave us the flexibility we needed without introducing new tools or friction.</li><li><strong>Designing for real humans requires human thinking.</strong> From the start, we tried to recreate every painful edge case we had encountered in previous updates: overlapping dates, outliers, missing values, misformated cells, unexpected input types… the list goes on. Building for how people <em>actually</em> use the system made the validations much stronger and helped avoid silent errors.</li><li><strong>Modularity is powerful — but not always easy.</strong> We underestimated how many exceptions would come up: nullable fields that are still part of uniqueness checks, cost fields that might be required only in some contexts, or grouping logic that varied from one sheet to another. The modular, object-oriented structure we built took effort, but it’s what made the system sustainable as it grew.</li><li><strong>Timing really mattered.</strong> After we launched this in July, assumption updates noticeably increased. While some of that was seasonal (Q4 prep, renewed agreements), we believe the reduced friction also played a key role. Business teams no longer needed to batch everything together — they could test and iterate freely, which improved both agility and accuracy.</li><li><strong>A good cover sheet goes a long way.</strong> Documenting the process clearly — who does what, what colors mean, what to expect during validation — helped everyone onboard quickly. We also included screenshots and a mini legend. That small investment in clarity made a big difference.</li><li><strong>Backups became unexpectedly useful.</strong> We hadn’t planned for it, but auto-generating and storing backups during publish proved valuable. It gives us traceability when we need to explain why profitability numbers changed, and helps when reviewing historical adjustments.</li><li><strong>Maintenance was easier than expected.</strong> As new assumption tables were added to the profitability model, the modular structure made it easy to extend validation and publishing to them too. No rewrites needed — just a few lines of configuration.</li></ul><h4>About Us</h4><p>Ready to take your career to the next level? Join our dynamic team and make a difference at Trendyol.</p><p><a href="https://careers.trendyol.com/tr"><strong><em>Trendyol Careers</em></strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ddd9a783c59d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/trendyol-tech/empowering-assumption-management-with-automation-a-profitability-use-case-ddd9a783c59d">Empowering Assumption Management with Automation: A Profitability Use Case</a> was originally published in <a href="https://medium.com/trendyol-tech">Trendyol Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>