Send Survey Invitation Actions

Send email survey invitations to leads, contacts, and users in your org based on an action. For example, send a survey invitation when a customer support case closes.

This action is available in API version 47.0 and later.

Special Access Rules 

To access the Send Survey Invitation action, you must have the Feedback Management Survey Response Pack and the Salesforce org enabled with Surveys.

Supported REST HTTP Methods 

URI: /services/data/v47.0/actions/standard/sendSurveyInvitation

Formats: JSON, XML

HTTP Methods: GET, HEAD, POST

Authentication: Authorization: Bearer token

Inputs 

InputTypeDescription
anonymousResponsebooleanIndicates whether the participant’s name is recorded in the response record (true) or not (false).
autoExpiryDaysintegerNumber of days remaining for the survey invitation to expire.
emailTemplateNamestringDeveloper name of the template that contains either the question or the survey link.
isUnauthenticatedResponsebooleanIndicates whether the participant is required to authenticate before starting the survey (true) or not (false).
personalInvitationbooleanIndicates whether the invitation is specific to the recipient (true) or not (false).
recipientreferenceRequired. Salesforce ID of the record that the survey invitation is sent to. The record can be a user (internal invitation) or a contact or a lead (external invitation via community).
surveyNamestringRequired. Developer name of the survey that the invitation is sent for.
surveyQuestionNamestringDeveloper name of the question that’s sent using the invitation.
surveySubjectEntityreferenceID of the record that associates the invitation record with another record.

Outputs 

None.

Example 

GET

This example shows how to get information about the Send Survey Invitation action type.

1curl --include --request GET \
2--header "Authorization: Authorization: Bearer 00DR...xyz" \
3--header "Content-Type: application/json" \
4"https://instance.salesforce.com/services/data/v47.0/actions/standard/sendSurveyInvitation"

POST

Here’s a request for the send survey invitation action.

1{
2   "inputs":[{
3      "surveyName" : "FlowActionSend",
4      "recipient"  : "003RO0000037IRvYAM",
5      "autoExpiryDays" : 6
6   }]
7}

Here’s a response for the send survey invitation action.

1[
2   {
3      "actionName" : "sendSurveyInvitation",
4      "errors" : null,
5      "isSuccess" : true,
6      "outputValues" : null
7   }
8]

See Also