Extend survey expiration dates

Survey emails expire at a date and time defined by the Rules that created the emails. A respondent cannot take or finish a survey that has expired, which sets the record status to EXPIRED. Occasionally, you might want to extend the expiration date to allow invitees more time to take the survey. To do so, you must to create a new ballot for the survey taker.

Every record has a status signaling the current state of the record, such as Completed, Delivered, Expired, Retry delivery later, Invitation resent, etc. To update the expiration date and create a new ballot, the status must change to 17 - READY_FOR_SE_ONLY. Medallia Experience Cloud then changes status to 3 - SURVEY_ENGINE_ONLY, which allows to push the ballot into the Survey engine. However, the original status is necessary for Experience Cloud to properly process the record. So the final step is to restore the original statuses.

The general steps for extending or updating survey expiration dates involve:

  1. Export the survey IDs and statuses of records that have not be completed.

  2. Make a copy of the exported records.

  3. Update fields in the copied file:

    1. Extend the expiration timestamp of those records.

    2. Change the status of those records to allow Sampling to create new ballots, and to not generate new invitations.

  4. Import the updated records.

  5. Manually "push" the ballots into the Survey engine.

  6. Import the backup copy of the records to restore the statuses of the updated record.

Extending the survey expiration data process.

Warning: Surveys started but not finished might lose the answers respondents have already provided. Before starting this procedure, the company must decided to extend the expiration dates for all impacted invitees, or just the ones that have not already started surveys. In the later case, those invitees not have the opportunity to finish their surveys.

Export the surveys to be extended

Export the surveys that need their expiration timestamps extended as follows:

  1. Create an Export with these settings:

    • Export via Email (for simplicity).
    • Export format Excel 2007
    • Filename — Enter a meaningful name, including the date and time.
    • Use ExportSince — Leave unselected.
  2. Include these fields to export:

    • Survey ID (a_surveyid).
    • Survey status (e_status).
    • Expiration date (e_expirationdate).
    • Survey clicked (a_survey_is_started) — Optional; useful for troubleshooting.
  3. Create one or more Episode condition to identify the records to export. The following are some useful conditions:

    FieldOperatorValueDescription
    Response Date (e_responsedate)Is nullSurveys that have not been submitted (finished)
    Expires on date (e_expirationdate)Is not nullSurveys that have expiration dates
    Expires on date (e_expirationdate)More than08/01/2017 00:01Surveys that expire on or after 1-Aug-2017
  4. Export and download the records. In the export specification's Download Excel 2007 property, click the Download link to download the file to your computer.

Make a copy of the exported file

Make a copy of the downloaded export file on you device.

  • Use the original file for potential troubleshooting.
  • Modify the copy with the extended timestamps and status values.

Update status and expiration timestamp

This step changes expiration timestamps and sets the Survey status (e_status) values to 17 (READY_FOR_SE_ONLY). Using this status keeps the records from going through Sampling and avoids creating new invitations.

Update the export file with new values as follows:

  1. Change the Survey status values to READY_FOR_SE_ONLY.

  2. Change the Expires on date values to the new timestamp, such as 9/1/17 0:00.

  3. Update the column headings to match the labels that will be used in step Import updated records.

  4. Remove the title and header rows.

  5. Save the updated file.

Examples of data in Excel, before and after changing the status values to 17, and setting the expiration timestamp values to 9/1/17 0:00

Import updated records

Create this Importer specification to import and update the records:

//EXCEPTION: Add a record discard that checks the status of the survey and ensures it is not completed or completion pending before the e_status switch on every importer. Do not change the status from READY_FOR_SE_ONLY in the importer since you are waiting for Survey engine to do that.

if (original.e_status == "COMPLETED" || original.e_status == "COMPLETION_PENDING" || original.e_status == "READY_FOR_SE_ONLY"){
  discardRecord('Record was completed or completion pending or ready for SE');
}
if (original.e_responsedate){
  discardRecord('Record had response date but not completed');
}
<import-spec inputType="EXCEL" columnsCheck="ALLOW_EXTRA_COLUMNS" name="Update Expiration Date" description="An auto-generated spec to deal with Survey">
 <input-column heading="Surveyid" />
 <input-column heading="Survey Status" />
 <input-column heading="e_expirationdate" />
 <output-column-group pluginName="Survey" recordUpdateMode="UPDATE">
  <output-column>
   <input-column heading="Surveyid" />
   <target-field fieldId="surveyid" fieldName="Survey ID" requiredness="REQUIRED_USED_FOR_DUPLICATE_CHECK" type="INTEGER" />
  </output-column>
  <output-column>
   <input-column heading="Survey Status" />
   <target-field fieldId="e_status" fieldName="Status" requiredness="REQUIRED" type="ENUMERATED">
    <enumerated-field-parse-options mappingKey="NAME" />
   </target-field>
  </output-column>
   <output-column>
   <!--constant value="2016/01/07 23:59:00" /-->
   <input-column heading="e_expirationdate" />
   <target-field fieldId="e_expirationdate" fieldName="Expires on date" requiredness="REQUIRED" type="TIMESTAMP">
    <timestamp-field-parse-options format="yyyy/MM/dd HH:mm:ss" timeZone="CET" />
   </target-field>
  </output-column>
   <survey-processor-options />
 </output-column-group>
</import-spec>

In the example specification above, notice:

  • The three columns are all required, and the survey ID is also used for Duplicate checking.

  • In the Survey Status column, the mappingKey is NAME. This tells the importer to use the name of the status, such as READY_FOR_SE_ONLY. Alternatively, use SEQUENCENUMBER, in which case the values in the file need to be 17 instead of READY_FOR_SE_ONLY.

To import the file:

  1. On the Auto Importer Processors screen, select the import specification.

  2. Upload the file with the Process a file on pretend property. Click Choose file and upload the Excel file.

  3. On the Feed Files screen, select the uploaded file. The filename will be gold-colored to indicate it was uploaded in pretend mode.

  4. Click Reprocess on Active to update the survey records.

Warning: Make sure all the survey records have READY_FOR_SE_ONLY status before you process the import, otherwise Restore original statuses does not work.

Push ballots to the Survey engine

To push the ballots to the Survey engine:

  1. On the Feedback > Sampling > Triggers screen, select the File Feed trigger.

  2. Click Transfer Invites to SE to push the ballots to the Survey engine.

At this stage, the status of the records have been changed to 3 (SURVEY_ENGINE_ONLY). This status means that the survey has been sent to the Survey engine and has been accepted by it, but no email has been sent yet.

Tip: You can verify the changes and status in the Invitations report, or by exporting the records again and examining the new export file.

Restore original statuses

Restore the original statuses of records (either to DELIVERED or DELIVERED_AND_REMINDED), and import the original exported statuses as follows:

Important: Before restoring the original statuses, make sure the Survey engine has completed changing all of the records to status 3 (SURVEY_ENGINE_ONLY).
  1. Copy the survey IDs and statuses from the original export file into the working spreadsheet copy to overwrite the previous updates.
  2. Delete the Expiration date (e_expirationdate) column.

    Copy of survey IDs and matching status in new file

  3. Modify the import specification and remove or comment the Expiration date column.

  4. On the Auto Importer Processors screen, select the import specification.

  5. Upload the file with the Process a file on pretend property. Click Choose File and upload the spreadsheet file.

  6. On the Feed Files screen, select the uploaded file. The filename will be gold-colored to indicate it was uploaded in pretend mode.

  7. Click Reprocess on Active to update the survey records. Make sure he Survey engine has completed changing all of the records to status 3 (SURVEY_ENGINE_ONLY) and that there are no records with status 2 (READY_FOR_SE) before re-processing the file as this causes records not to get the updated expiration date.

Verify the changes and status in the Invitations report, or by exporting the records again and examining the new export file.