<?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 Kelly Goetsch on Medium]]></title>
        <description><![CDATA[Stories by Kelly Goetsch on Medium]]></description>
        <link>https://medium.com/@kellygoetsch?source=rss-e208e2a75797------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*oq7JdQ1J9dGwJNyCaPuIvw.jpeg</url>
            <title>Stories by Kelly Goetsch on Medium</title>
            <link>https://medium.com/@kellygoetsch?source=rss-e208e2a75797------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 21:02:34 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kellygoetsch/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[Why Seven is the Magic Team Size]]></title>
            <link>https://medium.com/commercetools-tech/why-seven-is-the-magic-team-size-8c94d1d9f4ba?source=rss-e208e2a75797------2</link>
            <guid isPermaLink="false">https://medium.com/p/8c94d1d9f4ba</guid>
            <category><![CDATA[agile]]></category>
            <category><![CDATA[commerce]]></category>
            <dc:creator><![CDATA[Kelly Goetsch]]></dc:creator>
            <pubDate>Tue, 25 Sep 2018 12:54:00 GMT</pubDate>
            <atom:updated>2018-09-26T15:49:05.238Z</atom:updated>
            <content:encoded><![CDATA[<p>The throughput of any development team is the collective throughput of the people on that team. People are happiest and most productive when they’re on a team that’s the right size. Two person teams are clearly bad, as are 100 person teams. So what is the right size?</p><p>Software development is fairly unique among professions because close, trusting relationships are required to get anything done. Software development is an interconnected value chain, with each member of that chain contributing some work that is then consumed by another member of the team. Back-end developers build code fronted by APIs, which the front-end developers consume. Designers model user interfaces, which the front-end developers implement by consuming APIs. Both front-end and back-end developers must deploy code with the help of ops. It’s one big chain of interconnected dependencies.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/350/1*lXk_wrkOnG2ywFhWGmL0-w.png" /></figure><p>In many other professions, you can get additional throughput from a team by adding more members to that team. If you have a hotel full of rooms that need to be cleaned, you’ll double your throughput if you double your team size from 10 to 20. Since each cleaner works in their own room, you can parallelize the work as much as you’d like. You could go from a team of 10 to a team of 100 and get a perfectly proportional 10x improvement in throughput.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0h8CFWV0N8gdna1KL8WOeQ.png" /></figure><p>Software development doesn’t work that way. As Fred Brooks said in his famous 1975 book, <em>The Mythical Man Month</em>, “Adding human resources to a late software project makes it later.” If you have 10 developers working on a project and double the team size to 20, it just slows it down further. If you went from 10 to 100 developers, the project would crawl to a complete stop.</p><p>So what is the right size? Let’s look at a few considerations.</p><h3>Problems with Small Teams</h3><p>Small teams are terrible for individual productivity and happiness. Two, three and four person teams suffer from a diversity of skills. Developing software requires many different disciplines including architecture, design, front-end, back-end, ops, security, etc with each person bringing years of experience. Many people bring experience from other disciplines. For example, it’s not uncommon that a designer started his or her career as a front-end developer, or that an ops person also has experience as a back-end developer. Good teams draw on the experience of many different individuals to come up with full stack solutions to problems that are inherently very complex to solve. Two, three and four person teams just don’t have enough skills to draw from.</p><p>Another issue with small teams is instability due to interpersonal conflicts. If you have two people on a team, it can be like a bad marriage if the two individuals aren’t getting along. If you have three, it can devolve into a two versus one situation where someone feels left out. If you have four, you can have a two versus two situation, or even worse, a three versus one situation. Disagreements become personal much more quickly than they otherwise would. A “no” to your great new idea feels a lot worse if it’s coming from one or two other people than it does as the consensus of a larger group.</p><h3>Problems with Large Teams</h3><p>Large teams, on the other hand, can be even worse than smaller teams. In creative professions like software development, important decisions must be continually made about what’s being worked on and how problems are solved. Are you going to re-factor now or in six months? Are you going to use React or Angular for your front-end? Are you going to work on supporting a new discount type or supporting purchase orders as a payment method? In large teams, there’s strong social pressure to be a team player and go along with the flow. People who speak up and say “Wait, why are we doing this?” are labeled as not being team players, or difficult to work with. In smaller teams, where each team member knows and trusts every other team member, it’s far easier for someone to break out of that group think.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EbaI64eASSA8oCbgI2DsKA.png" /></figure><p>The problem of group think can extend beyond the boundaries of individual teams and extend to the rest of the organization. According to a <a href="http://www.wsj.com/articles/SB10001424052970203914304576627102996831200">Wall Street Journal profile of Amazon CEO Jeff Bezos</a>:</p><blockquote><em>At an offsite retreat where some managers suggested employees should start communicating more with each other, Bezos stood up and declared, “No, communication is terrible!” He wanted a decentralized, even disorganized company where independent ideas would prevail over groupthink.</em></blockquote><p>Individuals within teams and teams themselves should feel completely empowered to question the status quo. Small, independent teams that can function autonomously are best for innovation.</p><p>Another issue with larger teams is the sheer number of communication pathways that members have within teams. Software development requires that members within a team trust each other. When trust is lacking, you see fighting between factions of groups, the need for more documentation, and more process in the form of change requests, forms, approvals, etc. The formal term for this is “Cover Your Ass Syndrome” and is <a href="https://en.wikipedia.org/wiki/Cover_your_ass">defined as</a>:</p><blockquote>“the bureaucratic technique of averting future accusations of policy error or wrongdoing by deflecting responsibility in advance”. It often involves diffusing responsibility for one’s actions as a form of insurance against possible future negative repercussions. It can denote a type of institutional risk-averse mentality which works against accountability and responsibility, <strong>often characterized by excessive paperwork and documentation</strong>, which can be harmful to the institution’s overall effectiveness. The activity, sometimes seen as instinctive, is generally unnecessary towards accomplishing the goals of the organization, but helpful to protect a particular individual’s career within it, and it can be seen as a type of institutional corruption working against individual initiative.</blockquote><p>This lack of trust within and between large teams is <a href="https://www.linkedin.com/pulse/why-enterprise-software-development-so-painfully-slow-kelly-goetsch">why enterprise development is so painfully slow</a>. It’s why those big multi-billion dollar IT projects in the private and especially the public sectors never succeed.</p><h3>Trust — The Most Important Ingredient of Software Development</h3><p>Building trust within and across teams requires communication, which is also known as “social grooming.” Primates physically groom each other (hence the “grooming” in “social grooming”) by picking bugs out of each other’s fur. Humans, on the other hand, eat meals together and socialize outside of work. Both of these activities serve identical purposes — to bond, reinforce group membership, and build trust. We all do it and it’s what allows business to get done. Working in a purely transactional workplace would be terrible.</p><p>The problem is that you can’t maintain meaningful connections with more than a few people. As groups add more members, the number of connections increases exponentially according to the formula [N * (N-1)]/2, where N = group size. A two person group has only one communication pathway. Person A can interact directly with Person B. A three person group has three communication pathways. A four person group has six. A 10 person group 45. A 20 person group has 190.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xZ_Hn3cavGCXKWXfmneO-Q.jpeg" /></figure><p>Humans simply can’t maintain more than a handful of meaningful, trusting relationships at work. It’s a limitation of the human brain.</p><p>Finally, the last issue with larger teams is social loafing. There’s a famous term for this in sociology called the <a href="https://hbr.org/2012/08/why-less-is-more-in-teams">Ringelmann Effect</a>, named for a French agricultural engineer who in 1913 discovered that individuals exerted less individual effort as the number of people pulling on a rope increased. This effect has been replicated by dozens of subsequent studies across dozens of different tasks ranging from rowing a boat to assembling large pieces of machinery.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/745/1*3GCFbOsd8xv8qgBiXzvwRg.png" /></figure><p>As group sizes increase, members reduce their effort because they feel less responsible for the output of the group. A member of a five person group bears 20% of the outcome of the project, whereas a member of a 25 person team bears 4% of the outcome of the project. When the link between effort and outcome is severed, group members become demotivated and allow their colleagues to pick up the slack. People naturally want to own things. They want to be responsible. They want others to see their efforts and talents. They want people to tell their friends about the cool new feature they were responsible for bringing to market.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x65qVjeIXKXP4EMLREudZg.png" /></figure><p>Given the clear drawbacks of both small and large teams, what’s the right size? At commercetools, we’ve found the best size to be seven, plus or minus two members. It’s not a hard rule, but it is a range that we aspire to and often adhere to. Seven is a fairly standard number across many disciplines. Basketball teams have members on the court. Volleyball and hockey teams have six. Baseball teams have nine. The smallest unit of most militaries around the world is a squad, which has between six-10 members. Amazon has a famous “<a href="https://www.theguardian.com/technology/2018/apr/24/the-two-pizza-rule-and-the-secret-of-amazons-success">two pizza team rule</a>,” meaning no team can be larger than can be fed by two pizzas. Most of the agile and microservice gurus call for seven person teams.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/864/1*gobmj97BLMb-NdtbZYjI2g.png" /></figure><p>Seven seems to be a magic number that has worked well for us at commercetools. It’s a large enough team that it can draw on the skills from many people, while avoiding the interpersonal conflicts that often arise from smaller teams. Each member of the team likely has a backup (or two), so that if one designer goes on vacation the other can take over, for example. Members of the team can build long-term, trusting relationships with each other. The whole team can go out to eat and sit at one table. The communication overhead is fairly minimal, with there are only 21 communication pathways (only six per individual) to maintain. In short, it’s a good size that works for all constituencies.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8c94d1d9f4ba" width="1" height="1" alt=""><hr><p><a href="https://medium.com/commercetools-tech/why-seven-is-the-magic-team-size-8c94d1d9f4ba">Why Seven is the Magic Team Size</a> was originally published in <a href="https://medium.com/commercetools-tech">commercetools tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How commercetools Hires Product Managers, Product Owners and Product Marketing Managers]]></title>
            <link>https://medium.com/commercetools-tech/how-commercetools-hires-product-managers-product-owners-and-product-marketing-managers-178e7b14fb9b?source=rss-e208e2a75797------2</link>
            <guid isPermaLink="false">https://medium.com/p/178e7b14fb9b</guid>
            <category><![CDATA[ecommerce]]></category>
            <category><![CDATA[product]]></category>
            <category><![CDATA[saas]]></category>
            <category><![CDATA[product-development]]></category>
            <category><![CDATA[product-management]]></category>
            <dc:creator><![CDATA[Kelly Goetsch]]></dc:creator>
            <pubDate>Mon, 13 Aug 2018 00:21:17 GMT</pubDate>
            <atom:updated>2020-02-21T16:32:32.494Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VZuAnuWw_7EEfiyANhtohg.jpeg" /><figcaption>The commercetools product team at the last off-site</figcaption></figure><p>I’m a product person through and through. While I spent the first seven years of my career as a developer and later as an architect, I never felt truly “at home.” I was always missing the “why” of what I was doing. Why did business need to publish a million price updates once an hour? Why was the store locator enhancement prioritized more highly than supporting a new promotion type? After making the transition to product management, I quickly came to understand the “why.” It was my calling and I’ve never looked back.</p><p>Fundamentally, all forms of product management are about tradeoff management. Given a scarce number of people, budget, time, and always-growing list of business needs, what’s the most optimal way to satisfy the most stakeholders (with customers’ business problems being priority #1)? Before we get too far, let’s define those stakeholders (in no particular order). They include:</p><ul><li>Other business units within your organization — sales/marketing/professional services/support</li><li>The executive management of your organization, including your CEO</li><li>Internal development teams</li><li>Organizations who buy your product</li><li>End-shoppers who use the applications your customers build</li><li>External systems integrators (SIs) and independent software vendors (ISVs) with whom you partner</li><li>Your board members</li><li>Your investors</li><li>The broader society, depending on the type of product you have</li></ul><p>Essentially anyone involved in your company’s success or failure has an interest in what products you bring to market and what features those products have. You can’t satisfy all of your stakeholders. There are always tradeoffs.</p><p>Let’s start with some historical context.</p><h4><strong>Historical Context</strong></h4><p>In the early days of software development, a product manager would talk to all of the stakeholders and over the course of a few months or years compile an enormous document with thousands of individual requirements. Every individual feature was defined in excruciating detail, often including wireframes. When this document was finished, it was passed off to a project manager who would then be responsible for working with developers to actually build the product or feature. Before agile development really took off in the early 2000’s, this was almost universally how software was developed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T_6XcB0vbkgkEIF4Nvppzg.png" /><figcaption>Sequential process often taking many quarters or even years</figcaption></figure><p>When agile started to take off in the early 2000’s, there arose a need for a new type of product manager — a “product owner.” Agile calls for small, vertical, cross-functional development teams working on the same domain. With these small teams now more or less autonomous, and the work much more iterative, the old “throw it over the fence” style of product management no longer worked. Teams iterated constantly, re-prioritizing their backlogs as business needs dictate. In this model, product managers can’t be off somewhere else writing a static requirements document.</p><h4><strong>Product Owners</strong></h4><p>Product owners are often called “product managers for agile development.” As a member of each agile team, they’re responsible for managing each team’s backlog, writing user stories, developing acceptance criteria, providing developers with context, mapping out dependencies between development teams, involving design, and bringing the voice of the customer back to developers. Product owners work most closely with their development team and their peers, rather than with other business units or external stakeholders. In some organizations, product owners are also known as “inbound product managers” because of their internally-facing orientation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DIJoL7GMFaKxpanHThTiXg.png" /><figcaption>Where product owners should be spending their time</figcaption></figure><p>Product owners should work closely with development managers but should never cross the line and assume those responsibilities. It’s a fine line, but a good product owner should motivate architects, designers, developers, and other members of the team by providing them with the “why” but not start demanding how they do their jobs.</p><p>Similarly, a product owner is not the lead of the team. Developers should report to development managers, not product owners. Product owners are part of the team but not the managers of the team. Just because management often goes to product owners for updates, it does not automatically mean that person is the leader even though it may look like that from the outside.</p><p>When we hire product owners, we look for emotionally intelligent people who are strong communicators. Emotionally intelligent people can recognize their own emotions and those with whom they’re communicating and use that understanding to resolve conflicts in a way that makes all stakeholders happy. “Happy” may mean getting your way, but it may also mean having your voice fully heard and having a good understanding of why you didn’t get your way. Additionally, we look for people who can speak intelligently to and be well respected by business stakeholders and by technical development teams. Professional services, for example, needs to know that you understand their needs enough to represent their interests when making decisions. The development team needs to know that you understand enough of the technical implementation details to represent their interests when making decisions. Blending business with technical knowledge is a difficult task that few can do well.</p><p>Short of “managing” teams, it’s important that product owners can get teams to deliver. Teams that have a clearly articulated minimum viable product, well written requirements, and understand the “why” are able to deliver more than teams lacking that context. Product owners should also help to corral the more academic developers, or developers who are working on things that might be cool but not adding much business value. There’s a balance that needs to be struck between being part of the team and pushing the team to get features released as quickly as possible to satisfy various non-developer stakeholders. Developers should never see product owners as the managers of the team though.</p><p>Finally, candidates must have the ability to develop a deep understanding of their team’s problem domain. At commercetools, we have small vertical teams that focus on checkout, product discovery, PIM, machine learning, etc. Each team has a dedicated product owner. There are probably 10 people in the world who are product owners at commerce platform vendors focusing just on checkout. We hire for aptitude, ability and attitude, not very granular domain expertise. That can be quickly learned over a month or two because each team has a fairly narrow scope. We do try to hire people with general commerce experience, whether on the vendor-side or on the customer-side.</p><p>Often, successful candidates have had hands-on technical roles at some point but later went back to get an MBA or equivalent business-focused graduate degree.</p><h3><strong>Product Managers</strong></h3><p>Product managers have a more broad set of responsibilities than product owners and are typically found in larger companies. Where product owners work most closely with their development team, product managers work most closely with the broader organization and other stakeholders, both internal and external.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TH5aCVUgrRmKYtRxzBGouQ.png" /><figcaption>Where product managers should be spending their time</figcaption></figure><p>Within an organization, product managers often work with sales and marketing to define pricing and licensing terms of a product, with marketing to define how the product is taken to market, with professional services to ensure they’re properly trained on the product, with legal to work through any 3rd party licensing issues, with customer success and support teams to ensure that customers are fully supported. Many call product managers “mini-CEOs” of their products because of their cross-functional role in their product’s success.</p><p>Externally, product managers evaluate the competitive landscape and broader market in which you compete, educate analysts from firms like Gartner and Forrester on your product, partner with 3rd party software vendors to fill gaps in the product offering, and build relationships with key customers. Product managers who focus more on the external-part of the role are sometimes known as outbound product managers or even product marketing managers, which I’ll cover shortly.</p><p>Product managers are responsible for taking feedback from all of those internal and external sources, thinking of new business ideas, and producing a higher-level roadmap. Product owners are then tasked with turning the higher-level strategic vision into actual requirements for their individual vertical teams and then working with the development team to actually deliver.</p><p>Like product owners, product managers are not the managers of teams. Instead, they’re at the nexus of internal and external stakeholders, working closely with product owners and development managers to get the product built. But they’re probably not in every feature clarification meeting, or looking at the progress of individual sprints.</p><p>The ideal candidate for a product manager is quite similar to a product owner. Emotional intelligence and communication skills are of the utmost importance. However, a good product manager needs to have more business experience and acumen because the majority of their time is spent working with other business units and external stakeholders rather than with internal development teams. Additionally, we look for people with outside domain expertise. We want someone who can name our top five competitors and provide an analysis of where each fits in the market. We want someone who can talk about how a Digital Experience Platform differs from a Content Management System. Product owners don’t need to have that market context.</p><p>At commercetools, we have a Chief Product Officer (yours truly) and a lead PO who are more focused on product management. We then have product owners for each of the vertical teams, though it’s more of a 40% external / 60% internal split, and not the 80% / 20% splits discussed earlier.</p><h3><strong>Product Marketing Manager</strong></h3><p>A product marketing manager is someone who represents the product externally, sitting squarely between the product and marketing groups within an organization. Every day the product marketing manager should be working closely with product managers, product owners, architects and developers to find innovative features to market externally. Developers and product owners sometimes can’t articulate the novelty or business value of something they’re working on, but a product marketing manager does and will help to maximize the value of the feature by marketing it both within an organization and publicly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nxLWMN4HHvRaz0qNR6qhZw.png" /><figcaption>Where product marketing managers should be spending their time</figcaption></figure><p>For example — commercetools has supported GraphQL since 2016. The benefits of GraphQL are crystal clear to anyone who has worked with a REST API. But what’s the business value of GraphQL to a Chief Marketing Officer who has never written a line of code in his or her life? Bridging that gap is the role of the product marketing manager.</p><p>Additionally, a product marketing manager is often responsible for sales enablement, which involves training sales and pre-sales consultants on the product and giving them the collateral they need to effectively sell the product. Collateral can include PowerPoint presentations, white papers, fact sheets, demos, battle cards, and so on.</p><p>Product marketing managers also keep a close eye on the competition and constantly talk with customers. This feedback is then given to product managers and/or product owners, depending on your organization. A product marketing manager is your company’s most externally-facing member of the product team, in contrast to product owners who spend the vast majority of their time with their development teams.</p><p>Product marketing managers generally don’t build roadmaps, write requirements, or work with development teams to advance the product. Their role is to supply product managers and/or product owners with ideas based on what they’re seeing from the outside. They are still making tradeoffs because a product marketing manager may hear dozens of feature requests every day and not all of them have the same impact.</p><p>In the early stages of a company, a product manager often plays this role. As the company grows, dedicated product marketing managers need to be hired who really know what they’re doing and can give this role the time and attention it deserves. At commercetools, our first product marketing manager will start in a few weeks and we couldn’t be more excited.</p><p>Successful product marketing managers are often ex-product managers or product owners who have gained marketing skills, either through education or experience. As the role is half marketing and half product, good product marketing managers need to be able to credibly speak to both organizations.</p><h3><strong>Final Thoughts</strong></h3><p>There’s a wide spectrum of product-related professions, ranging from product owner to product manager to product marketing manager, though all are fundamentally involved in satisfying stakeholders through tradeoff management. Communication and emotional intelligence are the two traits we most look for in potential candidates.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=178e7b14fb9b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/commercetools-tech/how-commercetools-hires-product-managers-product-owners-and-product-marketing-managers-178e7b14fb9b">How commercetools Hires Product Managers, Product Owners and Product Marketing Managers</a> was originally published in <a href="https://medium.com/commercetools-tech">commercetools tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How commercetools Roadmaps]]></title>
            <link>https://medium.com/@kellygoetsch/how-commercetools-roadmaps-4ce173c95b48?source=rss-e208e2a75797------2</link>
            <guid isPermaLink="false">https://medium.com/p/4ce173c95b48</guid>
            <category><![CDATA[product-management]]></category>
            <dc:creator><![CDATA[Kelly Goetsch]]></dc:creator>
            <pubDate>Mon, 12 Mar 2018 20:18:25 GMT</pubDate>
            <atom:updated>2018-03-12T20:18:25.900Z</atom:updated>
            <content:encoded><![CDATA[<p>A company’s roadmap is a reflection of its values constrained by its capabilities. For software vendors like commercetools, our quarterly roadmap is perhaps the most important document we have within the company. Roadmaps dictate what a bulk of the company’s people are working on at any given moment. Development, sales, marketing, professional services, and support are guided by our roadmap.</p><p>Our guiding principles when defining the roadmap are:</p><ul><li>Focus on building a good product for our customers, our internal stakeholders and the larger market</li><li>Stakeholders all feel as if their voices have been heard</li><li>The process is transparent to all stakeholders</li><li>There’s a broader understanding of the “why” behind the roadmap</li></ul><h3>Start With Why</h3><p>Before we get too far, it’s important to go off on a quick tangent about the “why.” In <a href="https://startwithwhy.com/simonsine">Simon Sinek</a>’s book, <a href="https://startwithwhy.com/shop/books/start-with-why">Start With Why</a>, he outlines a simple but powerful concept called the “Golden Circle.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/559/1*Vl8K2j-7PhBEAt1ltuhAYg.jpeg" /></figure><p>In this framework, Simon calls out the fundamental importance of starting with “Why.” At commercetools, we’re disrupting the enterprise commerce software market by fundamentally changing how commerce platforms are distributed, consumed, and customized. We start out every monthly all-hands meeting by reviewing the “why” behind what we do. All 150+ commercetools employees know why they show up to work motivated every morning. From the “why” follows from “how” — by leveraging APIs, microservices, and other cloud-native principles. The “what” follows from “how” — by offering a commerce platform that solves our customers business and technology needs through market-leading features.</p><p>We can articulate the “why” which is a prerequisite to successful roadmapping. Roadmapping without a common understanding of why your organization and product(s) exist is a waste of time.</p><h3>Set Annual Investment Priorities</h3><p>Every year we have a two day off-site where define investment themes for the next year. Attendance is limited to our product owners, development managers, and a handful of C-level executives. The group size is kept small to facilitate trust and improve productivity. Big groups just don’t get much work done.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3iE-rwIiZKZ7bZdLG0ZwJA.jpeg" /></figure><p>We go off-site to minimize distractions and to facilitate trust amongst participants. Discussions can get intense and it’s important that everyone feel they’re able to contribute to the discussion from a trusted place. Having a small group that does some social activities together beforehand adheres the group and allows for better discussions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aUc6fFrjEo0Ffi8L7igyTQ.png" /></figure><p>Before the off-site, all participants are asked to contribute proposed investment themes for discussion. Investment themes are broad, often implemented over several quarters, often implemented using multiple teams, and not easily completed. Examples of investment themes at commercetools in 2017 included extensibility, developer experience and B2B.</p><p>Investment themes come from many sources, including:</p><ul><li>What our current customers want</li><li>What our prospective customers want</li><li>What external thought leaders/analysts are talking about</li><li>The collective experience of our staff</li><li>Support inquiries</li><li>Ideas from our own architects and developers</li><li>Marketing</li><li>What our external partners want — both SIs and ISVs</li><li>Our own professional services</li></ul><p>The investment themes for discussion are usually pretty self-evident to all participants. If you surveyed attendees of our last off-site, I bet everyone would have agreed on 75% of the investment themes before we started the meeting.</p><p>The bulk of the off-site is then spent discussing the merits of investing in various themes. At our last off-site, we had 36 investment themes up for discussion. We ultimately decided on 11. Ideally, the number would be closer to six or eight.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KxkQnjoK5SE-k3QCdZ7rHQ.jpeg" /></figure><p>The decision whether to invest in a particular theme is not particularly scientific. Each of the investment themes are evaluated according to:</p><ul><li>Is it a market standard? Do our competitors all offer it? Do most of the RFPs we get list it as a feature?</li><li>Is it something that will differentiate us? A product may tick all the checkboxes but if there’s nothing fundamentally differentiated nobody will buy it</li><li>Is it non-functional but still required? For example, security, availability and performance are non-negotiables for us</li></ul><p>These evaluation criteria ultimately get back to trying to quantify the business value. A lesson we’ve learned along the way is to avoid endless debates about trying to quantify value. The value of investing in a particular theme is inherently subjective and qualitative. Many things just have to be done and it’s clear to participants in the room based on their experience and what they’re seeing on a daily basis. If you’re building a car there’s no use in debating the business value of whether doors should be a standard feature. But there is use in debating whether satellite radio should be standard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3_jTK9waP7G4VXrqH45YLg.jpeg" /></figure><p>If we were running a B2C SaaS business where we had millions of customers, it would be easier to quantify demand. But we’re a B2B product sold to large enterprises. We have far fewer and more varied customers. “I think customers X, Y and Z would use this feature” is hard to translate into a Net Promoter Score improvement or revenue gain.</p><p>I listen to input from various stakeholders, review all quantifiable data, but ultimately I take a decision and move on.</p><p>An ongoing topic of discussion we have is the time horizon for planning investment themes. While many would argue a year is too long of a time horizon to plan, we have ultimately settled on that time period because:</p><ul><li>Our customers need to know where to make investments. For example, a customer of ours needing B2B functionality shouldn’t invest in B2B if that’s an investment theme for us for the next year. Investment themes set quarterly don’t offer enough lead time to our customers</li><li>Developers and other internal constituencies need stability. Developer productivity plummets when roadmaps are constantly changed. Marketing needs to know where to make investments. If we’re building a marketplace over the next year, marketing needs to plan events, campaigns, etc</li><li>External stakeholders like analysts and prospective customers want to see we (roughly) know where we’re taking the product over a multi-quarter and often a multi-year time horizon. Strictly quarterly planning makes it look like we don’t know what we’re doing. “We’re agile” is not a solid defense against those (somewhat legitimate) claims</li></ul><p>We may reduce the time horizon to nine months in the future, but for now a year seems to work for us.</p><h3>Define the Q1 Roadmap</h3><p>Once we define our investment themes for the year, we then start to look at individual features. In contrast to investment themes, features are often implemented by one team over the course of a single quarter, and easily identifiable as being completed. Examples of features we’ve implemented include high precision pricing, a UI for processing exchanges, multi-factor authentication, sharding MongoDB, etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YymNZnMaAFXYf0tX3x2E1g.jpeg" /></figure><p>We’ve found it’s best to gather all of the product owners together in a room within a few days of the off-site. We review the previously agreed-upon investment themes as a group to freshen memories. We then have the product owners take an hour and write out individual features related to their teams on individual post-it notes. There should be one feature per post-it note.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*ecuPlqUj0sortnjM3BfWzw.png" /></figure><p>At the end of the hour, each person will have written down 25–50 different features. In total, we’ll have a few hundred individual post-it notes.</p><p>Features come from the existing product backlogs, RFPs, input from support, input from professional services, and potentially dozens of other sources. Since we’re organized around vertical teams, our product owners know their respective domains extremely well.</p><p>Then, using a big wall and some masking tape, we draw a grid similar to this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mlgfFIug84zcQTfK9-C68A.png" /></figure><p>Over the course of a few hours (and a case of <a href="https://www.eater.com/drinks/2015/9/8/9263863/club-mate-energy-soda">Club Mate</a>), we decide where to place each of the different features on the grid.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xTIpetQebWDiebnlvnwxbA.jpeg" /></figure><p>We balance out the features according to:</p><ul><li>The capacity of each vertical team in each quarter</li><li>Technical dependencies</li><li>Alignment to investment themes</li><li>Business value</li></ul><p>This process is inherently a bit messy and subjective. We could use story points or some other metric to try to make the process a bit more quantitative, but we’ve found it’s best to just keep it more qualitative. Pragmatism is our guiding principle. It’s amazing how it all just “clicks” together by the end of the day.</p><p>At this point, our Q1 is fairly clear. Q2 is a less clear, Q3 is even less, and Q4 is basically a guess. We’re OK with that. We want to avoid a waterfall-style roadmapping process where we have a year-long roadmap built out. That’s not agile enough. What matters is that we have a clear understanding of our investment themes for the year, a firm roadmap for the next quarter, and a rough list of individual features that need to be implemented over the course of the year.</p><h3>Q2 and Q3</h3><p>Fast forward a few months and we’re now well into Q1 with Q2 just on the horizon. We’ve defined investment themes for the year and have a rough idea of what features are in each quarter.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zWjHlAo8ubkTi2oTb_7eaw.jpeg" /></figure><p>We then start building the Q2 roadmap by pulling the Q2 roadmap we defined at the beginning of Q1 off the shelf. Use that as the starting point, we adjust it for:</p><ul><li>Anything that wasn’t completed in the previous quarter</li><li>Changes in team productivity</li><li>Changes to investment themes or the priority of investment themes</li><li>What we’re hearing from various internal and external stakeholders</li></ul><p>We then send the roadmap to our head of professional services, head of support, head of marketing, head of partner training, a few architects, and a few developers for their input. Anyone else in the company is always free to review proposed roadmaps 1:1 with me or one of the product owners.</p><p>We then repeat this process for Q3.</p><h3>Q4</h3><p>Q4 is the easiest quarterly roadmap to define because it’s mostly finishing up development from the previous year. We use this quarter to close off investment themes by implementing individual features that we haven’t had time to implement and servicing technical debt. It’s extremely important that we deliver on the commitments we’ve made so that we begin the next year’s product off-site with a clean slate.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-QStwbbWRZdzPj4AltKbUA.jpeg" /></figure><h3>Voting</h3><p>A few times we’ve held a blinded voting process for prioritization of features across quarters. In this exercise, we build a spreadsheet listing all of the features on the post-it notes, aligned to investment themes. For each feature, we list out the planned quarter, effort, who’s asking for it, associated Jira issues, and any relevant links. We provide as much data as possible so that voters can make an informed vote.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qhSzpRoC04oLnZoPUCy4bg.png" /></figure><p>We then send the spreadsheet individually to stakeholders across the company and ask them to vote. Each person should votes on his or her own, without seeing the votes of their colleagues in order to prevent undue influence. Then, we combine all of the votes into a single master spreadsheet.</p><p>Then we assign different weights to different voters (a company is not a democracy) and tally up the results. For example, we assign more weight to our CEO’s votes.</p><p>We never build our roadmap solely off of a voting exercise like this, but we do use it as valuable input.</p><h3>Mid-quarter Roadmap Changes</h3><p>Once a roadmap is set for the quarter, it’s considered “locked.” Development teams can’t execute on a roadmap that is constantly changing.</p><p>The only exceptions we have for changing the roadmap are:</p><ul><li>If a high value customer has written it into their contract that we must deliver a feature in the current quarter</li><li>If not doing something could cause security, availability or severe performance issues</li><li>If the development team runs into serious issues</li></ul><p>Short of those three considerations, we do not change our roadmap. We usually end up making one mid-quarter change every two quarters or so, but it really depends. It’s not a common occurrence by any means.</p><p>I as Chief Product Officer am the only person in the company with permission to edit the roadmap.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gvuiJCJqQOHMcqOjRiwY7w.png" /></figure><h3>Measuring Development Progress</h3><p>At the end of every quarter, we look back at the previous quarter and look at what we were able to deliver. We aim for 75% or more. Often we’re in the 80%+ range. When you include a four week delay, we’re usually in the 90%+ completion range for a quarter.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WlawNLANPmsApgQ9Kc9mJg.png" /></figure><p>Reporting these metrics to the entire company is extremely important. It motivates everybody to do better and it holds teams accountable.</p><p>We do not tie these metrics to pay or any other financial incentives because people would just commit to less until they’re able to always get 100% roadmap completion. Reporting these numbers to the rest of the company does create a small incentive to under-commit but there ultimately has to be some accountability.</p><h3>Measuring Investment Theme Progress</h3><p>In addition to reporting development progress, we also report progress towards top-level investment themes at every monthly all-hands meeting and to external stakeholders when appropriate. This score card quickly gives internal and external stakeholders a view of how much progress we’re making towards the investment themes we’ve committed to for the year.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fcCDBg6V0FyTv0FyHXlmAw.png" /></figure><p>Red means we’re not going to complete the investment theme by the end of the quarter. Yellow means we’re making progress. Green means we will have successfully completed it. Remember that the time horizon here is an entire year. While earlier is better, each investment theme should progress from red to yellow to green over the course of the year.</p><h3>Reporting to External Stakeholders</h3><p>Every quarter we host an external call to update our customers and partners on what the next quarter’s roadmap looks like, how it aligns to our investment themes for the year, and how we’re making progress towards meeting our investment themes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qcdlsix-UTZRO8nj5Czw0A.jpeg" /></figure><p>These quarterly updates are important to all stakeholders. Our customers are running their businesses on us and it’s important that they understand where we’re taking the product.</p><h3>Conclusion</h3><p>Hopefully you now have a solid understanding of how we roadmap. This is not a terribly scientific process and it’s always evolving as we learn. We approach it with flexibility and pragmatism and it has served us well.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4ce173c95b48" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[New API Extensibility Feature]]></title>
            <link>https://medium.com/commercetools-tech/new-api-extensibility-feature-5b3b8d83da2d?source=rss-e208e2a75797------2</link>
            <guid isPermaLink="false">https://medium.com/p/5b3b8d83da2d</guid>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[lambda]]></category>
            <category><![CDATA[api]]></category>
            <dc:creator><![CDATA[Kelly Goetsch]]></dc:creator>
            <pubDate>Tue, 20 Feb 2018 14:23:50 GMT</pubDate>
            <atom:updated>2018-02-20T14:31:42.566Z</atom:updated>
            <content:encoded><![CDATA[<p>No off-the-shelf product will exactly suit your business needs, especially in the commerce platform space.</p><p>We at commercetools are excited to offer an entirely new approach to extending our out of the box APIs with your custom business logic.</p><p>Let’s look at a handful of hypothetical extension use cases:</p><ul><li>Allow customers to purchase only one pair of the latest hot basketball shoes</li><li>Inject custom tax amount</li><li>Calculating loyalty points earned for a shopping cart</li><li>Add mandatory shipping insurance for expensive products</li><li>Real-time inventory check with back-end ERP system during checkout</li></ul><p>Today, we offer essentially three extension options.</p><ol><li><a href="https://docs.commercetools.com/tutorial-custom-types.html">Extend data model</a> by allowing customers to add custom attributes and objects. For example, you could add “shoeSize” as an attribute of the customer profile</li><li><a href="https://docs.commercetools.com/http-api-projects-subscriptions.html">Subscribe to events</a> in commercetools and then asynchronously execute custom applications or serverless functions. If you subscribe to order-related events, for example, we’ll publish an “Order Submitted” event to the queue of your choice. That event can then be executed by a standalone custom application or a serverless function, like AWS Lambda. In this case, we’d want to send the customer a “Thank you for your order”-type email asynchronously</li><li>Create a proxy layer that inserts custom code. Your front-ends call a little application you build (“AcmeCorpProduct”) which then calls the corresponding out-of-the-box commercetools API (“<a href="https://docs.commercetools.com/http-api-projects-products.html">Product</a>”). This is historically how legacy non-API based commerce platforms were extended the past few decades</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*abRqqPQsBbilSBjpOu08QQ.png" /></figure><p>The event-based model is great but it’s only for asynchronous events.</p><p>Proxies work as well, but you’re then left managing the lifecycles of dozens of these little wrapper applications. Using proxies also makes it hard to use <a href="https://docs.commercetools.com/software-development-kits.html">our SDKs</a> from your front-ends, as commercetools SDKs work with commercetools APIs.</p><p>Now that we have some context on the status quo, I’d like to introduce our new approach. Essentially, we’re now allowing you to synchronously call back to one or more serverless functions or arbitrary URLs from within the commercetools platform.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u2xGPcPZD9D5dgCWkg-0_g.png" /></figure><p>The benefits of this are simply revolutionary. You can simply call our out-of-the-box APIs and still have your custom code executed behind the scenes. This allows you to use our entire developer ecosystem, including SDKs. Your custom code can be run as independent little serverless functions, rather than entire applications whose lifecycles must be managed.</p><p>Let’s take an example to illustrate how this works in practice. Say you’re selling furniture and have a business requirement that caps the number of items in a shopping cart at 10 due to delivery truck size constraints. You’d build a little Google Cloud Function that performs this check:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Sw5l1rr23SpBGOInxbO5_Q.png" /></figure><p>Next, using our <a href="https://docs.commercetools.com/http-api-projects-api-extensions.html#create-an-extension">extensions APIs</a>, you define your extension endpoint and bind it to all create/update calls to the cart API.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FtVkpi5CME5jYgfem6kTyQ.png" /></figure><p>At this point, you’ve bound the extension to the cart API. Let’s see what happens when you try to add 11 products to the shopping cart:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k6u2kS3S16UT1gTDnlhdvg.png" /></figure><p>You correctly get the “You can not put more than 10 items into the cart” error. If you look at the entire error response, you can see which extension was responsible for throwing the exception:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6zyIGF_h5_fTWMk_ezVg5Q.png" /></figure><p>The caller of this API can then gracefully report to the end-customer.</p><p>There’s a nice tutorial for this functionality at <a href="https://docs.commercetools.com/tutorial-extensions.html">https://docs.commercetools.com/tutorial-extensions.html</a>.</p><p>Internally, the way it works is pretty straight-forward. The client (SDK, REST client, etc) calls a commercetools API. The out-of-the-box commercetools code generates a client-agnostic JSON representation of the object being touched (e.g. cart, customer profile, etc). But instead of immediately persisting that JSON to the internal datastore and returning it to the client, the platform now looks which extensions are registered to the particular API for the particular action being performed. Each extension is passed the JSON object. It can request changes, which the API applies (like it does from the regular client) and the modified JSON object is then persisted to the platform’s datastore and the response is then returned to the client. Alternatively, the extension can return an error, which is returned to the client and nothing is persisted.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m2lbYRjx5AXthPq812Dt_A.png" /></figure><p>We’ll wait two seconds for each of the extensions. If it takes longer than that, a timeout error is thrown and the client is free to re-try or pass that failure back to the customer.</p><p>While this functionality is in beta mode for the carts API only, we expect to roll it out to the entire platform in the next few weeks. We will heavily invest in this functionality over the next few quarters, releasing functionality such as:</p><ul><li>Declarative reference expansion, allowing the extension to receive objects it would not normally have access to with the API the extension is bound to. For example, you might want to bind an extension to the user’s cart that’s dependent on the user’s profile. The extension can declare it wants the user’s profile, thus saving an additional HTTP request</li><li>Declarative dependencies, allowing for extensions to be run in a prescribed order. Today, all registered extensions are executed in parallel at the same time. But there are use cases where it would be great to define an order of execution</li><li>Predicate-based triggering. Today the extension is always called if it’s bound to a particular API for a particular action. For example, a cart extension bound to the “update” action will always execute when a cart is updated. Using our <a href="https://docs.commercetools.com/http-api.html#predicates">predicate language</a>, we’ll support being able to call extensions selectively. Sample predicates include:</li></ul><pre><em>country = “US”, lineItems(taxRate is empty) and taxMode = “external”<br>shippingAddress has changed<br>lineItems(quantity has changed)</em></pre><p>For more information about commercetools extensibility, have a look at:</p><p><a href="https://techblog.commercetools.com/how-to-extend-commerce-apis-f6b3b59da9e7">How to Extend Commerce APIs</a></p><p>Thanks to <a href="https://medium.com/u/6c17d42f6f6c">Christoph Neijenhuis</a>, Ida Olsen and the rest of the checkout team for making this a reality!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5b3b8d83da2d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/commercetools-tech/new-api-extensibility-feature-5b3b8d83da2d">New API Extensibility Feature</a> was originally published in <a href="https://medium.com/commercetools-tech">commercetools tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Extend Commerce APIs]]></title>
            <link>https://medium.com/commercetools-tech/how-to-extend-commerce-apis-f6b3b59da9e7?source=rss-e208e2a75797------2</link>
            <guid isPermaLink="false">https://medium.com/p/f6b3b59da9e7</guid>
            <category><![CDATA[ecommerce-software]]></category>
            <category><![CDATA[commerce]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[api]]></category>
            <dc:creator><![CDATA[Kelly Goetsch]]></dc:creator>
            <pubDate>Fri, 30 Jun 2017 14:50:04 GMT</pubDate>
            <atom:updated>2017-06-30T15:10:04.077Z</atom:updated>
            <content:encoded><![CDATA[<p>Your business is inherently unique and no software vendor will be able to offer you APIs that exactly match what you need them to do. As a result, you’ll have to extend the APIs you consume. Common extensions in the eCommerce space include:</p><ul><li>Sending notifications when an event has occurred, like sending an email when order has been shipped</li><li>Capturing additional properties on objects, like capturing a customer’s shoe size on registration</li><li>Validating data, like checking user-submitted data for SQL injection attacks</li><li>Performing real-time data checks, like making sure inventory is available during checkout</li><li>Adjusting the behavior of the API, like changing how prices are calculated</li></ul><p>In this article, I’ll explain the three different approaches to extending APIs, highlighting which approach is best for which type of extensions.</p><h3><strong>Extending Traditional Enterprise Commerce Platforms</strong></h3><p>If you were consuming a legacy commerce platform, you’d essentially be getting two things:</p><ol><li>A framework</li><li>A bunch of libraries</li></ol><p>The framework, platform, or whatever you want to call it often includes some type of extensibility mechanism, allowing you to plug your custom code inside the framework. This is often called <a href="https://martinfowler.com/bliki/InversionOfControl.html">Inversion of Control</a>.</p><p>The libraries are self-explanatory — JAR files, NPM packages, or whatever your programming language offers. These are immutable, pre-compiled pieces of functionality. Libraries are pretty similar APIs, with the only difference being how the functionality is consumed. With a library, you’re embedding the vendor’s code in your application. With an API, you’re still embedding the vendor’s code in your application but rather than executing locally, it’s executing somewhere else.</p><p>The sage Martin Fowler <a href="https://martinfowler.com/bliki/InversionOfControl.html">draws the distinction between frameworks and libraries as follows</a>:</p><blockquote>Inversion of Control is a key part of what makes a framework different to a library. A library is essentially a set of functions that you can call, these days usually organized into classes. Each call does some work and returns control to the client.</blockquote><blockquote>A framework embodies some abstract design, with more behavior built in. In order to use it you need to insert your behavior into various places in the framework either by subclassing or by plugging in your own classes. The framework’s code then calls your code at these points.</blockquote><p>If you’re buying a legacy commerce platform, your extension model is a function of the framework your vendor has defined. It’s extremely prescriptive — you follow your vendor’s documentation.</p><p>As I’ve <a href="https://www.linkedin.com/in/kellygoetsch/recent-activity/posts/">written about before</a>, commerce platforms are no longer just something you deploy off to the side of your business. Commerce <em>is</em> your business. Small, vertical teams are building and exposing granular pieces of functionality to the rest of your business, often as microservices.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kVzfjtnSZqQn_VtdourYmA.png" /></figure><p>In this model, there is no longer a single packaged commerce solution providing both the framework and the libraries, with a vendor telling you how to extend out of the box functionality.</p><p>Let’s explore three different approaches to extending API-based commerce platforms.</p><h3>Extending the Default Object Model</h3><p>Many customizations are simply a matter of collecting additional attributes or defining custom objects. If you sell shoes, you’ll want to capture the shoe size of your customer upon registration. If you sell auto parts, you’ll want to capture the make/model/year of the customer’s cars. These are all fairly standard requirements that any API-based commerce platform should be able to easily support.</p><p>At commercetools, we offer the ability to add attributes to existing objects.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BRSZqvD4e93XyeTY0SY9Zw.png" /></figure><p>Check out our <a href="http://dev.commercetools.com/tutorial-custom-types.html">comprehensive tutorial</a> for further guidance on how to add attributes to objects.</p><p>We also allow you to <a href="http://dev.commercetools.com/http-api-projects-custom-objects.html">define custom objects</a> and interact with them through APIs. The objects are stored in our datastore in our platform.</p><h3>Asynchronously Consuming Events</h3><p>Many customization use cases can be solved through the use of events. An event is basically a message with a payload, often a JSON or XML-based representation of an object, like an order or a customer profile. What differentiates an event from a message is volume. Traditionally, messaging was strictly limited to passing important bits of data (orders, customer profiles, etc) around between systems. Messaging often used heavyweight protocols like JMS and relied on expensive commercial products.</p><p>Eventing is a central characteristic of modern software development, especially microservices-based development. <em>Everything</em> is represented as an event. Lines in log files, small changes to orders/customer profiles/products, container instantiations, API calls, etc are all represented as unique events. It’s not uncommon to have millions or tens of millions of events per second in a microservice-based application. An event is often produced for any activity or change of any kind.</p><p>At commercetools, we offer the ability to <a href="http://dev.commercetools.com/http-api-projects-subscriptions.html">subscribe</a> to the internal events that our individual microservices produce. You can push those events out to <a href="https://www.iron.io/platform/ironmq/">IronMQ</a>, <a href="https://aws.amazon.com/sqs/">AWS SQS</a>, <a href="https://aws.amazon.com/sns/">AWS SNS</a>, and <a href="https://azure.microsoft.com/en-us/services/service-bus/">Azure Service Bus</a>.</p><p>Once an event is on a topic, it must be passed to some custom code that can process it. Here, you have two options.</p><p>The first option is to write a small application. Using a small framework like Spring Boot, Play or Node.js, you can very quickly write a small application whose sole responsibility is to pull events from a topic and do something. The “something” may be connecting to your back-end CRM system and updating a customer record. It may be sending an email to a customer. It may be charging a credit card. While these applications can be easily built, they must be maintained over years or even decades. The development framework you use will need to be upgraded. You’ll inevitibly have to upgrade your continuous delivery pipeline. Docker will continue to change as it matures. Maintaining applications is difficult.</p><p>The second option is to use serverless. <a href="https://aws.amazon.com/lambda/">AWS Lambda</a>, <a href="https://cloud.google.com/functions/">Google Cloud Functions</a>, <a href="https://azure.microsoft.com/en-us/services/functions/">Azure Functions</a>, and others allow you to essentially route specific types of events back to arbitrary functions/methods.</p><p>Let’s take an example. A fairly routine requirement is to send an email to the customer when the order has been successfully sent to the OMS. You’d start by defining your AWS Lambda function:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2rzid-4rycGL79OM2zYzTA.png" /></figure><p>Then you’d write your code:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Mw02zYmUDcCBKWetyjRONA.png" /></figure><p>Then, you’d bind your function to your topic, so that your code is executed whenever a message is published to that topic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uPHAH6aahpF6WWY43CESjQ.png" /></figure><p>You’d follow a similar approach with the other cloud vendors and their serverless offerings.</p><p>Serverless works great because it’s simple and because it allows different pieces of the application to be changed and deployed at different times. You can change your order confirmation email template without re-deploying your entire monolithic application, which is pretty revolutionary for enterprise-level commerce.</p><p>To summarize, it’s best to use event-based extensions for:</p><ul><li>Asynchronously synchronizing data between systems, often from your commerce platform to legacy back-end systems</li><li>Sending notification emails</li><li>Logging important data for audit purposes</li><li>Computationally heavy activities, like generating product recommendations</li></ul><h3>Posting Data Using Webhooks</h3><p>Rather than the provider of the API publishing events to a topic, your provider may additionally or instead offer webhooks. Webhooks are URLs that the vendor of the API posts data to.</p><p>For example, you can often register webhooks for when an order is placed, a product is added, or a customer record is updated. In the case you register a webhook when an order is placed, the vendor of the API will post the entire order and maybe the customer’s profile to the URL that you define. It’s essentially the same model as events, with the following exceptions:</p><ul><li>HTTP requests are often made synchronously, whereas events are often posted asynchronously</li><li>Rather than pulling messages from a topic, you have to provide your vendor with a URL to post data to</li><li>An event-based model allows any number of consumers to pull the message from the topic, whereas you’re often to define just one webhook URL</li><li>The vendor has to explicitly provide hook points. This often results in fewer hooks being defined. Events are just emitted from the application</li></ul><p>One advantage of webhooks is that it is theoretically possible to post data to back-end systems without having to write an intermediary application or serverless function. The problem is that these back-end systems have different authentication and authorization schemes. Sometimes they require VPNs. It’s hard to do a direct post from your API to another system without that intermediary layer.</p><p>Going back to the previous example of using events, you can also define URLs that trigger serverless functions. This is an example of how you’d do it with AWS Lambda and AWS API Gateaway:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AdNYVZEUqCnxuCcEEaj9jA.png" /></figure><p>In this example, you’d register <a href="https://xatp7l47qh.execute-api.us-west-2.amazonaws.com/prod/SendOrderConfirmationEmail">https://xatp7l47qh.execute-api.us-west-2.amazonaws.com/prod/SendOrderConfirmationEmail</a> as the webhook URL for the “placeOrderWebhookURL” property or whatever your vendor defines.</p><p>At commercetools, we use events rather than webhooks. Our own <a href="https://medium.com/u/6c17d42f6f6c">Christoph Neijenhuis</a> goes into detail at <a href="https://techblog.commercetools.com/webhooks-the-devil-in-the-details-ca7f7982c24f">https://techblog.commercetools.com/webhooks-the-devil-in-the-details-ca7f7982c24f</a>.</p><h3>Wrapping API Calls</h3><p>While events and webhooks solve a wide range of use cases, there are a class of extensions that are inherently synchronous. Examples include:</p><ul><li>Validating data, like checking user-submitted data for SQL injection attacks.</li><li>Performing real-time data checks, like making sure inventory is available during checkout</li><li>Changing how the API works, like changing how prices are calculated</li></ul><p>All of these examples require synchronously executing custom code before or after an API call is made. The process for this flavor of extensions is exactly the same as you’re used to, at least conceptually.</p><p>Let’s take inventory as an example. Let’s say you want to perform a real-time inventory check when inventory dips below 100 units.</p><p>With a traditional commerce platform, you’d use their Inversion of Control (IoC) framework to extend the out of the box inventory code. Out of the box, “InventoryService” would normally return an instance of com.bigcorp.inventory.InventoryService or whatever the out of the box class is. You’d then create com.yourcorp.inventory.CustomInventoryService with a method as follows:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1ddd71998e97954553331dc93785604b/href">https://medium.com/media/1ddd71998e97954553331dc93785604b/href</a></iframe><p>Now, “InventoryService” resolves back to instantiations of com.yourcorp.inventory.CustomInventoryService. Simple.</p><p>The difference is that APIs-based commerce platforms don’t have an IoC framework. You’re consuming APIs from your commerce platform vendor, from 3rd party vendors (payment, tax, product recommendations, etc), and from custom applications/microservices that you build in-house. As we discussed earlier, there is no more single platform — it’s just a bunch of APIs from different sources.</p><p>To perform this simple extension you’d start by using your API vendor’s SDK. Then, pick a small framework like Spring Boot, Play or Node.js and build a standalone application that queries the API using your vendor’s SDK:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4d353d6bf7debf6da7e39dbddd79a912/href">https://medium.com/media/4d353d6bf7debf6da7e39dbddd79a912/href</a></iframe><p>This example is based on Spring Boot.</p><p>Once you’ve defined your application, deploy it behind your API gateway. Clients would then query inventory by accessing <a href="https://api.yourcompany.com/InventoryService">https://api.yourcompany.com/InventoryService</a> and passing productId and variantId as HTTP GET arguments.</p><h3>Summary</h3><p>Using these three basic approaches, you can implement just about any requirement you can think of. And if you can’t, just build a brand new API backed by a new microservice to accomplish your requirement.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f6b3b59da9e7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/commercetools-tech/how-to-extend-commerce-apis-f6b3b59da9e7">How to Extend Commerce APIs</a> was originally published in <a href="https://medium.com/commercetools-tech">commercetools tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Version or Evolve APIs? Why Not Both!]]></title>
            <link>https://medium.com/commercetools-tech/version-or-evolve-apis-why-not-both-a19995a64d21?source=rss-e208e2a75797------2</link>
            <guid isPermaLink="false">https://medium.com/p/a19995a64d21</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[restful]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[microservices]]></category>
            <dc:creator><![CDATA[Kelly Goetsch]]></dc:creator>
            <pubDate>Thu, 26 Jan 2017 20:07:20 GMT</pubDate>
            <atom:updated>2017-01-26T20:19:06.170Z</atom:updated>
            <content:encoded><![CDATA[<p>With <a href="https://www.linkedin.com/pulse/why-apis-future-commerce-kelly-goetsch">APIs now clearly now at the center of commerce</a>, how do the vendors that produce and host those APIs evolve them over time? We at commercetools are constantly pushing updates to production, often multiple times a day. We offer a library of &gt;300 (and growing every day!) <a href="https://dev.commercetools.com/http-api.html">commerce REST APIs as a service</a>. For example, we offer a <a href="https://dev.commercetools.com/http-api-projects-carts.html">shopping cart</a>, a <a href="https://dev.commercetools.com/http-api-projects-productDiscounts.html">discount engine</a>, <a href="https://dev.commercetools.com/http-api-projects-products.html">products</a>, and more — all as REST endpoints that we host for our customers. Our customers simply get <a href="http://dev.commercetools.com/">URLs</a> or <a href="https://github.com/commercetools">native clients</a>, if desired.</p><p>APIs are never static. Continual updates are such an important part of our company culture that new developers end their first day by pushing an update to production. If you want APIs that never change, there are always 20+ year old on premises platforms to choose from.</p><p>Traditionally, commerce applications have forced all clients to use the same API and implementation versions. In practice, this meant the monthly or quarterly release to production would require the clients to be updated at the same time, leading to a long weekend for the ops team. When the only client was a website, this was just fine. When it was mobile and web, it became more difficult because an update to the core platform meant you had to deploy both mobile and web at the same time. But in today’s omnichannel world, there could be dozens of clients, each with their own release cycles. It is not possible to get dozens of clients to push new versions live at the same time. Each client must evolve independently, with its own release cycle.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*alWlJPTt0KG43tdYxrJ6Nw.png" /></figure><p>There are two basic approaches that producers of APIs can take to APIs: evolve and/or version. Let’s start with evolvable APIs.</p><h3><strong>Evolvable APIs</strong></h3><p>Many APIs simply do not change that much, especially if they’re well designed up front by people who understand the domain extremely well. For example, most of the external tax calculators have static APIs. Have a quick look at <a href="http://taxratesapi.avalara.com/docs">Avalara’s tax API</a> as an example. The underlying tax rates and sometimes the formulas change, but the actual API you call is fairly static. The response you get back is also fairly static. The U.S. could adopt a VAT-style tax system and the APIs still wouldn’t change. Most APIs you interact with on a day to day basis are like this.</p><p>Inevitably, APIs need to evolve — but not necessarily change. Let’s say you’re building a customer profile API that allow simple CRUD operations. Let’s pretend this is the JSON object your API accepts to register a new customer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/636/1*-KTd8yiF-ex0bo8GYOPZXg.png" /></figure><p>Now let’s say that your business users want to start capture your customers’ shoe sizes, so they can be targeted with better product offers. Your JSON object would now look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/596/1*VtxsDQn5mTzMa-kAuAL1BQ.png" /></figure><p>This is an <em>evolution</em> of your API, which should be easily supported without versioning the API. If the client doesn’t specify the shoeSize parameter, the server shouldn’t break. This goes back to <a href="https://en.wikipedia.org/wiki/Robustness_principle">Postel’s law</a>, which states that you should be “<em>liberal in what you accept and conservative in what you send.</em>” When applied to APIs, Postel’s law basically means you shouldn’t do strict serializations/deserializations. Instead, your code should be tolerant of additional properties. If shoeSize suddenly appears as an attribute, it shouldn’t break your code. Your code should just ignore it. For example, the <a href="http://fasterxml.github.io/jackson-annotations/javadoc/2.7/com/fasterxml/jackson/annotation/JsonIgnoreProperties.html">serializer we use</a> allows for the following annotation:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4_cT3_xeHdi3Ck8K3jtRPw.png" /></figure><p>If you adopt a strict approach to serialization, any difference in the client and server is going to break the client:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_t_dYdMTzD_2br5yfkDnBw.png" /><figcaption>How many years of your lives have you wasted fixing this type of error?</figcaption></figure><p>The approach of having evolvable APIs goes back to <a href="https://en.wikipedia.org/wiki/Open/closed_principle">Bertrand Meyer’s open/closed principle</a>, which he documented in his <a href="https://www.amazon.com/Object-Oriented-Software-Construction-Book-CD-ROM/dp/0136291554">Object Oriented Software Construction</a> book (1988). In it he said that software entities (especially APIs) should be “open for extension but closed for modification.” He went on to further say:</p><blockquote><em>A module will be said to be open if it is still available for extension. For example, it should be possible to add fields to the data structures it contains, or new elements to the set of functions it performs.</em></blockquote><blockquote><em>A module will be said to be closed if it is available for use by other modules. This assumes that the module has been given a well-defined, stable description (the interface in the sense of information hiding).</em></blockquote><p>The majority of APIs you have will fall into this category. Simply add properties where you can and don’t break existing functionality.</p><p>The major advantage of this approach is that the APIs remain fairly static, allowing clients to code to them more easily. It’s one less dimension for developers to care about. The supplier of the API only has one version of the codebase to support in production at any given time, dramatically simplifying bug fixing, logging, monitoring, etc.</p><p>The disadvantage of this approach is that the APIs are fairly locked in from the start. Vendors who solely adopt this approach lose the flexibility to radically change the APIs. Which is perfectly acceptable in many cases.</p><p>For APIs that change more radically, versioning is the preferred approach.</p><h3>Versioning APIs</h3><p>With versioning, the provider of the APIs deploys more than one major version of an API to the same environment at the same time. For example, versions 1, 2 and, and 3 of the pricing API may be live in production all at the same time. All versions can be serving traffic concurrently.</p><p>While there are many flavors of versioning, a common approach is to guarantee API compatibility at the major version level but continually push minor updates. For example, clients could code to version 1 of an API. The vendor responsible for the implementation of the API can then publish deploy versions 1.1, 1.2, 1.3, and beyond over time to fix bugs and implement new features that don’t break the published API. Later, that team can publish version 2, which breaks API compatibility with version 1.</p><p>Clients (e.g., point of sale, web, mobile, and kiosk) can request a specific major version of an API when making an HTTP request. By default, they should get the latest minor release of a major version. This is often done through a URL (e.g., /inventory/v2/ or /inventory?version=v2) but can also be done through HTTP request headers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t_acVzcV5jBIWGusqwWFFw.png" /></figure><p>This is great for vendors who are rapidly innovating. It allows them to release minimum viable products. When enough is learned, they can fork the codebase and then offer the old version 1 and have an entirely new breaking API as version 2. The vendor isn’t “locked in” to a specific API, as is the issue with evolvable APIs.</p><p>The major challenge that SaaS vendors have with versioning is the persistent data. Here, there are essentially two approaches: You can have one one datastore per major API version or you can have one datastore per environment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lcV_p0xhlJxndIZP5o4H8w.png" /><figcaption>One datastore per API version</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U9V7MMBVdCnOpTfzuthjRQ.png" /><figcaption>One datastore per environment</figcaption></figure><p>If you have one datastore per major API version, then you need to migrate or continually synchronize the data between major versions. If your client was using version 1 of the order API and then you start using 2, you need to physically move or synchronize the data from version 1 to version 2. You can’t just seamlessly switch over to version 2, for example. This is hard to do when you have multiple clients because it requires that you cut all of your potentially dozens of clients over to the new version of the API at the same time. Facebook has gone so far as to offer an <a href="https://developers.facebook.com/tools/api_versioning/">upgrade utility</a>, to help developers transition from one version to another.</p><p>If you have one datastore per environment, with all API versions hitting the same datastore, you have the problem of “evolving” the objects. Your point of sale system could write an order object using version 1 of the API and 5 seconds later your iOS application could try to amend that order using version 2 of the same API. Any API version can write an object and any API version can update that order at any time. This is by far the most common approach but it’s hard to do.</p><p>Given all of the challenges with versioning, why do vendors choose to do it? They do it because it offers more freedom to innovate, especially in a fast-changing environment. Evolvable APIs are easier to support but both the clients and the vendors offering the APIs tend to get locked in over time, slowing the pace of change.</p><h3>How Does commercetools Do It?</h3><p>We at commercetools have favored evolvable APIs, though we are not opposed to versioning in the future. To date, we have never forked a single of our 300 APIs. From an API standpoint at least, eCommerce is a well known problem domain. A shopping cart is a shopping cart. Most of the changes to our APIs tend to be additional fields rather than fundamental differences in functionality that would necessitate the introduction of an entirely new version of an existing API. We do have a <a href="https://dev.commercetools.com/http-api-contract.html#deprecation">deprecation policy</a> for specific fields, but it’s used very rarely. Our company is staffed with eCommerce industry veterans who understood the nuances of modeling eCommerce APIs. It’s a different problem than, say Amazon having to model APIs for Alexa, or for Google modeling its maps API in the early 2000’s.</p><p>We’re certainly open to versioning but again we just haven’t had the need to.</p><p>Our <a href="https://dev.commercetools.com/http-api-contract.html">formal policy</a> states:</p><blockquote>No values or fields will be changed or deleted in the same API Version</blockquote><blockquote>Every change within the same API version only includes additional information:</blockquote><blockquote>— new fields and values within an existing object</blockquote><blockquote>— new messages for the <a href="https://dev.commercetools.com/http-api-projects-messages.html">Messages API</a></blockquote><blockquote>— new API endpoints</blockquote><blockquote>— required fields becoming optional</blockquote><p>Evolvable APIs makes it easy to write clients for our APIs. As a developer, you don’t have to worry about versions. On a daily basis, we push out new incremental versions of our APIs. As a consumer of the APIs, you just get new functionality.</p><p>If you liked this post, we have plenty more on <a href="https://techblog.commercetools.com/">https://techblog.commercetools.com</a>. Have a look!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a19995a64d21" width="1" height="1" alt=""><hr><p><a href="https://medium.com/commercetools-tech/version-or-evolve-apis-why-not-both-a19995a64d21">Version or Evolve APIs? Why Not Both!</a> was originally published in <a href="https://medium.com/commercetools-tech">commercetools tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>