Publishing a Survey
Publishing indicates a survey is ready to be completed by end users. Publishing locks the survey restricting editing to survey properties and questions. The following processes occur when a survey is published using the default batch.
Administrators can download a zip file containing the results of a publishing job. The zip file contains two CSV files. The first file has one row representing the details of the publishing job. The second file contains a row for every target account assigned. If a target account was not assigned, the file includes a reason why the assignment failed. This can be used to troubleshoot Survey publishing if the target account assignments are not as expected.
Administrators can abort a job in progress or republish a survey. After a job is aborted, the Survey’s status reverts to the previous status – either Development_vod or Published_vod.
Selecting Republish re-runs the Survey publish job with all the survey targets. The status for the survey changes to Publishing_vod while the job is running and then to Published_vod once it is complete.
Different logic can be applied by creating a batch and pointing the setting to the new batch.
To prevent publishing failures, ensure all users who are within the included User Territories for a survey and could potentially be assigned a survey target record have Read permission to the Survey_Target_vod object.
Veeva Settings for Publishing Surveys
Two Veeva Settings determine which publishing batch is executed when publishing a survey and when to display alerts to end users for Survey Targets nearing their end date:
- Survey_Publish_Apex_vod - uses the name of the Apex Class used when publishing a survey. If it is blank, which is the default setting, it points to the default batch, Veeva_Batch_Survey_Publish. To use a different publishing batch, enter the name of the batch in this setting.
- SURVEY_ALERT_THRESHOLD_vod - the value determines the number of days before a Survey Target’s end date to display an alert to the end user on the homepage in CRM for iPad
The VEEVA_BATCH_SURVEY_PUBLISH Apex Class is the default batch referenced in the Survey_Publish_Apex_vod Veeva Setting . When a survey admin selects Publish the default batch is triggered.
MC Engine Publishing
Along with publishing a survey from the survey itself, users can also use the Multichannel engine (MC Engine) to publish surveys. Using Veeva’s MC Engine allows for more than five concurrent jobs to run at the same time.
To publish surveys using Veeva’s MC Engine:
- Enter a value of 1 for the Survey_Publish_Apex_vod Veeva Setting.
- Ensure the admin user has access to the Survey Administration tab.
- Enter and validate the integration user’s credentials. The integration user is used to write back data to the SFDC database after a survey is published.
- Grant the integration user edit permission to the following objects:
- Survey_vod
- Survey_Target_vod
- Survey_Question_vod
When publishing surveys using the MC Engine, notification emails are not sent to the administrator.
An error message stating Problem querying for Survey or Survey Targets displays if there are too many concurrent publishing tasks.
Publishing a Survey to a New Target
After a survey is published and locked from edits, new Survey Targets can still be added from the Targets section of the Survey Management screen. When a Survey Target is added, the record status is changed to Development_vod and the Publish to New Targets button displays at the top of the Survey Management screen. Selecting this button re-publishes the survey and the batch only processes the new Survey Target records.
Save Button for Surveys
If a survey is published for multiple end users, the Save button can be removed from the Survey Target Execution screen to prevent one end user from deleting the answers of another before the survey is submitted. Users can submit a Survey Target only once. Once a survey is submitted, the answers cannot be edited.
To remove the Save button, navigate to the appropriate Survey Target record type and remove Saved_vod button from the Selected Values for the Status picklist.