Functional Requirements
Functional requirements are what the software product must do; what actions it must take to satisfy the business need. For example, it might be to calculate a premium, or plot a trajectory, or record a transaction, or check a password, or any of the almost infinite number of things that our software solutions do. It’s a functional requirement because it describes some activity, whereas a non-functional requirement (covered in the next chapter) describes the qualities or properties of that functionality .
Functional requirements come from the business activity that you discover when you are trawling or prototyping. From that activity—a mix of current and proposed future activities—you determine how much of it is to be done by the software. Let’s look at how you write functional requirements so that the developers can build the right software. Figure 25.1 depicts the process .
Figure 25.1
The required functionality is discovered by the Trawling and Prototyping activities. The output from discovery is converted into detailed functional requirements.
As an example of a functional requirement, the following describes an action that the product must do to provide value to its customer:
The product shall predict which road sections will freeze within the selected time parameters.
You write many such requirements. The complete collection serves as the specification of the product to be built. When your requirements are the right requirements, the developers have no trouble understanding them, and they build the right product: one that solves your customer’s business problem .
Uncovering the Functional Requirements
When you are trawling or prototyping (we talked about these earlier) you are working with your stakeholders and customers. You’ll find that they mainly talk about functionality:
I need a solution to manage the food on the shelves. It has to alert staff when any item falls below its threshold, and also to identify which products have passed their “display until” date. Of course, the solution has to provide the total wholesale value of the entire store and the turnover for each hour.
Your customer is describing desired functionality. For the parts of the functionality that you and she decide to automate, you write functional requirements.
It is of course possible to write these functional requirements at the time your customer describes the needed functionality, but that would result in a disconnected, incoherent, and incomplete set of requirements. You cannot be certain when the customer describes her situation that she has told you everything, and you cannot know how any one requirement would impact another.
To organize your requirements, we suggest that you take rational slices of the whole of the solution’s functionality and write the requirements for each slice. It will come as no surprise that business events are the proposed way of slicing the functionality.
Every business event (we have discussed these several times before) has a functional response we call a business use case (BUC) . The BUC can be set down in several ways, but the easiest one of these to discuss is the scenario. (We covered scenarios in Chapter 20 , Scenarios .)
The scenario is made up of a limited number of steps, each of which is a slice of the BUC’s functionality. These steps are generally small enough that it is a straightforward task to write the atomic functional requirements from them.
The word “atomic” is used to say that while there are components of the requirement—subatomic particles—there is no need to divide the requirement into smaller slices.
If you are using prototypes to uncover the needed functionality, then a prototype might involve more than one business event. Depending on the kind of prototype you have built—process model, screen wireframe, storyboard, video, and so on—you can separate its business use cases, and from there write its functional requirements.
For ready-made solutions (as previously mentioned, these are also called off-the-shelf solutions, software as a service, cloud solutions, and other names), functional requirements are written for any needed configuration or modifications to the ready-made. There is a distinction between the two. Configuration means you’re using the ready-made’s functionality as intended. That is, you are adjusting parameters supplied by the vendor to adapt the ready-made to your particular situation. Modification means making changes to the ready-made that cannot be done by configuring parameters. There are also requirements for auxiliary applications needed as front-end or back-end processes for the ready-made.
Deciding the Solution’s Functionality
Functional requirements specify the actions that your solution has to take to support your customer’s business, whatever that may be. So far, the discussion has been concerned with the customer’s business, but your customer may not always desire to automate the entirety of the business. So, you and your customer determine the extent of the automation.
Consider Figure 25.2 . The process model (shown as a data flow diagram, but any notation works equally well) shows a BUC. The business event happens, and the triggering data flow enters the workspace and sets off a chain of activities to respond accordingly to the event. This is standard for any business.
Figure 25.2
Determining the product boundary
Let’s say that the customer wishes activity A to be done by a human. There are reasons for such a decision: registering incoming visitors, checking credentials, and so on. This means that activity A is outside any automated product. Activity B uses the data from activity A to access data that is stored digitally (on an in-house server or the cloud), so the accessing activity must be automated. Activity C is also part of the automated product, for the same reason. This results in the product boundary being drawn between activities A and B.
Alternatively, you might move the product boundary so as to include activity A in the automated product—let’s say that it does not have to be done by a human after all. So now the product includes all of the work’s response to the business event. This is quite common—online shopping, a telephone banking app, email, and so on—and you will want to have such a product boundary many times in your requirements work.
You could also move the boundary to the right and include less of the BUC in your product. There are many possibilities, and there is a lot more on this in Chapter 31 , Determine the Extent of the Automation .
Let’s say that you and your customer have agreed on the product boundary. The activities inside this boundary make up the product use case (PUC) . You write the requirements for all the activity contained by the PUC.
Figure 25.3 illustrates the part of the Requirements Knowledge Model that shows how BUCs, PUCs, and atomic requirements fit together. It also shows the equivalent components if you are using stories. These story components are explained in Chapter 28 , Writing Good Stories . Note that the complete Requirements Knowledge Model is in Appendix C , Volere Requirements Knowledge Model .
Figure 25.3
The part of the Requirements Knowledge Model under discussion. The asterisks indicate that many instances of an entity (also called class) participate in the relationship.
You see in this partial model how either the BUC or the business event story is the response to the business event. The product use case or functional story indicates the part of the response you choose to include within the scope of the product. This is then broken down into its atomic functional requirements, or detailed tasks for stories.
Before we leave this, we should mention the part of the BUC that fell outside the product scope. This is the activity/activities to be done by humans. The requirements for this should be written or assembled so that they become part of an operations manual . This manual could include different artifacts such as a list of instructions, business process models, activity diagrams, flow diagrams, screenshots, example forms, functional requirements, or anything else that explains to the humans what they are intended to do. In whichever way it is assembled, it should describe the functionality to be done by the human workforce. You can think of it as a requirements specification for humans.
Now let’s look at how you would write the functional requirements.
Writing the Requirements
To write requirements we need something to write about. Fairly obviously, this is the functionality needed by the solution to support your customer’s business. As mentioned previously, a scenario describing the functionality of a product use case is a good place to start. We discussed scenarios in Chapter 20 .
Simply put, each step from the scenario is converted to functional requirements. This is illustrated in Figure 25.4 .
Figure 25.4
Each of the scenario’s steps is decomposed into its functional requirements. The collection of functional requirements specifies what the product must do to fulfill the business outcome of the PUC.
The following scenario describes a product use case for a solution that predicts when ice will form on roads and sends a schedule to the truck depot showing which roads have to be treated and when. You have seen snippets of this previously.
Product use case: Produce Road Deicing Schedule
-
Engineer provides a scheduling date and district identifier to the product.
-
Product retrieves the relevant thermal maps.
-
Product uses the thermal maps, district temperature readings, and weather forecasts to predict temperatures for each road section in the district.
-
Product predicts which road sections will freeze and when they will freeze.
-
Product schedules available trucks from the relevant depots.
-
Product advises the engineer of the schedule.
Including three to ten steps in the scenario should give a reasonable level of detail, without making it too complex for nontechnical stakeholders.
The steps in this product use case scenario describe the product’s response to the business event, Time to schedule deicing . Having a limited number of steps—we suggest between three and ten—in the scenario prevents you from getting enmeshed in details and ensures that the scenario is written in stakeholder-friendly language.
Once you and your stakeholders have agreed on the scenario, for each of the steps ask, “What does the product do to complete this step?” For example, the first step in the scenario is:
1. Engineer provides a scheduling date and district identifier.
What does the product do to complete this step? The first thing is fairly obvious, so this is your first functional requirement:
The product shall accept a scheduling date.
When you ask the stakeholders whether there is anything special about the scheduling date, they tell you that due to imprecise forecasts, they schedule no more than two days in advance. This information suggests another functional requirement:
The product shall warn if the scheduling date is neither today nor the next day.
Another requirement from the first step is:
The product shall accept a valid district identifier.
You discover another requirement when you inquire what is meant by “valid.” The identifier is valid if it identifies one of the districts for which the engineer has responsibility. It would also be valid if it is the identity of a district that is intended by the engineer. This leads us to two more functional requirements:
The product shall verify that the district is within the deicing responsibility of the area covered by this installation.
The product shall have the engineer verify that the requested district is accurate.
The objective is to write enough functional requirements for your developers to build exactly the product that your client is expecting and that your user needs to do the work.
The number of requirements you derive from any step is not important. However, it can sometimes be an indicator of too much or too little granularity. Experience tells us that it is usually fewer than six. If you uncover only one requirement from each step, it suggests either the level of detail in your scenarios is too granular or your functional requirements are too coarse. If you find you are writing more than six requirements per step, it suggests that either your requirements are too fine-grained or you have a very complex use case. There is no hard rule here, but it is worthwhile to pay attention to the granularity of your requirements.
Regardless of granularity, the objective is to write enough functional requirements for your developers to build exactly the product that your client is expecting and that your user needs to do the work.
Let’s consider another of the product use case steps from our example scenario:
4. Product determines which roads will freeze and when they will freeze.
This step in the PUC scenario leads us to write three functional requirements:
The product shall determine which areas in the district are predicted to freeze.
The product shall determine which road sections are in the areas that are predicted to freeze.
The product shall determine when each road section will freeze.
Now continue in the same vein, working through each step from the scenario. When you have exhausted the steps, you should have written all the functional requirements for the product use case. You should test whether you have completed the PUC by walking through the requirements with a colleague and demonstrating that the product use case provides the correct outcome for the customer.
You can do the same thing using a process model. Figure 25.5 illustrates this.
Figure 25.5
The activities on a process model are able to be decomposed to a collection of functional requirements.
The Snow Card
So far, the requirements have been no more than “the product shall …” statements. You need more detail. The best way to do this is to introduce the snow card. Figure 25.6 shows one.
Figure 25.6
The snow card carries the attributes of a requirement.
The snow card shows the attributes of a requirement. It is an idea borrowed from American architect William Peña. Peña was an advocate of architectural programming, which has many parallels with requirements discovery and recording. Peña’s teams used blank cards that they taped to a wall for recording requirements and issues for the buildings they were designing. We adapted his idea by adding field headings such that when a card is filled in, it provides a rigorous definition of a requirement.
We are not for a moment suggesting that requirements work is filling out forms. We are suggesting that you can make use of the snow card’s fields to write better requirements . Similarly, we are not suggesting that requirements should be written on paper cards; most people find an electronic “card” is easier to work with and share.
In any event, it is not the medium of the card but its contents that are important to us. We will get to all of the content in good time, but first consider the Description and the Rationale . These are the “what” and the “why” of a requirement.
The examples shown above are the description of the requirement, but there is more to a requirement than that. We suggest—strongly suggest—that you add a rationale to your requirements to show why the requirement exists. In some cases, this might be obvious, but in many circumstances, it is a crucial component of the requirement.
For example:
Description: The product shall record roads that have been treated.
This might seem at first glance to be a routine requirement and of no great importance. Now let’s add the rationale for this requirement:
Description: The product shall record roads that have been treated.
Rationale: To be able to recognize untreated roads and highlight potential danger.
The rationale indicates whether the requirement is worthy of some special attention.
Now it looks a little more serious—human lives could possibly be at risk, or at the very least, the owner of this product would not be carrying out his statutory duties. With the inclusion of the rationale, you give the developer the opportunity to build a better solution; one that makes this information readily accessible to the functionality that discovers the untreated roads. Clearly, the rationale indicates that this requirement is worthy of some attention.
Now consider this example:
Description: The product shall record the start and end time of a truck’s scheduled activity.
This is a normal kind of requirement, one that would not cause much comment. But does it contribute any value to the product? Let’s look at two possible rationales:
Rationale: The truck depot foreman wants to know which trucks are being most used.
Or:
Rationale: Trucks are to be scheduled a maximum of 20 out of 24 hours to allow for maintenance and cleaning.
Now we are getting somewhere. The first rationale says that the requirement is low priority and might not be worthwhile implementing. After all, the depot foreman can discover the trucks’ usage simply by reading their tachometers. However, the second rationale indicates that this is a valuable requirement: If it is not implemented, then the truck fleet will suffer.
By knowing why something is there, the developers and the testers know much more about the effort they should expend on it.
By including a rationale with the description, the requirement itself becomes more useful. By knowing why something is there and how important it is, the developers and the testers know much more about the effort they should expend on it. It also indicates to future maintainers why the requirement exists in the first place.
The rationale also helps to overcome the possibility of inadvertently writing a solution instead of the real need. For example, the following requirement description is written for a machine to sell bus tickets for a city bus company:
Description: The product shall provide the bus network route map on a touchscreen.
The description is actually a solution to the problem. When the rationale is added, the real need becomes visible:
Description: The product shall provide the bus network route map on a touchscreen.
Rationale: Passengers have to provide their destination for the fare to be calculated.
The rationale indicates that the real requirement is for passengers to provide a destination. How they do so is best left to the user experience designer and the solution architect. The touchscreen might be the best way to accomplish this goal, but then again, it might not. If tourists were prominent users of the buses, then they would not be familiar with the layout of the network, and finding the stop on a map might be a very slow process. This would not please passengers standing behind them in the queue to buy tickets. Also, if the network is divided into zones for charging purposes, then for regular commuters, it might be more efficient to have a way to indicate the number of zones to be covered and to ignore the actual stops. After all, a destination can be a stop or a zone.
Regardless of how the need is finally implemented, it is clear that writing both the description and the rationale leads to discovery of the real requirement.
Why is this aspect of requirements development important? Because it is far too easy to hide important functionality by describing an implementation, and it is far too easy to select the most obvious implementation when better ones may exist. Regardless of how the need is finally implemented, it is clear that writing both the description and the rationale leads to discovery of the real requirement. It also leads to more accurate requirements. Often, the rationale clarifies the requirement and you then update the description. You might also find that when presented with your proposed rationale, your customer realizes that you have been given the wrong description. And so it goes.
We have not yet talked about how to ensure that each requirement is measurable and hence testable. We do this by adding a fit criterion , and this is so crucial that we have devoted Chapter 27 , Fit Criteria and Rationale , to it. There are more attributes to a requirement; they are shown on the snow card in Figure 25.6 . We shall come back to these later, so for the moment, we can leave the functional requirements as a description and rationale only.
Technological Requirements
Technological requirements specify functionality that is needed purely because of the chosen technology. In the example of the PUC that produces the deicing schedule, the product interacts with an external thermal mapping database. Suppose the designer decides that handling this interaction via an internet connection is the best option. Because of this technological choice, the product has a need to establish a secure connection. This need is a technological requirement; that is, it arises purely because of the chosen technology. If the designer had selected a different technology to handle this part of the work, the result would be different technological requirements.
The technological requirements are not there for business reasons, but rather to make the chosen implementation work. We suggest that the technological requirements are identified as such. Stakeholders must clearly understand why a requirement appears in the specification, so it is important that the technological requirements are not introduced before the business requirements are fully understood.
Level of Granularity
Requirements are written as a single sentence with a single verb.
Note the level of detail or granularity in the preceding examples—the requirements are written as a single sentence with a single verb. When you write a single sentence, you make the requirement readily testable and far less susceptible to ambiguity. The functional requirement describes an action, so there is always a verb, and preferably a single verb. The action is what the product must do to satisfy a business need.
Functional requirements are verifiable by your business stakeholders. This is not to say that you have to show every requirement to them, but when you need to, you want them to understand enough to come to an agreement as to whether this is the real business requirement.
Additionally, a reasonable developer is able to build the correct product. “Reasonable” might be arguable, but today’s developers are, for the most part, pretty good. If your developers say they cannot build from the requirement, then you must suspect that your requirement is too vague or ambiguous.
Note the form “The product shall …”; it makes the sentence active and focuses on communicating what the product is intended to do. It also provides a consistent form for the developers and other stakeholders who need to have a clear understanding of what the product is intended to do. You can of course substitute “will” for “shall” (some people claim it is grammatically better), but be consistent with whichever you choose. Some people prefer to omit “The product shall” and write:
Record the salt capacity for each truck added to the fleet.
Use a separate component of your requirement to indicate the priority of the requirement.
Please don’t try to use the description to indicate priority. Sometimes people use a mixture of “The product must,” “should,” or “could” to indicate the priority of a requirement. This practice results in semantic confusion, and we advise against it. Instead, use one consistent form for writing your requirements’ description (“The product shall …” is probably the most common), and use the priority attribute on the snow card to indicate its priority.
Conditional Requirements
Sometimes you need to add a condition to a requirement. This happens when the requirement comes into play when certain processing circumstances have occurred. For example:
If a road scheduled for treatment has not been reported as treated within 30 minutes of its scheduled time, the product shall issue an untreated road alert.
Alternatively, you might find that the requirement reads more easily if you write it with the condition at the end:
The product shall issue an untreated road alert if a road has not been treated within 30 minutes of its scheduled time.
Avoiding Ambiguity
Whether the sources of your requirements consist of written documents or verbal statements from interviews, you should be aware of the enormous potential for ambiguity and the misunderstanding that ambiguity can cause. Ambiguity arises from several sources.
First, the English language is full of homonyms. English contains an estimated 500,000 words in normal usage and about the same number of technical, scientific, and other specialized words. Normal-language words have been randomly added by many different people and from many sources over a long period of time. This growth has led to different usages and meanings of the same word.
It is difficult to imagine why, when the language contains a huge number of words, so many of them have multiple meanings.
Consider the word “file,” which is used so commonly in information technology. In addition to meaning an automated storage place for information, it means a metal instrument for abrading or smoothing; a collection of documents; a row of people, as in “single file”; a slang term for an artful or shrewd person; a verb meaning to rub away or smooth; and more recently a verb used by lawyers when they “file suit.” Of course, “suit” itself also means the clothing the lawyer wears in court, as well as a set of playing cards such as hearts, diamonds, spades, and clubs. It is difficult to imagine why, when the language contains so many words, so many of them have multiple meanings.
When writing requirements, we have to contend with more challenges than just homonyms. If the context of your product is not clear, then it will also lead to ambiguity. Suppose you have the following requirement:
The product shall show the weather for the next 24 hours.
The meaning here depends on the type of requirement and what is near it in the specification. Does the requirement mean the product is to communicate the weather that is expected to happen in the forthcoming 24 hours, or must it communicate some weather and continue to do so until one full day has elapsed?
We advise you to group your requirements by product use case and write your requirements one PUC at a time. This system of organization will, to a large extent, reduce ambiguity. For example, consider this requirement:
The product shall communicate all roads predicted to freeze.
Does “all” refer to every road known to the product? Or just those roads being examined by the user? The PUC scenario tells us that the user has previously identified a district or an area within the district. Thus, we may safely say that “all” refers to the geographical area selected. In fact, the meaning of almost any requirement depends on its context. This is quite a good thing because we do not need to waste time by laboriously qualifying every word of every requirement. While anything has the potential to be ambiguous, the PUC scenario, by setting a context for the requirement, minimizes the risk of ambiguity.
You can also make your requirements less ambiguous by including a glossary of terms in your specification. This is why section 4 of the Volere Requirements Specification Template—Naming Conventions and Terminology—exists. The terminology you define there should be used consistently throughout your requirements definitions.
You should try to eliminate pronouns from your requirements and replace them with the subject or object to which the pronouns refer. (Note the potential ambiguity of the preceding sentence if we had said “they” instead of “the pronouns.”)
When you write a requirement, read it aloud. If possible, have a colleague read it aloud. Confirm with your stakeholder that you both reach the same understanding of the requirement. This may seem obvious, but “send the bill to the customer” may mean that the bill goes to the person who actually bought the goods or that the bill is sent to the account holder. It is also unclear whether the bill is sent immediately after the purchase or at the end of the month. And does “bill” refer to an invoice, a bill of materials, or a bill of lading? A short conversation with the appropriate stakeholders about the definition and consistent use of terminology will clarify the intention.
Grouping Requirements in Your Specification
We have spent a fair amount of time talking about business events and how they make the discovery of the requirements easier. What they also make easier is the development of the product. We discussed deriving a product use case from the business use case (from a BUC to a PUC), and suggested that you write your requirements one PUC at a time. The PUC is a separate and distinct amount of functionality. It is a natural choice to be a unit of development.
This leads to saying that because you are probably writing your requirements from a scenario or a process model, as discussed above, you keep the requirements grouped in their PUCs. This gives a context to the requirements, making it easier for the developers to understand what is needed.
Additionally, grouping by PUC makes any specification easier to read.
Requirements for Ready-Made Products
Requirements for solutions using ready-made components are in effect no different from requirements for custom-built solutions. Some of the requirements are written to configure or customize the ready-made product, but they are still written in the form “The product shall …”.
Functional requirements written about the configuration of the ready-made product specify what the product will do when it is configured. “The product shall …” tells the developer what functionality is needed, and she uses the configuration capabilities of the ready-made to make it perform as desired.
You also must specify any needed customization. Here the functional requirements specify the required changes to the ready-made. They are the same as before in that they specify needed functionality, and the developer builds that into the ready-made. It is necessary to make it clear to the developer which parts of the ready-made are being changed, and additionally what ready-made functionality has to be removed.
Integrating the ready-made with existing IT solutions and their operating environment is usually a major part of your requirements work. Here you write requirements for any changes needed to the ready-made to make it compatible with existing databases. This entails mapping the ready-made’s data to existing corporate data. Required changes to either the ready-made or existing interfacing systems are specified with functional requirements.
In some cases, you need to build front-end or back-end applications to provide data to or receive data from the ready-made. These are partly the same as regular apps but need additional functionality to integrate the data. A front-end application would normally be acquiring data to populate the ready-made’s databases. Here you write requirements to ensure smooth integration between the incoming data and the ready-made. On the other side, the back end, many of the requirements have to do with making the ready-made’s data work with existing systems.
In these cases, requirements are written as we have been describing them.
Review
Functional requirements specify what the solution must do to satisfy the business need. They are written as an action: “The product shall …”, followed by a verb. The functional requirements should be a complete and unambiguous description of the product’s functionality.
Functional requirements are derived from the product use cases—the portion of the business use case that is to be done by the product. The most convenient way we have found to generate the functional requirements is to write a scenario that breaks the PUC into a number of steps. Examine each step and ask, “What does the product have to do to accomplish this step?” The things that it does are the functional requirements.
A process model achieves the same result. You examine each of its activities and ask the question as above. You write the functional requirements from the answers.
We suggest that you write these requirements (for the moment) using two components: a description and a rationale. As we work through the book, we discuss how to formulate the rest of the requirement’s attributes.
One thing that you will probably notice is that your requirements sometimes evolve. We mentioned above that when you write the rationale for the requirement, it sometimes causes stakeholders to reconsider what they have asked for. You update the description accordingly. You might also find that as you specify more and more of the product, you revisit existing requirements and reconsider and, sometimes, change them. However, by saying this, we are not advocating uncontrolled requirements hacking. Rather, we advocate that you keep an open mind about your requirements and be prepared to change them if circumstances warrant a change.
When you have sufficient functional requirements to achieve the outcome of a product use case, it is time to move on to the next one. As you progress through these PUCs, you may discover that a requirement you defined for one PUC also applies to other PUCs. Reuse the requirement you have already written by cross-referencing it to all relevant PUCs.
When all of the product use cases have been treated, you will have defined the requirements that completely and unambiguously specify the functionality of the product.
When all of the product use cases have been treated this way, you will have defined the requirements that completely and unambiguously specify the functionality of the product.
Resources
The best resource for writing functional requirements is the template packaged in Appendix A , The Volere Requirements Specification Template .