The User Story: 67870 Contains an example of creating a duplicate Bespoke Survey for a company
If a request is put through to create a duplicate WIT account for a company, the first thing you need to do is check for any anonymity issues that could single out a single persons response. Members of the research team can often help with this.
Once you have confirmed that there are no issues preventing you from giving a company this data. You should follow the steps below:
1. Execute the 'prc_CreateNewSurvey' procedure.
2. Execute the 'prc_UpgradeCompany_insert' procedure. This is the procedure called in the 'Upsell Routine' in back office and will copy across data from one survey to another. Choose a similar survey to copy from e.g. 'BCI Survey 2015' to 'Mouchel 2015'.
Note: Remember to populate the @CreateNewSurveyNumbersForDestCoSurvey if you are changing anything to do with employee surveys such as removing employment groups. This will allow you to edit the employees independently between surveys i.e. you can deactivate an 'EmployeeSurvey' in the new survey without affecting the original 'EmployeeSurvey'.
3. Insert into the Dat_Company_Survey_WIT_Access table to allow the company access to WIT.
4. If you have created new survey numbers, create a mappings variable table, map your EmploymentGroups to the EmploymentGroups in the survey you are copying from on the employment group names then store the 'IDs'. Then insert the mappings into this table joining on the 'EmploymentGroupID's' from the original survey.
5. Insert the new 'EmploymentGroupIDs' and the original linked 'EmploymentGroupIDs' from the variable table into the 'Dat_Employment_Group_Mapping' table.
6. Look in the 'WIT.prc_ComparableSurveys_Bulk_insert' procedure. This calls a select procedure at the end. You will need to use the code from this select procedure to create a SingleIntegerTable of comparable surveys from the original survey. Use the 'Bulk insert' procedure to insert these survey id's against your new 'SurveyID'.
7. If you have made any changes to the employees in the new survey you will need to re-populate the 'BCI Scores'. Do this using the 'OverallSurveyResults_Insert' procedure.
8. To copy over the benchmarks from the original account, you will need to select the ranges from the original survey and insert them into Ref_WIT_Company_Ranges against the new CompanySurveyID.
9. The Client Liaison will not be set for the new company survey so you should set this. Also, the companies WIT accounts will need to be assigned over to the new WIT.
10. If the company has created any bespoke demographics in the survey you are copying from you will need to create them for the new survey. Don't worry about the demographic answers, as these should have been copied across in the up-sell routine.
11. As you have created a completely new survey you will need to populate the data warehouse and process the cube to be able to view the data. Remember when submitting your work to request a WIT refresh at the end.