Survey Email Input

Survey email.

Root XML Tag 

<SurveyInvitationEmailInput>

JSON Example 

1{
2 "recipients":["003x0000003j8CEAAY"],
3 "collectAnonymousResponse":false,
4 "allowParticipantsAccessTheirResponse":false,
5 "allowGuestUserResponse":true,
6 "isPersonalInvitation":true,
7 "emailTemplateId":"00Xx0000000LwAuEAK",
8 "surveyQuestionIds":["0Kux000000003yBCAQ"],
9 "invitationExpirationDate":"2020-07-31T21:32:54",
10 "fromEmailAddress":"abeeram@salesforce.com",
11 "invitationOwner":"0054V00000FZTjJ",
12 "shareInvitationsWith":["0054V00000FZTjJ"],
13 "associateRecordsWithRecipients":[{"recipientId":"003x0000003j8CEAAY","associateRecordIds":["001x0000004EWIZAA4"]}],
14 "recipientEngagementContexts":[{"recipientId" : "003x0000003j8CEAAY","recipientEngagementContext":{"TestKey" :"TestValue"}}]
15}

Properties 

NameTypeDescriptionRequired or OptionalAvailable Version
allowGuest​UserResponseBooleanSpecifies whether participants who don’t have a Salesforce account can respond (true) or not (false).Required50.0
allowParticipants​AccessTheir​ResponseBooleanSpecifies whether participants can see their responses (true) or not (false).Required50.0
associateRecords​WithRecipientsSurvey Recipient Survey Subjects Input[]Maps each recipient with another record that must be associated with the recipient’s survey invitation.Optional50.0
bodyStringContent 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:
  • To embed a link to launch the survey: [[SURVEY_INVITATION_URL]]
  • To embed a survey question: {{{SurveyQuestion.QuestionName}}} and {{{SurveyQuestion.QuestionHtmlContent}}}
Optional50.0
collectAnonymous​ResponseBooleanSpecifies whether participants can respond anonymously (true) or not (false).Required50.0
communityIdStringID of the site that’s used to open the survey for users outside your org.Optional50.0
emailTemplateIdStringID 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.Optional50.0
fromEmail​AddressStringEmail ID of the user or the org-wide email address associated with the user’s profile.Required50.0
invitation​ExpirationDateStringDate on which the survey invitation expires.Optional50.0
invitationOwnerStringID of the owner of the survey invitation records.Optional50.0
isPersonal​InvitationBooleanSpecifies whether a unique invitation is created for each participant (true) or not (false). When a participant responds using a personal invitation, the response record is associated with the participant’s Salesforce record.Required50.0
recipient​Engagement​ContextsSurvey Recipient Engagement Context Input[]Maps each recipient with the context based on which the survey invitation is emailed.Optional50.0
recipientsString[]List of up to 300 IDs of leads, contacts, or users to whom the survey invitation is emailed.Required50.0
sendEmail​ThroughUmaBooleanSpecifies whether to send the email through Marketing Cloud (true) or not (false). If unspecified, defaults to false.Optional65.0
shareInvitations​WithString[]IDs of the users with whom the survey invitation records must be shared. The invitation records are shared with Read access.Optional50.0
subjectStringSubject of the email. Specify the subject in case you don’t specify an email template.Optional50.0
surveyQuestion​IdsString[]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.Optional50.0