Creating a series of scope sections
As work on your logic app grows ever more complex, it's good practice to break your code into logical sections. This is determined by the object being tested, or the data being manipulated now. For example, you might want to look up a contact and then from this information obtain a list of the contact details for that person. From this, you may want to produce an array of the person's contact details. In this scenario, there are three clear sections to the logic app:
- Obtaining the correct person
- Obtaining this person's contact details
- Generating an array of contact details
Each of these sections can be made by using the scope object. Scoping has several uses, as we will discover in this chapter, but the most basic and obvious function is to break apart the logic app into high-level sections to make it easier for other developers to read and to understand what is happening.
This is the current high-level design...