---
schema_version: "1"
id: 8b5e663cf1d7f3bc101c3408e229cb8e13403ee203f04adbf2b1bd430c206f42
title: ConnectApi.SurveyInvitationEmailInput
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_connectapi_input_survey_email.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_input_survey_email.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 1033b7c3c9fbf82a1300d7ae3a3ec4a3351565329506f02d40d108e7af4f2887
description: Survey invitation email.
---
# ConnectApi.SurveyInvitationEmailInput

Survey invitation email.

<table class="featureTable sort_table" summary="">
          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader vertical-align-top " id="d735762e27">Property</th>
              <th class="featureTableHeader vertical-align-top " id="d735762e29">Type</th>
              <th class="featureTableHeader vertical-align-top " id="d735762e31">Description</th>
              <th class="featureTableHeader vertical-align-top " id="d735762e33">Required or Optional</th>
              <th class="featureTableHeader vertical-align-top " id="d735762e35">Available Version</th>
            </tr>
          </thead>
          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d735762e27 d735762e35" data-title="Property"><samp class="codeph apex_code">allowGuest​UserResponse</samp></td>

              <td class="entry" headers="d735762e29" data-title="Type">Boolean</td>

              <td class="entry" headers="d735762e31" data-title="Description"><span class="ph" id="allowGuestUserResponse"><a name="allowGuestUserResponse"><!-- --></a>Specifies whether participants
                  who don't have a Salesforce account can respond (<samp class="codeph apex_code"><span class="keyword">true</span></samp>) or not (<samp class="codeph apex_code"><span class="keyword">false</span></samp>).</span></td>

              <td class="entry" headers="d735762e33" data-title="Required or Optional">Required</td>

              <td class="entry" headers="d735762e27 d735762e35" data-title="Property">50.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d735762e27 d735762e35" data-title="Property"><samp class="codeph apex_code">allowParticipants​AccessTheirResponse</samp></td>

              <td class="entry" headers="d735762e29" data-title="Type">Boolean</td>

              <td class="entry" headers="d735762e31" data-title="Description"><span class="ph" id="allowParticipantsAccessTheirResponses"><a name="allowParticipantsAccessTheirResponses"><!-- --></a>Specifies whether
                  participants can see their responses (<samp class="codeph apex_code"><span class="keyword">true</span></samp>) or not (<samp class="codeph apex_code"><span class="keyword">false</span></samp>).</span></td>

              <td class="entry" headers="d735762e33" data-title="Required or Optional">Required</td>

              <td class="entry" headers="d735762e27 d735762e35" data-title="Property">50.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d735762e27 d735762e35" data-title="Property"><samp class="codeph apex_code">associateRecords​WithRecipients</samp></td>

              <td class="entry" headers="d735762e29" data-title="Type">
                <a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm#apex_methods_system_list" title="Contains methods for the List collection type.">List</a>&lt;<a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_input_survey_recipient_survey_subjects.htm" title="Records associated with the survey invitation."><samp class="codeph apex_code">ConnectApi.​AssociateRecordsWith​RecipientInput</samp></a>&gt;
              </td>

              <td class="entry" headers="d735762e31" data-title="Description"><span class="ph" id="associateRecordsWithRecipients"><a name="associateRecordsWithRecipients"><!-- --></a>Maps each recipient with
                  another record that must be associated with the recipient's
                  survey invitation.</span></td>

              <td class="entry" headers="d735762e33" data-title="Required or Optional">Optional</td>

              <td class="entry" headers="d735762e27 d735762e35" data-title="Property">50.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d735762e27 d735762e35" data-title="Property"><samp class="codeph apex_code">body</samp></td>

              <td class="entry" headers="d735762e29" data-title="Type">String</td>

              <td class="entry" headers="d735762e31" data-title="Description">
                <span class="ph" id="body"><a name="body"><!-- --></a>Content of the email. Specify the email body in
                  case you don't specify an email template. The email body must
                  contain one of these merge fields:</span><a name="surveyemailmergefields"><!-- --></a>
                <ul class="ul bulletList" id="surveyemailmergefields">
                  <li class="li">To embed a link to launch the survey:
                    [[SURVEY_INVITATION_URL]]</li>

                  <li class="li">To embed a survey question:
                    {{{SurveyQuestion.QuestionName}}} and
                    {{{SurveyQuestion.QuestionHtmlContent}}}
                  </li>

                </ul>
              </td>

              <td class="entry" headers="d735762e33" data-title="Required or Optional">Optional</td>

              <td class="entry" headers="d735762e27 d735762e35" data-title="Property">50.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d735762e27 d735762e35" data-title="Property"><samp class="codeph apex_code">collectAnonymous​Response</samp></td>

              <td class="entry" headers="d735762e29" data-title="Type">Boolean</td>

              <td class="entry" headers="d735762e31" data-title="Description"><span class="ph" id="collectAnonymousResponse"><a name="collectAnonymousResponse"><!-- --></a>Specifies whether participants
                  can respond anonymously (<samp class="codeph apex_code"><span class="keyword">true</span></samp>) or not (<samp class="codeph apex_code"><span class="keyword">false</span></samp>).</span></td>

              <td class="entry" headers="d735762e33" data-title="Required or Optional">Required</td>

              <td class="entry" headers="d735762e27 d735762e35" data-title="Property">50.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d735762e27 d735762e35" data-title="Property"><samp class="codeph apex_code">communityId</samp></td>

              <td class="entry" headers="d735762e29" data-title="Type">String</td>

              <td class="entry" headers="d735762e31" data-title="Description"><span class="ph" id="communityId"><a name="communityId"><!-- --></a>ID of the site that's used to open the
                  survey for users outside your org.</span></td>

              <td class="entry" headers="d735762e33" data-title="Required or Optional">Optional</td>

              <td class="entry" headers="d735762e27 d735762e35" data-title="Property">50.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d735762e27 d735762e35" data-title="Property"><samp class="codeph apex_code">emailTemplateId</samp></td>

              <td class="entry" headers="d735762e29" data-title="Type">String</td>

              <td class="entry" headers="d735762e31" data-title="Description"><span class="ph" id="emailTemplateId"><a name="emailTemplateId"><!-- --></a>ID of the Lightning email template
                  that's used to send the survey invitation. The template must
                  contain the required merge fields that embed either the survey
                  link or a question in the email. Only Lightning email templates
                  are used to send survey invitations.</span></td>

              <td class="entry" headers="d735762e33" data-title="Required or Optional">Optional</td>

              <td class="entry" headers="d735762e27 d735762e35" data-title="Property">50.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d735762e27 d735762e35" data-title="Property"><samp class="codeph apex_code">fromEmailAddress</samp></td>

              <td class="entry" headers="d735762e29" data-title="Type">String</td>

              <td class="entry" headers="d735762e31" data-title="Description"><span class="ph" id="fromEmailAddress"><a name="fromEmailAddress"><!-- --></a>Email ID of the user or the org-wide
                  email address associated with the user's profile.</span></td>

              <td class="entry" headers="d735762e33" data-title="Required or Optional">Required</td>

              <td class="entry" headers="d735762e27 d735762e35" data-title="Property">50.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d735762e27 d735762e35" data-title="Property"><samp class="codeph apex_code">invitation​ExpirationDate</samp></td>

              <td class="entry" headers="d735762e29" data-title="Type">Datetime</td>

              <td class="entry" headers="d735762e31" data-title="Description"><span class="ph" id="invitationExpirationDate"><a name="invitationExpirationDate"><!-- --></a>Date on which the survey
                  invitation expires.</span></td>

              <td class="entry" headers="d735762e33" data-title="Required or Optional">Optional</td>

              <td class="entry" headers="d735762e27 d735762e35" data-title="Property">50.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d735762e27 d735762e35" data-title="Property"><samp class="codeph apex_code">invitationOwner</samp></td>

              <td class="entry" headers="d735762e29" data-title="Type">String</td>

              <td class="entry" headers="d735762e31" data-title="Description"><span class="ph" id="invitationOwner"><a name="invitationOwner"><!-- --></a>ID of the owner of the survey invitation
                  records.</span></td>

              <td class="entry" headers="d735762e33" data-title="Required or Optional">Optional</td>

              <td class="entry" headers="d735762e27 d735762e35" data-title="Property">50.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d735762e27 d735762e35" data-title="Property"><samp class="codeph apex_code">isPersonal​Invitation</samp></td>

              <td class="entry" headers="d735762e29" data-title="Type">Boolean</td>

              <td class="entry" headers="d735762e31" data-title="Description"><span class="ph" id="isPersonalInvitation"><a name="isPersonalInvitation"><!-- --></a>Specifies whether a unique
                  invitation is created for each participant (<samp class="codeph apex_code"><span class="keyword">true</span></samp>) or not (<samp class="codeph apex_code"><span class="keyword">false</span></samp>). When a participant
                  responds using a personal invitation, the response record is
                  associated with the participant's Salesforce
                  record.</span></td>

              <td class="entry" headers="d735762e33" data-title="Required or Optional">Required</td>

              <td class="entry" headers="d735762e27 d735762e35" data-title="Property">50.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d735762e27 d735762e35" data-title="Property"><samp class="codeph apex_code">recipient​Engagement​Contexts</samp></td>

              <td class="entry" headers="d735762e29" data-title="Type">
                <a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm#apex_methods_system_list" title="Contains methods for the List collection type.">List</a>&lt;<a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_input_survey_recipient_engagement_context.htm" title="Context based on which the survey invitation is sent to a participant."><samp class="codeph apex_code">ConnectApi.​RecipientEngagement​ContextInput</samp></a>&gt;
              </td>

              <td class="entry" headers="d735762e31" data-title="Description"><span class="ph" id="recipientEngagementContexts"><a name="recipientEngagementContexts"><!-- --></a>Maps each recipient with the
                  context based on which the survey invitation is
                  emailed.</span></td>

              <td class="entry" headers="d735762e33" data-title="Required or Optional">Optional</td>

              <td class="entry" headers="d735762e27 d735762e35" data-title="Property">50.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d735762e27 d735762e35" data-title="Property"><samp class="codeph apex_code">recipients</samp></td>

              <td class="entry" headers="d735762e29" data-title="Type">
                <a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm#apex_methods_system_list" title="Contains methods for the List collection type.">List</a>&lt;String&gt;
              </td>

              <td class="entry" headers="d735762e31" data-title="Description"><span class="ph" id="recipients"><a name="recipients"><!-- --></a>List of up to 300 IDs of leads, contacts, or
                  users to whom the survey invitation is emailed.</span></td>

              <td class="entry" headers="d735762e33" data-title="Required or Optional">Required</td>

              <td class="entry" headers="d735762e27 d735762e35" data-title="Property">50.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d735762e27 d735762e35" data-title="Property"><samp class="codeph apex_code">sendEmail​ThroughUma</samp></td>

              <td class="entry" headers="d735762e29" data-title="Type">Boolean</td>

              <td class="entry" headers="d735762e31" data-title="Description"><span class="ph" id="sendEmailThroughUma"><a name="sendEmailThroughUma"><!-- --></a>Specifies whether to send the email
                  through Marketing Cloud (<samp class="codeph nolang">true</samp>) or not (<samp class="codeph nolang">false</samp>). If unspecified, defaults to <samp class="codeph nolang">false</samp>.</span></td>

              <td class="entry" headers="d735762e33" data-title="Required or Optional">Optional</td>

              <td class="entry" headers="d735762e27 d735762e35" data-title="Property">65.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d735762e27 d735762e35" data-title="Property"><samp class="codeph apex_code">shareInvitations​With</samp></td>

              <td class="entry" headers="d735762e29" data-title="Type">
                <a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm#apex_methods_system_list" title="Contains methods for the List collection type.">List</a>&lt;String&gt;
              </td>

              <td class="entry" headers="d735762e31" data-title="Description"><span class="ph" id="shareInvitationsWith"><a name="shareInvitationsWith"><!-- --></a>IDs of the users with whom the
                  survey invitation records must be shared. The invitation records
                  are shared with Read access.</span></td>

              <td class="entry" headers="d735762e33" data-title="Required or Optional">Optional</td>

              <td class="entry" headers="d735762e27 d735762e35" data-title="Property">50.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d735762e27 d735762e35" data-title="Property"><samp class="codeph apex_code">subject</samp></td>

              <td class="entry" headers="d735762e29" data-title="Type">String</td>

              <td class="entry" headers="d735762e31" data-title="Description"><span class="ph" id="subject"><a name="subject"><!-- --></a>Subject of the email. Specify the subject in
                  case you don't specify an email template.</span></td>

              <td class="entry" headers="d735762e33" data-title="Required or Optional">Optional</td>

              <td class="entry" headers="d735762e27 d735762e35" data-title="Property">50.0</td>

            </tr>

            <tr>
              <td class="entry" headers="d735762e27 d735762e35" data-title="Property"><samp class="codeph apex_code">surveyQuestion​Ids</samp></td>

              <td class="entry" headers="d735762e29" data-title="Type">
                <a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm#apex_methods_system_list" title="Contains methods for the List collection type.">List</a>&lt;String&gt;
              </td>

              <td class="entry" headers="d735762e31" data-title="Description"><span class="ph" id="surveyQuestionIds"><a name="surveyQuestionIds"><!-- --></a>IDs of the questions that are embedded
                  in the email. You can send an email invitation for questions of
                  these types: Net Promoter Score (NPS), rating, and
                  score.</span></td>

              <td class="entry" headers="d735762e33" data-title="Required or Optional">Optional</td>

              <td class="entry" headers="d735762e27 d735762e35" data-title="Property">50.0</td>

            </tr>

          </tbody>
        </table>