scieee AI-readable full text Open interactive document viewer

Development of a data migration automation tool from salesforce to salesforce

Mouyal Amselem, Meir Carlos

Abstract

Las empresas que trabajan con entornos de Salesforce tienden a operar con múltiples entornos para fines de capacitación, desarrollo, pruebas o soporte. Ahora, para realizar tareas, surge un requisito esencial para habitar estos entornos con datos. Sin embargo, los entornos de Salesforce están completamente aislados, lo que significa que no comparten datos entre ellos. Como consecuencia, los empleados de la empresa con frecuencia se encuentran la necesidad de realizar complejas migraciones de datos con el fin de poblar sus entornos con datos. No obstante, las migraciones de datos son tareas difíciles, manuales, propensas a errores que requieren de mucho tiempo y de una amplia planificación junto a una muy buena comprensión de los entornos de Salesforce en cuestión. Como resultado, en un esfuerzo por hacer que realizar una migración de datos sea un proceso fácil y sin esfuerzo, el objetivo de este proyecto es construir una herramienta de migración de datos simple e intuitiva compatible entre entornos de Salesforce, capaz de automatizar todos los pasos complejos que abarca una migración de datos.

Full text

Development of a Data Migration Automation Tool From Salesforce To Salesforce Student: Meir Carlos Mouyal Amselem Defense Date: Thursday 2nd of July 2020 Bachelor Degree in Informatics Engineering, Software Engineering Educational Cooperation Agreement Modality B: Nuvolar Works    —— Bachelor Thesis ——     Supervisor Alicia García Romero Team Lead Nuvolar Works Co-supervisor Alberto Otero Pascual Senior Software Engineer Nuvolar Works Tutor Cristina Gómez Seoane Software Engineering College Professor FIB - UPC     ABSTRACT Companies that work with Salesforce environments tend to operate with multiple           environments for training, development, testing or support purposes. Now, in          order to perform tasks, it emerges an essential requirement to populate these            environments with data. However Salesforce environments are completely isolated, meaning that they         share no data between them. As a consequence, company employees frequently           encounter the need of undergoing through complex data migrations to populate           their environments with data. Nonetheless, data migrations are challenging, manual, error-prone and        time-consuming tasks that require ample planning and a really good          understanding of the Salesforce environments in hand. As a result, in an effort to make performing a data migration an easy and effortless                process, this project goal is to build a simple and intuitive data migration tool              compatible between Salesforce environments, capable of automating all the         complex steps a data migration encompasses.  RESUMEN Las empresas que trabajan con entornos de Salesforce tienden a operar con            múltiples entornos para fines de capacitación, desarrollo, pruebas o soporte. Ahora,           para realizar tareas, surge un requisito esencial para habitar estos entornos con            datos. Sin embargo, los entornos de Salesforce están completamente aislados, lo que           significa que no comparten datos entre ellos. Como consecuencia, los empleados           de la empresa con frecuencia se encuentran la necesidad de realizar complejas            migraciones de datos con el fin de poblar sus entornos con datos. No obstante, las migraciones de datos son tareas difíciles, manuales, propensas a            errores que requieren de mucho tiempo y de una amplia planificación junto a una              muy buena comprensión de los entornos de Salesforce en cuestión. Como resultado, en un esfuerzo por hacer que realizar una migración de datos sea              un proceso fácil y sin esfuerzo, el objetivo de este proyecto es construir una              herramienta de migración de datos simple e intuitiva compatible entre entornos           de Salesforce, capaz de automatizar todos los pasos complejos que abarca una            migración de datos.   1 RESUM Les empreses que treballen a entorns de Salesforce tendeixen a operar amb            múltiples entorns per a fins de capacitació, desenvolupament, proves o suport. Ara,            per a fer tasques, sorgeix un requisit essencial per a habitar aquests entorns amb              dades. No obstant això, els entorns de Salesforce estan completament aïllats, la qual cosa             significa que no comparteixen dades entre ells. Com a conseqüència, els empleats            de l'empresa amb freqüència es troben la necessitat de realitzar complexes           migracions de dades amb la finalitat de poblar els seus entorns amb dades. Tanmateix, les migracions de dades són tasques difícils, manuals, propenses a           errors que requereixen de molt de temps i d'una àmplia planificació al costat d'una              molt bona comprensió dels entorns de Salesforce en qüestió. Com a resultat, en un esforç per fer que realitzar una migració de dades sigui un                procés fàcil i sense esforç, l'objectiu d'aquest projecte és construir una eina de             migració de dades simple i intuïtiva compatible entre entorns de Salesforce, capaç            d'automatitzar tots els passos complexos que abasta una migració de dades.    2 Notation K after a number is for Thousands M after a number is for Millions Acronyms API Application Programming Interface Auth short for authorization, referring to the OAuth protocol CSV Comma Separated Values DB Database FDP Final Degree Project FR Functional Requirement HTTP HyperText Transfer Protocol IT Information Technology POC Proof Of Concept OAuth Open Authorization OSX Macintosh Operating System Version 10 QA Quality Assurance UI User Interface    3 Index Notation 3 Acronyms 3 1. Introduction 9 1.1. Context 10 1.1.1. CRM 10 1.1.2. Salesforce 10 1.1.2.1. Salesforce Architecture 101 11 1.1.2.2. Salesforce Objects 12 1.1.2.3. Objects Restrictions 13 1.1.3. Data Migrations 14 1.2. Problem Statement 15 1.3. Goal & Real Scope 16 1.3.1. Goal 16 1.3.2. Real Scope 16 1.4. Stakeholders 16 1.4.1. Internal Stakeholders 17 1.4.1.1. Salesforce Company 17 1.4.1.2. Companies working with Salesforce 17 1.4.1.2.1. Developers 17 1.4.1.2.2. Q/A & Support 17 1.4.2. External Stakeholders 18 1.4.2.1. Companies not working with Salesforce 18 2. State of Art 19 2.1. Salesforce Data Loader (developer tool) 20 2.2. Jitterbit Data Loader (developer tool) 20 2.3. Dataloader.io (commercial tool) 20 2.4. Summary 21 3. Project Management 23 4 3.1. Project Life Cycle 23 3.1.1. Learning & Researching 23 3.1.2. Project Vision: Conception & Initiation Phase 25 3.1.3. Project Strategy: Planning & Analysis Phase 26 3.1.4. Project Execution: Design & Implementation Phase 26 3.1.5. Project Closure 28 3.2. Methodology and Rigor 28 3.3. Time Estimates & Gantt Diagram 30 3.4. Risk Management 31 3.5. Resources and Economic Management 32 3.5.1. Direct Costs 32 3.5.1.1. Human Resources 32 3.5.1.2. Software 34 3.5.1.3. Hardware 34 3.5.2. Indirect Costs 35 3.5.3. Contingencies 35 3.5.4. Incidentals 36 3.5.5. Total Budget 36 3.5.6. Cost Control 36 3.6. Conclusions 37 4. Scope 38 4.1. General Objectives 38 4.2. Complementary Background Knowledge 38 4.3. Example Scenario 42 5. Requirement Analysis 44 5.1. Functional Requirements 44 5.1.FR1. Org Auth Management 44 5.1.FR2. Metadata Management 44 5.1.FR3. Orgs Mapping Management 44 5.1.FR4. Migration Records Input 45 5 5.1.FR5. Migration Automation 45 5.1.FR5.1. Considerations 45 5.2. Non-Functional Requirements 46 6. Specification 48 6.FR1. Org Auth Management 48 6.FR2. Metadata Management 50 6.FR3. Orgs Mapping Management 51 6.FR4. Migration Records Input 53 6.FR5. Migration Automation 54 6.2. Conceptual Model 55 6.2.1. Integrity Rules 56 7. Design 58 7.1. Architecture 58 7.2. Front-end 60 7.2.1. User Interface 60 7.2.1.1. Home Page 61 7.2.1.2. Authentication Callback Page 62 7.2.1.3. Parent Objects Migration Page 63 7.2.1.3.1. Main Object Selection Step 63 7.2.1.3.2. Orgs Mapping Step 64 7.2.1.3.1. Salesforce IDs Step 66 7.2.2. Site Map Navigation 67 7.2.3. Internal Design 67 7.3. Back-end 69 7.3.1. REST API 70 7.3.1.1. Authentication Endpoints 70 7.3.1.2. Org Management Endpoints 70 7.3.1.3. Orgs Mapping Endpoints 70 7.3.1.4. Data Migration Endpoints 71 7.3.2. Internal Design 71 6 7.3.3. Database Physical Schema 73 7.3.3.1. Collection Schemas 74 7.3.3.1. Identifiers 77 7.3.3.2. Integrity Rules 77 8. Implementation 78 8.1. Technologies 78 8.1.1. Front-End Libraries 79 8.1.2. Back-End Libraries 79 8.2. Primary Implementation Procedures 80 8.2.1. The Graph module 80 8.2.2. Optimization of Salesforce Requests 81 8.2.2.1. Salesforce Requests for Metadata 81 8.2.2.2. Import, Update and Deletion of Migration Records 81 8.3. System Limitations 82 9. Validation Testing 83 9.1. Testing Environment 84 9.2. Functional Requirements Tests 84 9.2.1. Automated Tests 84 9.2.1.1. Unit Tests 85 9.2.1.2. Integration Tests 85 9.2.2. Manual System Tests 86 9.3. Non-Functional Requirements Tests 91 10. Sustainability 93 10.1. Self-Assessment of the Domain of Sustainability 93 10.2. Environmental Dimension 94 10.2.1. Regarding PPP 94 10.2.2. Regarding Useful Life 94 10.3. Economic Dimension 95 10.3.1. Regarding PPP 95 10.3.2. Regarding Useful Life 96 7 10.4. Social Dimension 96 10.4.1. Regarding PPP 96 10.4.2. Regarding Useful Life 97 10.5. Conclusions 97 11. Technical Competencies 99 11.CES1 99 11.CES1.1 99 11.CES1.3 99 11.CES1.5 100 11.CES2 100 11.CES2.1 100 11.CES3 101 11.CES3.1 101 12. Project Retrospective 102 12.1. Closing Remarks 102 12.2. Main Challenges 103 12.3. Integration of Knowledge 105 12.4. Future Work 107 13. References 108    8 Bearing in mind the risk of significant data repercussions through a vaguely or             badly performed data migrations, along with the immense amount of          considerations to contemplate during the process, data migrations have the          reputation of being complex, challenging, error-prone, time-consuming, manual        and tedious tasks that demand ample planning along with a superb           understanding of the current system. Accordingly, as it would result in a waste of time for a company to constantly have                to dedicate large amounts of time on performing long manual data migration            processes, when in need of undergoing frequent data migrations, it is very            reasonable to reach towards some sort of software with the capability of            simplifying the process of achieving a successful migration. At the same time, in order to ensure the success of complex migrations,             dedicating a generous amount of time and effort to completing this process            manually is completely understandable. However the use of tools to ease the            process of certain tasks or the automation of some steps is key for a better               experience and use of resources. 1.2. Problem Statement Companies that work in Salesforce project’s tend to operate with different           Salesforce environments for development, testing, integration or training        purposes. And in order to perform tasks, there is an essential requirement to             populate the environment with data. Conversely, thanks to the previously presented context, we now understand the           complexity of this requirement, as we now know that Orgs are isolated            independent environments that share no data between each other, and that           when created, contain no data. Another fact we know is that the process of migrating data is a challenging and               time-consuming task that demands ample planning, manual work and a really           good understanding of the system to get the data to be imported correctly. Therefore, as stated earlier, dedicating time and effort to a data migration only             makes sense when it is not a process that needs to be repeated regularly. On the other hand, the user need of working on multiple Salesforce environments             along with the difficulty to repeatedly, manually move data between Orgs creates            an opportunity for the automation of this task, the automation of transferring data             between Salesforce Orgs. 15 1.3. Goal & Real Scope 1.3.1. Goal As a result of the immense amount of topics and possibilities the subject of data               migration covers, the goal of this project is to implement a Minimum Viable             Product (MVP) of a partial data migration tool that automates the process of             transferring data from a Source Salesforce Org to a Target Salesforce Org. In other words, what is desired to obtain from this project is to have a simple and                 intuitive tool that allows for a quick and easy way of transferring data between              Orgs with the least amount of knowledge necessary. In such a manner, transferring data between Salesforce Orgs will become an            easier, less manual, time-consuming and error-prone task, removing the concerns          related to conducting data migrations. 1.3.2. Real Scope As just stated, the goal of this product is to have an MVP of a data migration tool.                  Why only an MVP? Because an ETL’s* software real scope is so extensive that it               would be impossible to develop a complete ETL tool within the few months that              this project lasts. *ETL is short for Extract, Transform and Load, which are the 3 main database operations performed                by data migrations tools, hence, ETL software is just another way of referring to data migration tools. The full scope of a data migration tool could cover numerous functionalities like: ❖Several ways of selecting the data to transfer. ❖Offer different types of migrations. ❖Saving and managing the different data transfers previously done. ❖Duplicating entire Orgs, meaning not only migrating the Orgs data but also            its entire metadata. ❖Support the transfer of data from a Source Org to multiple Target Orgs             simultaneously. ❖Support the import of external data, being data manually imported from           the user. ❖offer the update and deletion of records through the user interface. There are literally an infinite number of use cases that could be carried out for an                ETL, as a result, this project involves the core functionalities necessary in order to in               future work progressively grow into an extensive ETL. 1.4. Stakeholders Stakeholders are all the parties that can have an interest in the software being              developed in this project. In this report I will distinguish between 2 sorts of              stakeholders: internal and external. 16 Internal stakeholders are the actors who have a direct relationship with the            software being developed, and external stakeholders the actors who could be           interested in this software, but that do not have any direct relationship with it. 1.4.1. Internal Stakeholders 1.4.1.1. Salesforce Company Considering that the software developed in this project requires to work with            Salesforce software then, without a doubt, Salesforce is an obvious stakeholder           because of its direct relationship with the project For this reason is that Salesforce is a relevant stakeholder, since they can benefit              directly from all the advantages this tool provides. In this way they could be              interested in buying it or even promoting it by mentioning it through their help              forums or other resources so that other clients can benefit from it too. 1.4.1.2. Companies working with Salesforce Since companies that work with Salesforce use Salesforce, they also have a direct             relationship with this project’s product, and their interest is clear, since they are the              particular group of consumers at which the tool is aimed at. Additionally, when facing the need of a data migration, they will at least need to               consider the use of this tool. Later, if the tool meets their migration requirements,              they will work with it. 1.4.1.2.1. Developers Inside the company, developers are usually the workers assigned to carry out the             data migrations, therefore developers are the company employees most         interested in this tool. That is because this tool will allow them to do what they do                 best, to develop, instead of having to do the manual tedious work of comparing,              analyzing and planning the transfer of data between Orgs. 1.4.1.2.2. Q/A & Support Well-structured companies have teams for Q/A and Support so that they can            correspondingly test the functionalities of the product and provide support to their            clients. This demands the company with capability of working with different          environments, and this means that they have the need of populating the Orgs             with data in order to work. Hence, it is in their interest to have a simple, quick and efficient approach to               transfer data to their new or broken Org. In this way they can have a smooth data                 migration process instead of receiving complex training as a means to capacitate            17 them on performing their own data migrations, or alternatively, delegating the           task to a developer. 1.4.2. External Stakeholders 1.4.2.1. Companies not working with Salesforce Companies looking to build a project while doing some research on the available             options or companies looking to switch CRM systems might also be interested in             data migration tools that are compatible between Salesforce Orgs, as it would help             them in their future development process.   18 2. State of Art Because that migrations can be as complex as you may need or want them to be,                data migration tools can be planned and developed in many different ways, each             with their different functionalities, constraints and limitations. It is also important to note that there will be no perfect ETL solution that will work                 for every single project, as different migrations come with different requirements,           besides being highly dependent on the Target Orgs internal logic. The most popular ETL option requested by users is in the form of a cloud-based               tool, favoured by its accessibility, simplicity and usability. As this means having a             tool easily accessible through any computer, straightforward enough to perform          effortless migrations and with a good user experience. On the contrary, the other forms of solutions come in standalone tools or as              Salesforce plugins. Standalone tools tend to be more complex, sometimes offering Command Line           Interface (CLI) solutions allowing their users to have more control and           customization over the migration they want to perform. And lastly, Salesforce plugins or extensions are the least common solution for data             migration tools, since while they can offer the system a greater and easier control              towards the interaction with an Org, they can be harder to develop, harder to test,               and not comfortable to interact with. In addition, Salesforce ETL tools are usually built for the purpose of operating as: 1. Developer tools Advantages –they provide a simpler and more intuitive way of          interacting with the Salesforce API. Also offering the users more control and            flexibility over the functionalities they can perform. Disadvantages – they demand a high understanding of Salesforce         and the Orgs structure. They require all the manual control of the import             and export of data plus the planning and logic behind it, in other words,              they still do not resolve the issue of complex time-consuming plannings           and manual migrations. 2. Commercial tools Advantages – they offer the bulk import and export of data and they             allow for Org backups. Disadvantages – they tend to be paid and expensive software in           which the cost is pay per use. Additionally, they do not tend to offer support               for custom objects. Having all this in mind, in the following sections I will present, and shortly describe,               a few data migration tools that I have specifically filtered and selected for having              19 proved their usefulness and effectiveness over a wide range of use cases to the              Salesforce community [10][11]. 2.1. Salesforce Data Loader (developer tool) Salesforce Data Loader is a free client application officially developed by Salesforce            for the bulk import and export of data. It is known for its speed in large import or                  export of records, supports standard and custom objects, has an easy interface,            even though not intuitive, and also allows for data updates and deletions. The negative comments of this tool usually are that it only supports CSV format,              needs to be installed locally, which can be annoying for OSX computers, the             auto-mapping does not work well, sometimes fields are missing in the UI, and it              crashes easily without any feedback of the crash. 2.2. Jitterbit Data Loader (developer tool) Jitterbit Data Loader is the most used ETL tool for performing Salesforce data             migrations and it is available in a free version, even though it has functionality              limits. Similar to Salesforce’s Data Loader, it allows the bulk of insert, update,             upsert, query and delete. The negative comments of this tool usually are that it is known to be slow and it is                  not 100% cloud-based, meaning that it requires a local client to be installed. 2.3. Dataloader.io (commercial tool) Dataloader.io is also a popular integration tool for data migrations with Salesforce,            and it is powered by MuleSoft (a Salesforce company). The positive comments            about this tool are that it is completely cloud-based, so there are no installations              required, that it allows you to save data loading jobs, that you can import and               export an unlimited amount of records and that it contains a very user-friendly UI              and UX. The negative comments of this tool usually are that it is a bit slow, it only allows the                  operations of import, export and delete, and that since its freemium, limits are set              by subscription type, in which prices scale really quickly and are measured per             month/user.    20 2.4. Summary On the following table we can see a comparison of the 3 tools: Tool Number of Records you can Import or Export Platform Compatibility* Feedback Speed* Compatible Formats Pricing Salesforce Data Loader Between 5K and 5M ★★ ✗ ★★★ CSV Free Jitterbit Data Loader Not specified ★ ✓ ★★ CSV + connection to databases Freemium Dataloader.io 10K/month (free version) ★★★ ✓ ★★ CSV + connection to databases Varies by plan *3 stars is the maximum punctuation These are currently the 3 best reviewed tools by the Salesforce community,            however none of these tools preserve the relations between records nor automate            the procedure, which is a key feature to ease the process of a migration. Similarly all these tools are highly dependent on a previous planning done by the              user, as the tool is only responsible for performing the operation requested by the              User through the Salesforce API and not for going through the entire migration             process. The consequence of this approach is that it relies on the user performing tasks              throughout the entire migration process, such as planning and organizing the           flow of the migration along with the responsibility of transforming the data and             maintaining the Orgs data quality and consistency. In contrast, what this project tool pursues is the automation of the maximum             amount of steps possible so that no technical knowledge, complex planning,           heavy thinking or tedious manual work is required to accomplish a successful data             migration. In this way the tool developed in this project will not be providing a solution for the                 problem of handling specific tasks related to data imports or exports as the             previously mentioned tools do, but its goal is putting an end to the unnecessary              time and effort required from developers to plan their specific data migration            processes. Additionally, with the purpose of creating a tool with the most benefits, a             cloud-based approach was chosen for this project. However in the meantime, as            an MVP, the tool is not required to be deployed to the cloud, but to meanwhile                work as a standalone tool. 21 Furthermore, one of the extra advantages of the tool for having been developed             with a cloud-based approach, even though not being deployed, is the ability to be              accessible through the local network. That is to say, all the users connected to the               same local network will be able to access the tool without further installations,             operating system inconveniences or compatibility issues.   22 3. Project Management This unit is responsible for presenting the initial project planning performed,           consisting of the project’s life cycle, methodology and rigor, time estimates and            gantt diagrams, risk management, resources and economic management. In addition, the unit will wrap up with a conclusions section with the purpose of               describing any experienced deviations on the initial project planning described          that took place during the project development. 3.1. Project Life Cycle Project’s Time Span Start Date Estimated End Date January 20th, 2020 June 15th, 2020  The estimated duration of this project is approximately 5 months, where 100 days             will be work days, hence, with 8 hours of work per day, the project will consist of                 800 work hours. Now, in this section I will present the 5 phases in which I have divided this project’s                 life cycle along with a description of the purpose of each phase, its tasks and their                corresponding estimated duration. The following abstract template will be used to describe the tasks involved in each              phase: T{Main Task Number} – Task Topic {Task hours}h Task dependencies T{Task Number} – Task Name hours dependencies T{Subtask Number} – Subtask Name Have a clear understanding of the context and the         problem trying to solve and document them in the         report. hours dependencies 3.1.1. Learning & Researching This phase mainly involves the tasks related to acquiring the core knowledge            associated with the project. In this way awareness of the project’s full scope will be               appreciated along with a good comprehension of the project’s technologies          implicated, its requirements and challenges. Tasks involved: T1 – Hello World Salesforce 74h None 23 T1.1 – Introduction to Salesforce Introduction to Salesforce: understand what is      Salesforce, what is a CRM and get to know its          terminology and functionalities. 4h None T1.2 – Salesforce Training Learn how Salesforce works, completing Trailhead      tutorials and playing around with the software to get         familiar with it. 30h T1.1 T1.3 – Knowing Salesforce’s Back-end Architecture Reading Salesforce official documentation and more      Trailhead tutorials in relation to how is data and         metadata managed, data modeling and its restriction       towards what it allows and forbids. 20h T1.1, T1.2 T1.4 – Salesforce API’s Research about the different ways data and metadata        can be extracted from Salesforce Orgs, identify the        differences between the APIs, their constraints and       compatibility and play around with them. 20h T1.1, T1.2, T1.3  T2 – Data Migration 26h None T2.1 – Full Scope Read and understand about the full scope of a data          migration process. 2h None T2.2 – Best Practices Investigate the standard procedure when facing data       migrations, the recommended best practices, the      possible risks and how to prevent them and how it          applies to Salesforce. 5h T1, T2.1 T2.3 – Main Challenges Identify the main challenges I will need to face in the           development of the project when dealing with data        migrations and have a good understanding of what is         achievable. 4h T2.2 T2.4 – Analysis of Approaches Read about how other developers have dealt with this         problem before, what are the different options available,        and think about possible alternative approaches. Also       analyze the best approach taking into consideration the        goal of the project and its basic requirements, the         different ways of interacting with the API and the time          and complexity involved. 15h T2.3  T3 – Proof of Concept 20h T2 Specify step by step a proposal solution methodology for the process of data migration in order to                 demonstrate and verify the feasibility of the project goal with the time available and test this                proposal manually.  T4 – Previous FDP’s 8h None 24  Figure 4 – Project Execution Gantt Diagram 3.4. Risk Management In this section I will introduce the possible risks that were initially considered as a               hazard for the expected development progress of the project. In addition, an            evaluation of how to prevent each risk will be provided together with a proposed              solution towards how to mitigate the risk given the situation in which it occurs. In this way, anticipating any of these possible risks would allow me a better control               towards the repercussions the risk can have on the development of the project. Risk How To Prevent How To Manage Encountering any problems or overlooks that would prolong the duration of the planning performed and therefore preventing me from reaching the delivery deadline with the project finished. ❖Have a robust but flexible planning and organization of the project’s life cycle phases. ❖Have good communication with members of the company to have multiple points of view and therefore reduce the probability of this risk. ❖Have a clear definition of the project goal and objectives and a realistic estimation of time for the tasks to be done. ❖Create an MVP of an MVP, and later on increase the amount of functionalities and enhancements if more time is available. There are 2 viable options: 1. Review the project’s plan and restructure accordingly. 2. Delay the presentation of the thesis to the next turn. 3. Cutback the project’s scope. 4. Become a POC instead of an MVP. Bad planning, organization, estimation of tasks or time management Take advantage of the opportunity of doing the FDP in a company so that I can receive feedback in relation to my workflow. Create a quick and abstract plan that would enable the delivery of the project on time. 31 Any relevant Salesforce errors or modifications that could affect the development of this tool either in the use of APIs, in my Salesforce environments, new constraints or any other service. Impossible to prevent, even though it should be an improbable situation because of the fact that most of their customers depend on it. Impossible to manage, given that this tool depends on external services like the ones provided by Salesforce. I will need to trust in its reliability and support. Any personal or public health issues, as the COVID-19 pandemic we are currently living. It cannot really be prevented, it is not under my control. The only thing I can do is be careful, aware of the situation, take care of my health and well-being and have a preventive attitude. Follow the corresponding procedures of the company and adapt accordingly with any planning adjustments if needed. 3.5. Resources and Economic Management Once finished establishing the project's planning, we can proceed to identify the            elements that will take part in the costs of the project and estimate them so that                we can have a proper knowledge about the budget of the project and its viability. 3.5.1. Direct Costs In this section the costs that are related to a task of the project will be described. 3.5.1.1. Human Resources Considering that real world projects would not be developed by a single person, as              in this case by me, having 4 different roles, I have decided to include in this section                 the cost estimated for this Final Degree Project (FDP) and also the costs that              would have been associated with a Real World Project (RWP). The following table presents the costs per role calculated per work hours. Role €/Hour FDP RWP Team leader 9 25 Analyst 20 Developer 16 Tester 16 Director 25 - Co-director 20 - 32 Rapporteur 20 -  Important note: in my project I’m considering no designer or design phase since it              is an MVP and what should fundamentally work is the back-end, therefore the             designer requirements are really basic and it is required from the developer to also              act as the designer. Once we have the costs per work hour we can then calculate the amount of work                hours required from each role in each phase, and therefore conclude the costs             associated with each role, as shown in the following table. Phase TL A Dev T Dir Co R L&R 13 64 51 - 20 10 - PV 16 24 - - 6 3 2 PS 19 29 - - 8 4 5 PE 102 - 256 154 40 20 20 PC 58 - 7 7 10 5 10 Total Hours 208 117 314 161 84 42 37  Then finally the next step is to multiply the cost per hour associated to each role                from the first table with the amount of hours excepted from the second table and               we get the following table, which shows the total cost estimate per role. Role Cost (€) FDP RWP Team leader 7,200 5,200 Analyst 2,340 Developer 5,024 Tester 2,576 Director 2,100 - Co-director 840 - Rapporteur 740 - 33 Total Cost 10,880 15,140  For the rest of the project I will use the total cost value of the FDP as a reference to                    the direct costs. 3.5.1.2. Software The following table represents the cost for the software used in this project. The              software that is indented from Google Chrome is to specify that the web version is               being used. Software Cost (€) Amortization (€) Google Chrome 0 / Free version 0 ➜Clickup ➜Google Drive + Gmail + Calendar + Meets ➜Office Timeline Online ➜BitBucket ➜Trailhead ➜Salesforce Slack Visual Studio Code Postman Fork Robo 3T Total  0 3.5.1.3. Hardware The following table shows the cost associated with the hardware used for this             project. Product Cost (€) Units Life Expectancy Amortization (€, in 5 months) Apple Macbook Pro 1,499 1 8 79 34 Retina 13-inch, Early 2015 Dell monitor U2415 239 1 6 17 Apple Magic Mouse 85 1 3 12 Apple Magic Keyboard 99 1 3 14 Total Costs    122 3.5.2. Indirect Costs These are the costs non-related to the project’s activity. Service Cost (€/month) Period (months) Amortization (€) Electricity 7 5 35 Water 3 5 15 Internet 30 5 150 Transport 27 5 135 Local 350 5 1,750 Total Cost   2,085 3.5.3. Contingencies Every project budget needs to have a contingency plan in order to be prepared for               any unexpected costs because of oversights or simply bad estimations. For this            thesis caution a 10% of the budget of the direct and indirect costs will be               considered as potential contingencies. Cost Type Estimated Cost (€) Percentage (%) Contingency (€) Direct Cost 11,002 10 1,101 Indirect Cost 2,085 10 209 Total Cost   1,310   35 3.5.4. Incidentals In order to be covered of any potential risks associated with additional costs, the              cost attributed on the basis of probability of its occurrence will be considered as an               estimate of incidentals costs.  Incidental Management (€) Risk (%) Cost Associated (€) Malfunction Apple Macbook Pro Retina 13-inch, Early 2015 150 15 23 Dell monitor U2415 239 10 24 Apple Magic Mouse 85 30 26 Apple Magic Keyboard 99 30 30  Total Cost   103 3.5.5. Total Budget In the following table a summary of the costs of each cost type can be seen with                 the corresponding total budget estimated for the fulfilment of this bachelor thesis. Cost Type DC IC Contingency Incidental Total Cost Cost (€) 11,002 2,085 1,310 103 14,500  In addition, as no contingencies or incidents took place during the project’s            development, the following table describes the exact project total costs: Cost Type DC IC Total Cost Cost (€) 11,002 2,085 13,087 3.5.6. Cost Control The objective of this section is to establish a mechanism that allows the control of               costs during the project and therefore compare and assess any variance between            the expected budget and the actual costs at different stages of the project. As for my case I have all the costs calculated in a spreadsheet where I can add an                  extra column for any additional non-expected costs, therefore as the project           progresses, if a new non-considered cost appears, I would have an easy way of              controlling and being aware of the actual costs of the project. 36 Anyways, there does not seem to be any additional reason for which additional             costs should appear but in case they do then hopefully the contingency cost             estimated will be enough to cover it. 3.6. Conclusions The work plan just described was already developed having in mind that several drawbacks will arise through the project development, therefore forcing modifications in the product behavior. As a result, the plan was followed successfully without having the need to apply any modifications to the initial planning thanks to the anticipation of risks. However some slight variations took place in the project sprints, particularly related to the amount of hours dedicated to each task. For instance in some sprints documentation hours were reduced in order to have more implementation hours. Nonetheless this was resolved thanks to the extra time included in the Project Execution phase that was not assigned to its tasks as a prevention measure for this kind of scenarios. Also, even though the current pandemic drastically changed my working environment from the company offices to working from home, thankfully there were no repercussions in terms of additional costs or required development resources. As a result, the following table provides an approximation of the total amount of hours dedicated to each task: Task Time (hours) Learning & Researching 130h Design & Development 60h Implementation 300h Debugging 120h Testing 80h Documentation 100h Total Hours 800h    37 4. Scope Having gone through the project context, analyzed its state of art and planning, the purpose of this unit is to have a better understanding of the scope of the project, have a good comprehension of the project’s terminology and be fully aware about the context in which this project tool belongs. This will be achieved by outlining the project objectives, providing complementary background knowledge about data migrations, and lastly describing an example scenario in which this project’s product would be of use. 4.1. General Objectives The tool developed in this project is at least expected to satisfy the following              objectives: 1. Have access to both a Salesforce Source and Target Org simultaneously. 2. Be compatible with most standard and custom Salesforce objects and          fields. 3. Preserve the proper relations between the migrated data. 4. Determine the compatibility of the specified data migration. 5. Successfully automate the process of a specific data migration taking into           account the order of insertion of records. 6. Give feedback from any errors that might occur.  On another note, as the tool is not yet expected to include any user or session                management, for the time being, it is not an objective for the tool to be deployed,                but is expected to remain working locally. 4.2. Complementary Background Knowledge In this section I will describe some more context and must know considerations             about the topic of data migrations that is involved in this project so that the reader                is able to fully understand and correctly follow this project’s requirements. So with all the previous concepts about Salesforce in mind, I will begin by stating               that from the 2 types of restrictions, internal and external metadata, it is only viable               for this tool (and I would say any tool), to consider the objects internal metadata, in                this way delegating the task to the control of the objects external metadata to the               Target Org itself. As a reminder, this decision is mostly because of the fact that the objects external               metadata was not built to be controlled externally from a system that is not a               Salesforce Org. 38 Accordingly, it is important to have in mind that the tool is not expected to work                for every single case even if the migration is considered feasible, as the tool will               only recognize the objects internal metadata. Therefore there are scenarios where the data migration will fail because of an             external metadata restriction. For this reason the tool intends to provide feedback            to the user through descriptive and informational error messages, so the user can             manually relax the restriction that caused the data migration to fail and therefore             successfully achieve the data migration. In addition, this tool will only incorporate one type of partial data migration,             concretely, what I call a parent related objects migration. This type of migration             was chosen for the fact that it is the fundamental migration required in order to               tackle relationships between objects, and most importantly the parent objects,          which are the most significant as a means to a feasible migration. Explaining this concept more in depth, a parent related objects migration is a             migration in which given one or multiple records, all the given records will be              migrated, including its relations, plus all the relations related records, and all the             relations of relations related records, and so on recursively. For a better comprehension of the parent related objects migration I will now             provide a more detailed explanation supported by an example. In a nutshell, the record relations are fundamentally the record dependencies of a             migration. Correspondingly, these dependencies can either be required or         optional. Therefore given a record B with a required relationship to a record A, in               migration terms, this is understood as that record A is a required dependency for              record B. In other words, in order for record B to exist in the Org, then record A                  needs to exist first. Let’s continue with a graphic illustration. Figure 5 below, nicely illustrates the data structure of a Tree, where for example              purposes, let’s say that each node represents the different objects of an Org, and              that each arrow represents the required dependencies (or relationships) that exist           between objects. In such representation, the Tree below, is essentially portraying           the dependencies of the Orgs database schema. 39  Figure 5 – Terminology of the Tree Data Structure Continuing with the example, as a Tree that Figure 5 represents, the terminology             used to interpret its content is as done with a family tree. To begin with, it is read                  from top to bottom, hence, object (node) A, is the parent object (node) of objects B                and C, or put differently, objects B and C have a parent required relationship with               object A. As stated earlier, this indicates that in order for a record of the objects B                 or C to exist in an Org, there first needs to exist a record of object A so that the                    records of objects B or C can be related with. Followingly, in terms of a parent related objects migration, given records of object             D, then the migration will involve all the object related records of the given records               of object D in a parent level, ergo the related record belonging to objects D, B and                 A. Moreover, wording it as Graph Theory nomenclature, the objects involved in the             migration will be all the object’s ancestors. Also as you may imagine, this is just a simplistic example with the purpose of               understanding the concepts encompassed between object relationships that        make up a parent related objects migration. In real Orgs though, object dependencies can be far more sophisticated than in             the example provided, as circular required relationships can be created, resulting           in impossible migrations, also required relationships between siblings can occur or           even objects that belong to a different subtree, as it would be in Figure 5 in the                 case object F had a relationship with object J. As a result the representation of the Orgs database schema dependencies cannot            be done through the data structure of a Tree, bu the tool actually makes use of                DAGs, Directed Acyclic Graphs ••• 40 error occurs so that it can adjust any configuration,         when possible, with the intention of making the        migration feasible. Acceptance Criteria Whenever an error occurs the user should be        presented with a descriptive error that points to        where or why the error has occurred.  Usability # 3 Description This tool should be intuitive and easy to use with a           click not code approach. Justification/Motivation The user should not feel confident and comfortable        when using this tool, hence, the system should        provide the user a smooth way to interact with the          tool that does not require a lot of thinking so that           tasks can be easily achieved. Acceptance Criteria Given several tasks, users from different backgrounds       that are familiar with Salesforce Orgs should be        capable of successfully performing the provided      tasks intuitively.   47 6. Specification With a clear scope and requirement analysis that have displayed the demands the             software should fulfill to please the end user needs, I can now proceed to depict a                more technical description of the tasks that need to be carried out by the system               to accomplish the previously specified use cases. Accordingly, the following sections of this unit will integrate the specification of            each of the functional requirements use cases. One of the artifacts that will be used in these specifications are use case diagrams,               which depict through a graphical approach the series of actions the system allows             external actors to perform in order to carry out the tasks that activity involves. In addition a table with the following template will be employed to provide a              detailed description of the use case in hand: Use Case #Code: Name Primary Actor Actor Name Preconditions - Precondition 1 - ... - Precondition N Trigger Trigger description Primary Use Case 1. Step 1 2. … 3. Step N Extension: Extension Name 1. Step 1 2. … 3. Step N  6.FR1. Org Auth Management   48  Use Case #1: Sign Up Org Primary Actor User Preconditions - The Org has not been registered yet Trigger The user clicks on the “Sing Up Org” button Primary Use Case 1. The user is on the home page. 2. The user clicks the “Sign Up Org" button. 3. The user selects the Org Type of the new Org it wants to register. 4. The system asks Salesforce for an OAuth 2.0 logIn URL and redirects the user to               that URL. 5. The user enters and submits their Salesforce credentials. 6. The user allows access to the system’s Connected App. 7. Salesforce communicates to the system a code to request the access token,            redirecting the user to a loading page while the system registers the new Org. 8. The system requests the access token and requests Salesforce other          complementary information to register the new Org. 9. The system redirects the user to the home page. Extension: Failed Authentication 1. The user is on the home page. 2. The user clicks the “Sign Up Org" button. 3. The user selects the Org Type of the new Org it wants to register. 4. The system asks Salesforce for an OAuth 2.0 logIn URL and redirects the user to               that URL. 5. The user enters and submits wrong Salesforce credentials or enters the correct            credentials but denies access to the system’s Connected App. 6. Salesforce returns the system an error. 7. The system redirects the user to the home page with an error message.  Use Case #2: Auth Life Validity Primary Actor Salesforce Preconditions - The Org is registered in the system Trigger The system needs to perform a functionality that requires making a           request to Salesforce with the specified Org’s credentials Primary Use Case 1. The system makes a request to Salesforce. 2. Salesforce returns an error regarding the access token being expired. 3. The system requests Salesforce a new access token. 4. Salesforce returns a new access token. 5. The system stores this new access token and retries the query. 6. Salesforce returns the expected response. 7. The system continues with the task. Extension: Failed Refresh Token 1. The system makes a request to Salesforce. 49 2. Salesforce returns an error regarding the access token being expired. 3. The system requests Salesforce a new access token. 4. Salesforce returns an error. 5. The system returns an error to the user.  6.FR2. Metadata Management    Use Case #3: Basic Metadata Extraction Primary Actor User Preconditions - There needs to be at least 2 Orgs registered in the system Trigger The user starts a migration or the user clicks on the refresh metadata             button Primary Use Case 1. The user is on the parent related objects migration page. 2. The user clicks on any of the select components or clicks on the refresh metadata               button. 3. The system makes a request to Salesforce. 4. Salesforce returns all the Orgs objects basic metadata. 5. The system stores the necessary data.  Use Case #4: Parent Related Objects Identification Primary Actor User Preconditions - There needs to be at least 2 Orgs registered in the system Trigger The user has selected to perform a parent related objects migration Primary Use Case 1. The user is redirected to the parent related objects migration page. 2. The user selects the main object for the Source Org and its corresponding Target              Org equivalent object. 3. The user clicks the “Continue” button. 4. The system identifies the parent related objects for the selected Source main            object and the Target main object. 50 6.FR3. Orgs Mapping Management    Use Case #5: Object Mapping Primary Actor User Preconditions - There needs to be at least 2 Orgs registered in the system - The system has identified the parent related objects of the          Source and Target Orgs main objects Trigger The user has clicked the “Continue” button of the main objects selection            step of the parent related objects migration page Primary Use Case 1. The user is on the Orgs Mapping step of the parent related objects migration              page. 2. The user is looking at the Object Mapping nested page. 3. The user correctly manually maps the objects and its corresponding fields. 4. The user clicks on the “Continue” button.  Use Case #6: Field Mapping Primary Actor User Preconditions - There needs to be at least 2 Orgs registered in the system - The system has identified the parent related objects of the          Source and Target Orgs main objects - The user has performed the object mapping of the object to           field-map Trigger The user clicks on the “Field-Map” button of an object Primary Use Case 1. The user is on the Orgs Mapping step of the parent related objects migration              page. 2. The user is looking at the Field Mapping nested page. 3. The user correctly manually maps the fields and returns to the object mapping             page. 4. The user clicks on the back to object mapping button. 51  Use Case #7: Compatible Mapping Selection Primary Actor User Preconditions - There needs to be at least 2 Orgs registered in the system - The system has identified the parent related objects of the          Source and Target Orgs main objects - The user has performed the object mapping of the object to           field-map Trigger The user clicks on the “Field-Map” button of an object Primary Use Case 1. The user is on the Orgs Mapping step of the parent related objects migration              page. 2. The user is looking at the Field Mapping nested page. 3. The user clicks on the select component. 4. The user can only see and select the compatible fields that have no’t already been               selected.  Use Case #8: Smart Relevant Object Selection Primary Actor User Preconditions - There needs to be at least 2 Orgs registered in the system - The system has identified the parent related objects of the          Source and Target Orgs main objects Trigger The user clicks on the relevant checkbox of an object Primary Use Case 1. The user is on the Orgs Mapping step of the parent related objects migration              page. 2. The user is looking at the Object Mapping nested page. 3. The user clicks on the relevant checkbox of an object. 4. The required relevant objects are re-evaluated.  Use Case #9: Object Auto-mapping Primary Actor User Preconditions - There needs to be at least 2 Orgs registered in the system - The system has identified the parent related objects of the          Source and Target Orgs main objects Trigger The user has clicked the “Continue” button of the main objects selection            step of the parent related objects migration page Primary Use Case 1. The user is on the Orgs Mapping step of the parent related objects migration              page. 2. The user is looking at the Object Mapping nested page. 3. All the Source objects with a match have been automatically mapped. 52  Use Case #10: Field Auto-mapping Primary Actor User Preconditions - There needs to be at least 2 Orgs registered in the system - The system has identified the parent related objects of the          Source and Target Orgs main objects - The user has performed the object mapping of the object to           field-map Trigger The user clicks on the “Field-map” button of an object Primary Use Case 1. The user is on the Orgs Mapping step of the parent related objects migration              page. 2. The user is looking at the Field Mapping nested page. 3. All the Source objects fields with a match have been automatically mapped. Extension: Auto-Map all fields 1. The user is on the Orgs Mapping step of the parent related objects migration              page. 2. The user is looking at the Object Mapping nested page. 3. The user clicks the “Auto-map all” button. 4. All fields of the relevant mapped objects with a match have been automatically             mapped.  6.FR4. Migration Records Input   Use Case #11: Source Main Object Salesforce IDs Primary Actor User Preconditions - There needs to be at least 2 Orgs registered in the system - The system has identified the parent related objects of the          Source and Target Orgs main objects - The user has performed the orgs mapping Trigger The user clicks on the “Continue” button of the Orgs Mapping step. Primary Use Case 1. The user is on the Salesforce IDs step of the parent related objects migration              page. 2. The user enters the Source main object’s Salesforce ID’s. 53  6.FR5. Migration Automation This specific functional requirement is distinct to the previous use cases. There is             only one use case, but this use case is made of a process flow. Considering this, the                 use case diagram of this functional requirement will encapsulate a BPM following            the BPMN standard.   Use Case #12: Migration Automation Primary Actor User Preconditions - There needs to be at least 2 Orgs registered in the system - The system has identified the parent related objects of the          Source and Target Orgs main objects - The user has performed the object mapping of the object to           field-map - The user has entered at least one valid Salesforce ID of the            Source main object Trigger The user clicks on the “Begin migration” button of the Salesforce IDs            step Primary Use Case 1. The system creates a new migration and stores all the data related to the steps               previously done of the migration (the orgs mapping and the salesforce IDs). 2. The process flow begins: a. Parent Related Data Extraction: The system extracts from the Salesforce          Source Org the data of each of the given salesforce IDs and all their parent               related records of the objects specified as relevant in the Orgs Mapping            and stores them in the database. b. Verify Migrations Viability: The system verifies that all extracted records          54 can be migrated, handles any non-supported objects and confirms if there           are any circular dependencies between the records relationships. c. Determine Order of Insertion: The system analyzes the required         dependencies between the records fields with relationships and        determines a valid order of insertion by levels*. *A level represents all the objects that are at the same level of dependencies,              meaning that they are dependent from the objects with levels above them, and             the objects with levels below them are dependent on them d. Import Data: The system first imports to the Salesforce Target Org the           required and non-related fields of each record by levels of the order of             insertion and once all records have been created it updates all their            optional related fields. Extension: Import Data Failed 1. The system performs a roll back of all the inserted records. If for some reason it                also fails to conduct roll back then return the inserted records IDs.  6.2. Conceptual Model A conceptual model is a representation of a system's substantial concepts of a             system. Its objective is to help people understand the domain represented           through the use of entities, relations between the entities and the integrity rules of              the model as a whole. Figure 6 illustrates the schema of the conceptual model of this project, where the              following entities appear: ❖User – represents a user present in a Salesforce Org. ❖Org – represents a Salesforce Org. ❖Object – represents an object of a Salesforce Org. ❖Field – represents the fields of an object. ❖Object Mapping – represents the object mapping performed between 2         objects of 2 different Orgs. ❖Field Mapping – represents the field mapping performed between 2 fields          of 2 different objects of 2 different Orgs. ❖Orgs Mapping – represents a collection of object mappings of 2 different           Orgs. ❖Record – represents a record extracted or imported, from or to a Salesforce             Org object. ❖Migration – represents a migration between 2 Orgs. 55  Figure 6 – Conceptual Schema Additionally there are 2 Data Types: ❖RecordType – represents the particular Salesforce standard object Record         Type. It is necessary to explicitly have this Salesforce object as an entity because of              its special behavior in an Org. ❖Data – represents the data of different Salesforce object records. It is abstract because its attributes depend on the fields of the given             Salesforce object, therefore it is impossible to determine a particular          structure. 6.2.1. Integrity Rules Lastly the integrity rules are the conditions the conceptual model must satisfy for the purpose of guaranteeing the consistency of the system. The following list covers the most relevant integrity rules of the conceptual model: 1. Identifiers: a. User(userID) b. Org(organizationID) c. Object(name, org.organizationID) d. Record(oldID, newID) 2. In an Object Mapping, the sourceObject and targetObject cannot be the           same object. 3. In an Orgs Mapping, all the Object Mappings should belong to the same 2              Orgs, being the Source Target Orgs. 56 7.2.1.3. Parent Objects Migration Page This page is the primary page where the user will perform all the steps necessary               to conduct a parent related objects migration. That is where a series of mandatory              manual steps need to be carried out by the user in order to provide the system                with the information necessary for the automation of the migration. Therefore this page is represented by a stepper by which the user will need to               progress by completing the prompted tasks of each step. In this way this page is designed by nested views for each step, which are actually                represented by components. 7.2.1.3.1. Main Object Selection Step The Main Object Selection is the first step of the Parent Objects Migration page,              hence, as figure 11 illustrated, this is the step with which the user first visualizes the                Parent Objects Migration page. The task to be performed here is really simple, the user only needs to select which                is the main object of the Source Org from which it wants to extract the records and                 the equivalent or matching object of the Target Org to which it wants to import               the records. If the object does not appear then the user can click on the reload button to the                 right in order to update the corresponding Orgs objects metadata in the system’s             database. Once the user has provided the previous information then it will be allowed to              continue to the next step.  Figure 11 – Parent Objects Migration Page: Main Object Selection step 63 7.2.1.3.2. Orgs Mapping Step The next step is the Orgs Mapping, where the user will need to perform the object                mapping and the field mapping of all the objects it wants to have involved in the                migration. Figure 12 shows the object mapping, in which the user can map the Source objects               with their equivalent Target objects, select which objects it wants to be part of the               migration, see the relationships dependency graph between objects and perform          the field mapping.  Figure 12 – Parent Objects Migration Page: Orgs Mapping step: Object Mapping In the objects mapping nested view the user can actually perform the objects field              mapping in 2 different ways. The first approach is by clicking the “Auto-Map All”              button, which will automatically perform the field mapping of all the selected and             mapped objects. However since this auto-mapping is not guaranteed to be           accurate the user can always edit it manually. That is the second approach, in which by clicking an object's “Field-Map” button             the field mapping nested view will replace the object mapping nested view, as             Figure 13 shows. 64 Here, similar to the object mapping, the user will be able to manually map              theSource object fields with their equivalent Target object fields and select which            are the fields it wants to take part in the migration. Whenever the user desires to return to the object mapping, he only needs to click               the “< Object Mapping” button.  Figure 13 – Parent Objects Migration Page: Orgs Mapping step: Field Mapping If at any moment the user wants to navigate to the previous step it will only need                 to click the “Back” button. 65 Alternatively, once the user has completed the Orgs Mapping it will then be             allowed to click the “Continue” button and proceed to the final step. 7.2.1.3.1. Salesforce IDs Step This last step is where the user is prompted to input all the Source Org record                Salesforce IDs intended to be migrated, of course, together with all its parent             related object records. In figure 14 a representation of this nested view can be seen.  Figure 14 – Parent Objects Migration Page: Salesforce IDs step Accordingly, once the user has entered at least one record Salesforce ID it will be               allowed to click the “Begin Migration” button and as a result the automation of the               migration will start. As a means to provide the user with responsive feedback the dialog illustrated in              Figure 15 will appear indicating the automated tasks performed by the system.  Figure 15 – Migration Automation Dialog with Responsive Feedback 66  7.2.2. Site Map Navigation Having explained the role of each view, here, the complete site map navigation of              the site will be displayed. This can be seen in the Figure 16 below, where all the views appear as elements,                the arrows indicate the navigation between views and the dotted rectangles           represent nested views. Besides, a mix of the BPMN standard notation was used to indicate which is the               first view presented when a particular nested view is shown.  Figure 16 – Migration Automation Dialog with Responsive Feedback 7.2.3. Internal Design From what I have presented in the previous sections, we can note that the              front-end is composed of 3 routes, however these routes involve many nested            views, therefore demanding a high level of state management. In this section I will present the internal design of the front-end previously             described and thus have a better understanding of the structure in place to             facilitate the state management. The most important technique for a good state management system is breaking            down the front-end into small components. In this way, each component is            responsible for managing its own data, state and implementation. 67 Besides another advantage separating the front-end in components is that in this            manner components can be reusable in many parts of the site without dealing             with repeated code. Figure 17 shows the different modules used in the client side. It consists of all the                components that make up the front-end and the utils, which assist the            components to complete certain tasks.  Figure 17 – Front-End Modules Through this approach the application is organized into nested components,          where each component is accountable for its behavior and it can communicate            with other components, ergo, delegating tasks and making it easier to maintain            the state. Besides the use of the store pattern [14] is used to to easily manage difficult               changes in state between components. For a better comprehension of this issue the reader can refer to the sequence              diagram of figure 18 where an example of how this technique is applied. 68  Figure 18 – Front-End Modules As it can be seen, the work performed by the ParentObjectsMigration.vue           component is distributed through the use of other components, enabling the           delegation of responsibilities. 7.3. Back-end Opposite to the front-end, the back-end is the side of the application responsible             for storing, managing and providing data required by the front-end to satisfy the             users needs. In the case of the software involved, the back-end is composed of a server and a                database. The server acts as the communication channel with the front-end side            and the database as a service in which to persist any necessary data. Consequently in the following sections I will introduce the REST API developed in             the server along with its internal design, and then continue with the database             conceptual schema. 69 7.3.1. REST API Here I will present the different endpoints the server has active for interaction with              the client side of the application. Accordingly their method and a description of             their role will be available. Besides, the endpoints are organized into 4 groups: 7.3.1.1. Authentication Endpoints GET /salesforce/oAuth2 Request Salesforce for an OAuth logIn URL and returns it.  GET /salesforce/token Request Salesforce an access token, then requests some additional information          related to the Org and stores it in the database.  7.3.1.2. Org Management Endpoints GET /orgs Returns the basic information about all the Orgs present in the database.  GET /orgs/{orgID}/objects If the query reload is true or the objects are not present in the database then it                 requests Salesforce for all the Orgs {orgID}. It returns all the retrievable objects present in the Org {orgID}.  7.3.1.3. Orgs Mapping Endpoints GET /orgsMapping/parentRelatedObjects/{sourceObjectID}/{targetObjectID} Responds with all the object mappings information necessary in order to begin            the Orgs Mapping*. For the sourceObjectID object returns all the parent related objects that are            retrievable from the Org and for the targetObjectID object returns all the parent             related objects that satisfy the restrictions necessary to be correctly migrateable. Additionally, it returns the dependency graph of the target parent related           objects. *If the object's fields are already stored in the database then it operates with them, otherwise it                 requests them to Salesforce.  GET /orgsMapping/fieldMapping/{sourceObjectID}/{targetObjectID} 70 Responds with all the objects field mapping information necessary in order to            continue with the Orgs Mapping. For the sourceObjectID object returns all the            fields that are retrievable from the Org and for the targetObjectID object returns             all the fields that satisfy the restrictions necessary to be correctly migrateable.  7.3.1.4. Data Migration Endpoints  POST /migration Creates a migration with the requested type and returns the created migration’s            ID.  POST /migration/{migrationID}/orgs-mapping Stores the Orgs Mapping provided in the migrationID migration.  GET /migration/{migrationID}/exportData Requests Salesforce all the necessary data from the Source Org of the            migrationID migration and it stores it in the database.  GET /migration/{migrationID}/importData The system makes any transformations necessary to prepare the data for the            import and before beginning the import procedure, performs a verification          check with the Target Orgs internal metadata to determine the compatibility of            the migration. This includes determining if a compatible order of insertion exists. And lastly, it begins the process of importing data to the Target Org, which if fails                it performs a rollback of the inserted data.  7.3.2. Internal Design In the server is where all the complex logic of the application resides, since it is                responsible for the main purpose of the tool, the automation of the migration. For this reason the project structure was carried out through a modular approach,             as a means to maintain the code organized so that it is easier to manage and                therefore to debug, test and build new functionalities. In this way, the system will also respect the single responsibility principle, by which              every module will only have a single responsibility over a particular functionality of             the system. As a result, the back-ends project structure is separated into 8 different entities, as              it figure 19 illustrates: 71 ❖Routes – they are in charge of managing the application available routes            and assigning them the proper behavior. ❖Controllers – they control the request and response information related to a            certain route and manage the logic and error control necessary to ensure            the application’s expected behavior. ❖Services – they implement all the complex code and therefore do the work             related to specific tasks of a topic. ❖API Requests – they are services but exclusively responsible for handling the            interaction with Salesforce API. ❖Models – they handle and represent the information of the database as            objects by providing getters, queries, setters and instance methods. ❖Helpers – they help the services to smoothly manage complex inner logic. ❖Utils – similarly to helpers, they assist other entities with necessary or useful             resources for achieving the intended result.  Figure 19 – Back-End Modules This project organization was also inspired by a lot of research of development best              practices together with advice from experienced developers to find a solid           project’s architecture that has proven to be useful and follow good patterns for             avoiding duplication of code, improve stability and potentially, help scale the           system services [15]. 72  Figure 21 – System Technology Stack Nextly the libraries used in this project will be presented. 8.1.1. Front-End Libraries For a cloud-based approach the chosen technologies were quite straightforward: Quasar – being a VueJS based framework, Quasar was perfect for this project since              it allowed me to quickly create this tool’s sites by using their built in components               and plugins, giving me the opportunity of almost effortlessly providing the user            with a comfortable look & feel of a desktop application on the web. Axios – is a popular promise based HTTP client for the browser and node.js, just               perfect for this project allowing to use the same library for the front-end and              back-end. Additionally, it is easy to use and comes with amazing features such as              automatic transformation to JSON data, enhanced error handling, interceptors         and the opportunity of monitoring requests progress. Viz.js – a library that allows me to effortlessly incorporate Graphviz diagrams on the              browser. Vue-router – is the official router for VueJS, giving me the opportunity of efficiently              managing the front-end routes and navigation. 8.1.2. Back-End Libraries Express – the most known web application framework for making REST APIs with             NodeJS. Axios – HTTP client selected for the same reasons explained in the front-end             technologies section. 79 Bottlejs – as the project incorporates dependency injection, this library is a tiny and              powerful dependency injection container that helps handle and organize correctly          the dependencies between the project’s modules. Cors – middleware library for Express that eases the process of enabling            Cross-Origin Resource Sharing, CORS. Dotenv – library that assists with locally controlling the configuration of an            application that is separate from the code, as for instance, environment variables. Mongoose – is an Object Data Modeling, ODM, library for MongoDB and Node.js.             Its main purpose is to ease the work with pure data from NoSQL documents by               making it look like you are working with objects. In addition it makes managing              relationships between data much easier and provides schema validation. Mocha – most popular NodeJS test framework compatible with asynchronous          testing. Most commonly used with Chai. Chai – most popular NodeJS assertion library for testing. Chai-as-promised – plugin for Chai with a fluent language for asserting JavaScript            Promises. 8.2. Primary Implementation Procedures The purpose of this section is to describe in more detail the techniques employed in the implementation for some of the tool’s main functionalities. 8.2.1. The Graph module As stated in previous units, the software developed in this project is using the DAG               data structure to deal with the problem of cycles formed by required            dependencies between records. As a result, the Graph module was created together with the NodeProperties            module it utilizes for handling each of the nodes dependencies information. The algorithms implemented in Graph.js to solve this problem are inspired on the             Topological Sort algorithm [17], which consists of linearly ordering the DAGs           vertices (or nodes) such that for every edge from a vertex “A” to a vertex “B”                (meaning that “A” is referenced by “B”, or in other words, “B” is dependent on “A”),                then the vertex “A” comes before the vertex “B” in the ordering. In spite of that, it can happen that a particular graph can have multiple different               topological sort orderings. Therefore as a means to meeting the project’s           non-functional requirement of efficiency, a topological sort algorithm that best fits           the order of insertion of records for optimizing Salesforce requests was           implemented. 80 This resulting topological sort algorithm is classified by dependency levels. That is,            every level is composed of all the nodes that depend on at least one node of the                 previous levels and none of the following levels. Figure 22 nicely illustrates this             concept.   Figure 22 – Topological Sort Solutions With this in place, the Graph module has a vital dutty on identifying if a migration                is feasible, which is carried out by looking at the relationships between records. In              addition the graph module contains other algorithms that demand working with           parent related nodes or anything related to graph theory terminology. As a consequence, the Graph module is not only used for determining the order of               insertion, but for instance, is also present in other sections of the code, as in the                extraction of data from the Source Org, since it easies the management of working              with parent records. 8.2.2. Optimization of Salesforce Requests As a means of satisfying the non-functional requirement of efficiency in which a             productive use of resources is requested the implementation of multiple tasks           were carried out in particular manners. 8.2.2.1. Salesforce Requests for Metadata All requests related to an Orgs metadata are only performed when necessary, that             is to say, if the metadata information does not exist in the database then the               system will request the metadata and save it in the database. However if the metadata already exists in the database the default behavior of the              system is using the stored metadata unless it is explicitly prompted to make a              request to Salesforce. 8.2.2.2. Import, Update and Deletion of Migration Records For the purpose of successfully populating the Target Org with data, or conversely             performing a rollback, in the most efficient way possible, not only the migration is              analyzed to verify its feasibility, but also all the Salesforce requests involved are             81 carried out through a particular approach with the goal of minimizing the number             of API Requests. That is because for instance, when inserting multiple records different approaches           can be carried out. The most basic approach would be to perform a request per               each record. However this is not a good approach if the Salesforce API provides              better ways of handling this kind of situation [18]. As a consequence, with the objective of implementing the most efficient approach            possible for the import of data to the Target Org, the system structures and              organizes requests to make use of Salesforce Composite Resources [19], with which            the system can combine multiple Salesforce API resources into a single request. The technique employed is wrapping SObject Collection [20] requests into          Composite requests [21]. SObject Collections allows you to execute actions on multiple records in one            request. In the best case scenario this implies being able to accomplish 200             operations in 1 request. On the contrary, as a result of restrictions in the request, in                the worst case scenario 10 operations can be executed with the cost of 1 request. On the other hand, Composite requests allow you to execute a maximum of 25              requests in a single request, by which the entire request will count as a single call                towards the API limits, which is exactly what I’m looking for. This implies that combining both resources and making a composite request           made up of SObject Collection requests, considering the mean of the best and             worst case scenarios of each resource, (200+10)/2 x (25 + 1)/2) = 1365 operations can               be performed as a single request. Which is 1365 times better than 1 operation for a                single request. For this reason this approach was selected for the system’s implementation,           regardless of the additional complexity it adds to the management and creation of             the requests. Accordingly to smooth the handling of these types of requests, the             composite helper modules were created. 8.3. System Limitations In this project there was not a requirement related to the minimum amount of records a migration should support, however the implementation was carried out to uphold the maximum amount of records possible. As a result the system limitations were not tested, however because of the system’s implementation, the theoretical limitations of the amount of records involved in a migration is equivalent to the Target Org storage capacity and API requests limits.  82 9. Validation Testing In this unit I will outline the tests conducted during the development of this              project with the intention of evaluating and finding out whether the developed            software meets the specified requirements described in the scope unit or not. But before getting into that I would like to mention that testing the software was               in fact one of the most difficult tasks of the project, particularly in terms of               automated testing. The reason for this is that all the system functionalities highly             rely either on the data stored in the database or on the data to be requested from                 Salesforce. Accordingly, one might think that the easy solution is to use stub objects that can               simulate the behavior for both the database and Salesforce requests. Nevertheless           this is not an easy approach either, as the challenge of the problem is more closely                related to the creation of good samples of fake data for the sake of taking into                consideration a diversity of test cases and simulating scenarios that truly replicates            real life data migration samples. The difficulty of this task is given not only by the planning and organization              necessary to generate false useful and consistent data, but also maintaining the            data quality in the database, as there are many relationships between records and             it is critical that they are well preserved so that the system can function as               intended. With the intention of making this point clear, I will now provide an example of why                it would be highly inefficient and tremendously time-consuming to attempt to           simulate a test scenario. Given the case I wanted to create an integration test for verifying if a migration is                compatible, for starters I should begin by manually creating false records that            represent the Source and Target Org in the Org model. Then I would need to think                about all their corresponding objects and fields for both the Source and Target             Org, along with their metadata. Consequently I would need to have an already manually performed Orgs Mapping            of the Source and Target Orgs given a main object. And lastly create a whole set of                 false records matching the established Source and Target Orgs objects and fields            metadata so that the migration can take place. This approach demands a lot of work and effort for something that could easily be               replaced by system tests through the creation of a testing environment. Now the             only inconvenience is that no automation of these test cases would exist.            Nonetheless it definitely sounds a much better time efficient and more realistic            approach, so it is what I decided to go with. 83 Ironically, the problem this software embodies for creating automated tests is           somehow similar to the problem it resolves. 9.1. Testing Environment In order to create a proper testing environment I had 2 main tasks, setting up 2                Salesforce Orgs, for the purpose of using one as a Source Org and the other as a                 Target Org, and then a database for testing only with which to execute the system               tests and the integration tests. The first step was to plan which tests I would like to execute so that I could set up                   the Orgs with compatible metadata and data to create the system tests. As a              consequence I created a list of system tests to perform through a white box              testing strategy, in which I take into account real scenarios of the end user along               with the systems internal behavior and its potentially conflictive steps as a means             to ensure that the desired behavior is achieved. Once this was done I began building the Salesforce testing environment by            creating the 2 Orgs and producing similar objects schemas for each Org. And then              populate the Source Org with the records to be used during the tests along with               some records in the Target Org just for replicating behavior of unique fields and              real scenarios. Counting with this setup I was then ready to conduct the system tests, which will               be presented in the following sections. 9.2. Functional Requirements Tests Having in mind the previous section in which it was explained why testing this tool               is a sophisticated task, when possible unit and integration tests were built,            however, most of the tests are carried out as system tests. 9.2.1. Automated Tests All the tests of this section belong to the back-end, as the front-end tests are               performed manually as system tests through a black box testing approach, that is             not taking into account any inner code implementation logic, and in consequence            investigating the system's behavior by attempting edge cases, or alternatively, just           simulating how the end user would interact with the system. The reason for this testing strategy being applied to the front-end is because             front-end tests are mostly graphical, due to that not only the state should be              guaranteed, but it is most crucial that the reactivity system that keeps the views              updated on data modifications is working correctly. Also as in the back-end is where all the complex application code resides,             automated tests were only performed for this end of the tool. 84 9.2.1.1. Unit Tests Unit testing is a strategy by which individual units of the application code are              tested with the purpose of validating each unit performed as expected. The following table shows the number of unit test that performed per functional             requirement: Functional Requirement Number of Unit Tests Org Auth Management 3 Metadata Management 5 Org Mapping Management 12 Migrations Records Input 4 Migration Automation 33  9.2.1.2. Integration Tests Integration tests are a technique by which individual units are combined and            tested as a group with the intention of revealing errors in the interaction between              the integrated units. And as a consequence of the difficulties previously explained, integration tests           were only carried for the database models, as a way to ensure that they handle               database operations satisfactorily. The following table shows the number of integration tests performed per Model: Model Number of Integration Tests Org 15 Object 2 Object Mapping 4 Migration 8 Record 6  85 9.2.2. Manual System Tests In this project the manual tests are the most relevant type of tests that can be conducted. This is for the previously explained reason by which integration tests are not easy to create and sometimes not even possible. For this purpose, all the manual tests are carried out as system tests, in which the software is tested as a whole. In this way, system tests will serve the purpose of manually testing the integration between the system, the database and Salesforce. The following set of tables describe the system tests performed per Use Case:  Use Case #1: Sign Up Org Scenario Success Observations The user registers a new Org ✓ The system registers the Org correctly The user registers an existing Org ✓ The system updates the existing Org record information  Use Case #2: Auth Life Validity Scenario Success Observations The access token expires so the system automatically requests a new one ✓ The system registers the new token information correctly  Use Case #3: Basic Metadata Extraction Scenario Success Observations The user is going to select the main object of the migration and the Orgs objects have not been loaded yet ✓ The system requests Salesforce the Orgs objects and stores them correctly The user is going to select the main object of the migration and the Orgs objects have already been loaded ✓ The system just returns the Orgs objects 86 The user reloads the Org objects to update their metadata ✓ The system requests Salesforce the Orgs objects and replaces them the existing ones  Use Case #4: Parent Related Objects Identification Scenario Success Observations The user proceeds to the Orgs Mapping step having selected simple main objects ✓ The system correctly retrieves the parent related objects of the Source and Target Org The user proceeds to the Orgs Mapping step having selected a target Org main object that does not satisfy the conditions to be migrateable ✓ The system returns an error message  Use Case #5: Object Mapping Scenario Success Observations The user correctly performs an object mapping ✓ The system correctly stores the object mapping and when selecting the user is only presented with the remaining objects The user is performing an object mapping but it is missing or has wrongly performed some mappings ✓ The system correctly maintains the state and is updated in the view  Use Case #6: Field Mapping Scenario Success Observations The user correctly performs an objects field mapping ✓ The system correctly stores the objects field mapping and when selecting the user is only 87 presented with the compatible and remaining object fields The user is performing an objects field mapping but it is missing or has wrongly performed some mappings ✓ The system correctly maintains the state and is updated in the view  Use Case #7: Compatible Mapping Selection Scenario Success Observations The user is performing an objects field mapping ✓ When selecting to map an objects field, the user is only presented with the remaining and compatible objects fields  Use Case #8: Smart Relevant Objects Selection Scenario Success Observations The user is performing the object mapping and selects an object as relevant ✓ The system correctly updates the relevant objects The user is performing the object mapping and deselects an object as relevant ✓ The system correctly updates the relevant objects The user is performing the object mapping and selects all objects as relevant ✓ The system correctly updates the relevant objects The user is performing the object mapping and deselects all the possible objects as relevant ✓ The system correctly updates the relevant objects  Use Case #9: Object Auto-Mapping Scenario Success Observations 88 constantly attempting to perform incompatible data migrations, which means         doing un-useful work and consuming un-productive energy. Having this in mind what I consider the core of the resources consumed are based               on the amount of mistakes made during the process of a data migration, meaning              that if a person is trying to perform incompatible data migrations or the tool that               performs the data migration does not have a good implemented behavior for error             control then the amount of resources will definitely have a negative impact. I cannot specify how currently other tools manage this problem, or even if they try               managing it since it would demand really specific knowledge about its internal            implementation. What I can try is to build a better tool with the most favourable environmental               behaviors towards encountered errors in data migrations. For example, a key           concept in a data migration is the speed, as a consequence, this promotes the              parallelization of tasks, hence at the same time it would mean doing a lot of               unnecessary work when an error occurs during one of the parallelized processes. Still one could argue that the consumption of energy that this tool might use is               quite small in comparison to other procedures that take large amounts of energy,             therefore, worrying too much about its consumption and making the tool slower is             not a good approach since it will probably just encourage the use of other tools. Wrapping up, the main way in which this tool can help the environment is              through reducing the computational power and energy consumed during long,          error-prone and manual data migrations, and this is what really matters. 10.3. Economic Dimension 10.3.1. Regarding PPP For this phase the relevant consumption to analyse are the resources, either            human or material, used during the entire project and their corresponding costs. Having in mind that the total cost estimation for the completion of project is of               14,500, it is relevant to take into account that a large learning and research curve               had to be covered in the realization of the project on account of the lack of                knowledge in the technologies required. Also being a junior developer and having            little experience in project planning and management probably increased the          costs of the project. After all I still would not criticize this aspect a lot since considering the              development it would have taken less time to an experienced team, the costs             associated would have been higher given that their pay per hour would also be              higher. 95 10.3.2. Regarding Useful Life Currently, in similar software that addresses the same problem as this project, the             economic issues of costs are solved by providing both a free-tire and pay per use               option. In this way they can not only cover the costs involved but also win profit                from the tool, therefore it has a true economic potential if desired. Now, in my case, for my project’s viability plan and for my solution as an MVP, the                 approach previously explained is not possible yet since it was not its purpose,             hence, in the case in which its development progresses, it perfectly has the             potential of being monetized. Alternatively, the way in which I see the economical benefit and viability plan of              this tool is by reducing the amount of time spent by workers on doing the manual                tedious work of a data migration. With the use of this tool, workers would be able                to spend their work hours in more useful and productive work which they are only               capable of doing, and not machines, rather than wasting their time and effort to              something that could be done faster and easier through automation. In conclusion, a better use of worker resources will be available with the             incorporation of this tool, which results in more productive costs for the company. 10.4. Social Dimension 10.4.1. Regarding PPP The personal impact that carrying out this project has had on me is mostly in               terms of personal growth, meaning that not only I will achieve to build an MVP               data migration tool, but I will also learn new technologies used in real life projects,               go through the complete life cycle of a project creation and delivery, and in              addition, performing this thesis in a company, also benefits me by kicking-off my             work experience and exploit many advantages related to real world projects. Working on this project did much more to me personally, since it completely             changed my daily routine from a student perspective to an intern with a full-time              job with the advantage of a first salary. With this opportunity I’m also getting to               understand many concepts practically through the approach of learning by doing,           providing me with more knowledge, plus tips and best practices from the            company's employees. Another impact this project had on me is by updating my vision of life in relation to                 the job of my career, computer engineering. Now I have been able to see and feel                how real life teams work, the steps they go through in the development of a               project and understand, be aware that mistakes are something really common in            software development, when I actually had a vision much more strict of this aspect              which pressured me into thinking that I was not good enough. 96 Now I know that in reality things are really different and that before developing a               project it is not necessary to previously have all the knowledge necessary to start              implementing it, but that part of the development process is to learn and fail. 10.4.2. Regarding Useful Life The impact of this project creation is mostly directed to the company's employees.             By automating the task of data migrations the workers time can be better spent,              also their corresponding stress level resulting from deadlines and accumulated          workload is reduced, therefore contributing to their personal well-being by          avoiding unnecessary headaches or stress and eradicating their annoyance         feelings of having to perform difficult and tedious manual work. Managers are also positively affected by paying productive salaries, as a result of             their employees workload being reduced. Additionally, they can also use this tool            to populate a sample environment for demos to potential clients. Also the end-clients are also benefited since this tool may allow to quickly extract              the necessary data from a user’s support case and therefore reproduce the            reported error and be able to receive quicker feedback. This is actually one of the main purposes for this project’s development, to increase              the positive social impact and improve the quality of work life of the workers,              meaning, there is a real social need for this project's creation apart from its              economic advantages. Now, regarding the negative social implications there is not much to say, but the              only potential group target I can think about (I say potential referring to the future               once it is not only an MVP), is about professionals strictly dedicated to perform              data migrations which salaries depend on it. This would affect them negatively            since in the worst case i could mean their job loss, or at the least a lower pay. Thinking realistically though I would not even consider this a truly real negative             impact due that really complex and manual data migrations should not be            performed regularly and the goal is to eventually be able to automate all kinds of               data migration, then, this might be a warning to the type of persons that their only                job is to perform data migrations so that they start looking for alternative job              opportunities. Plus if they have the knowledge to handle such complex processes            that demand strong knowledge and really good abilities they should be able to             find a new job easily. 10.5. Conclusions This project’s intentions are completely honest, and there clearly is a problem            waiting to be addressed and a solution waiting to be performed. 97 The environmental, economic and social harm is almost nonexistent and from the            problem associated, the benefits it generates are more than enough to consider            this project viable and sustainable. Just as a last statement I would like to add that as an MVP this project does not                  cover implications relating to privacy of user data, but future improvements a data             scrambler could be incorporated for the cases in which sensible data is being             migrated.   98 11. Technical Competencies In this unit the technical competencies associated with the project during the Bachelor’s thesis enrollment will be presented. 11.CES1 CES1: To develop, maintain and evaluate software services and systems which           satisfy all user requirements, which behave reliably and efficiently, with a           reasonable development and maintenance and which satisfy the rules for quality           applying the theories, principles, methods and practices of Software Engineering. 11.CES1.1 CES1.1: Develop, maintain and evaluate complex and/or critical systems and          services. [In depth] Through this report I have explained the topics of Salesforce Orgs and data             migrations, I have described the problem in hand and justified the reasons why is              complex undergoing through the process of a data migration together with the            numerous considerations that are required in order to accomplish a successful           data migration. With all that being said, it is important to note how not only the topics that involve                 the project are complex, but also the project itself for being responsible for             developing, maintaining and evaluating all these previously mentioned factors. Besides before achieving the tool built without any previous knowledge about           Salesforce, an advanced and elaborated research, planning and organization had          to be conducted to understand and determine the viability of the project’s scope             and the feasibility of its functionalities, with the goal of reaching the approached             solution implemented. In addition, developing this tool meant constantly dealing with challenges and           making critical decisions towards the system’s behavior, as different criterias reach           to different development approaches, and at all times, the procedures selected           were carefully considered for achieving the best results. 11.CES1.3 CES1.3: To identify, evaluate and manage potential risks related to software           building which could arise. [A little bit] Many potential risks were identified and evaluated during the project's          development, to the point in which the most important potential risks were any             99 risks that could have been overlooked that could suppose very strict limitations            towards the software’s development. Also, delivery related risks were critical for the project, as the tool consists of a               continuous flow of functionalities in order to work. Thus being the system so             dependent on each functionality for the system to work as a whole and meeting              its purpose, required a great amount of time and effort to complete all the tasks               involved on time for the project’s deadline. Additionally operational risks such as lack of sufficient training were taken into            account, since overlooks where easily a possibility in this project as a result of the               lack of documentation available relating to the topic in hand. For these reasons an Agile methodology was selected for the project, so that at any               moment in time I could manage and quickly adapt to any potential risks without              risking jeopardizing the entire project's planning. 11.CES1.5 CES1.5: To specify, design, implement and evaluate databases. [Enough] Every piece of this project is core for the tool to function, as the front-end steps                require manual assistance from the user, and the back-end contains all the            sophisticated logic to communicate with Salesforce Orgs and handle the          automation of steps necessary to perform the migration. However what is critical for the system to function is the database, as this one acts                as the Source of Truth for the server. Furthermore, in order for the server to work                efficiently and effectively it highly depends on the design of the non-relational            database used in the project. Therefore as the sections 6.3.3. about the Database Conceptual Schema and 7            explain, many considerations took place related to the specification, design,          implementation and evaluation of the database the system built in this project            encompasses. 11.CES2 CES2: To value the client needs and specify the software requirements to satisfy             these needs, reconciling conflictive objectives through searching acceptable        compromises, taking into account the limitations related to the cost, time, already            developed systems and organizations. 11.CES2.1 CES2.1: To define and manage the requirements of a software system. [Enough] Defining the projects requirements was a complex task itself, as not only a really              good comprehension of the topic in hand was required at the time, but a key               100 factor towards the requirements criteria was the amount of time available to            complete and deliver the project on time. That is many requirements were not a possibility given the projects deadline,            hence, an in depth brainstorming of the most basic and relevant requirements            was made to define this projects requirements. This task was specifically difficult since it required brainstorming the functionalities           of the ideal desired tool so that they could be broken down into smaller essential               functionalities for a basic tool. This meant prioritizing the core functionalities of the project, which actually           resulted in being really useful by providing a lot of knowledge towards the             feasibility of future enhancements. In this way, this project requirements describe the results of this reflection about             the core functional and non-functional requirements to build a data migration           automation tool between Salesforce Orgs. 11.CES3 CES3: To identify and analyse problems; design, develop, implement, verify and           document software solutions having an adequate knowledge about the current          theories, models and techniques. 11.CES3.1 CES3.1: Develop services and multimedia applications. [A little bit] This technical competence was selected “A little bit” for the purpose of not dealing              with multimedia content. On the other hand it includes a really refined analysis for              the problem related to data migrations, plus it also designs, develops and            implements this tool as a service to deal with the problem data migrations arise. Hence, as demonstrated in a variety of sections throughout this report, a lot of              research towards the current techniques and best practices for conducting data           migrations and building this tool were investigated to have a solid understanding            about the current techniques and approaches on the subject of data migrations.  101 12. Project Retrospective 12.1. Closing Remarks This project came to happen as a result of the trouble generated to companies developing software on top of Salesforce by the recurrent need of having to perform complex data migrations between Salesforce Orgs. The consequences of frequently undergoing through data migrations can cost companies a considerable amount of development time and even lead to the employment of bad practices such as postponing necessary data migrations or vaguely performing them inducing to future development repercussions. The trouble of data migrations is somewhat related to the phrase John Wooden once said “If you don’t have time to do it right, when will you have time to do it over?”. As a result, this project aims to remove the concerns resulting from dealing with arduous data migrations with the goal of building a simple and intuitive tool capable of automating the procedure of a data migration between Salesforce Orgs. Counting with this tool would imply considerably reducing the workload associated with data migrations, hence, offering many benefits to the company’s development efficiency. In approximately a timespan of 5 months, I was expected to accomplish this goal with no Salesforce and data migrations prior knowledge. This required me to study, learn, research, estimate, plan, analyze, specify, design, implement, test and document all the project’s work described in this report. Additionally, with the help of my teammates at Nuvolar Works, I also got to benefit from their years of experience in software engineering by incorporating their working methodologies into the project, receiving useful feedback and brainstorming sophisticated proposals together. Yet, at this moment, having completed the project, I can gladly and proudly affirm that the project goals, objectives and requirements have been successfully achieved. Furthermore, despite having met the product owner needs, working on this project has also brought me a lot of personal growth from the professional perspective, as a Junior Software Engineer, and from the personal perspective, as a person. Developing this project I got to learn new technologies, methodologies and best practices, which at the same time has provided me with a lot of knowledge and 102 experience as well as great relationships with my company colleagues, who have supported me, given me advice and inspired me during this project’s development. For being my first time working in a company I feel highly satisfied about the results obtained, as not only I got to start from zero on a project with a huge potential, but working with the motivation of there existing a real necessity for this tool has been incredibly rewarding and motivational. If I were to do this project again, I would work more on the front-end design, as having prioritized the back-end I only performed wireframes on paper and skipped making proper mockups for ensuring the best user experience possible. Additionally, I would improve the implementation of certain modules and apply additional design patterns that allow for a better scalability. Having said this I always find important to note that developing software requires great skills, and I am not referring to technical skills, but the emotional skills that are not usually discussed, as for instance, the constant persistence and encouragement to face new challenges, to feel comfortable and not overwhelmed with uncertainties and everything yet to learn and to reinvent yourself by keeping up with new technologies and methodologies. I believe it is relevant to remind about this for the reason that the known image of software development is pressing the keyboard keys and clicking the mouse in the right spots and magically a software is built, however in reality, a lot of hours are dedicated to planning, thinking, refactoring, debugging and figuring out why the implemented code is not working as expected. And what I love about this concept is the fact that when debugging it sometimes can be particularly difficult and frustrating to discover the reason or the piece of code which is making the system not to work as expected, hence, at this moment it is easy to blame an external service for malfunctioning, however in most cases it is always the developers fault. And I find this beautiful because it reminds me about honesty and how we should always blame ourselves before blaming others. 4 years ago I decided to study Informatics Engineering because it simply amazed me how computers, computers programs and websites worked. Today, I am a Junior Software Engineer and I aspire to build great tools that fill a necessity and therefore are useful and helpful for end users and therefore contribute in making the world a better place. 12.2. Main Challenges This section outlines a list of the main challenges that have been encountered through the project’s development: 103 ❖Salesforce Research & Documentation – Salesforce counts with a great deal of documentation, however this documentation is not organized for the purpose of this project, therefore finding a list considerations the tool should have in mind was more of a journey by which I had to play around with Salesforce Orgs to learn and gain knowledge about its behavior and try to discover any edge cases present not easily found through the Salesforce documentation. At the same time it also happened sometimes that due to the immense amount of documentation Salesforce needs to maintain, some information is vaguely explained or even outdated, leading to unnecessary difficulties in the implementation of certain methods. ❖Adapting to Special Salesforce Behaviors – as a consequence of the previous challenge, this made the project deal with a degree of uncertainty towards Salesforce special behaviors that would have to be discovered through the project’s development. This is a challenge, because as a result of the tool completely relying on Salesforce, it implies that the tool would have to adapt and include the behavior necessary to deal with these special mentioned behaviors, which luckily only took place to a small degree. ❖Preserving Record Relations – as a concept explained in depth through this report, preserving record relations was the core challenge of the project implementation, as it is the main requirement of the automation of data migrations and it incorporated a large amount of sophistication to the system. It specifically required a lot of organization, detailed planning and great management in the system’s behavior, as many responsibilities are involved to ensure the sustainability of this task. ❖Decision Making – many difficult decisions had to be made during the project development, from the definition of project requirements to the design of the system and its implementation. The way in which these assignments were carried could have a great impact on future work, hence really meticulous decisions had to be made. ❖Testing – testing should be quick, easy and a smooth process, however this is not always possible. As mentioned in the validation testing unit, the main challenge of testing this system relies on the automation of tests, and because of this, not only a numerous amount of testing approaches were attempted, but in order to ensure the correct execution of the system a numerous list of manual system steps has to be performed. 104