Surveys Responses Using Invitation ID (POST, PATCH)

Initialize the process of submitting survey responses and return the details of the first page of the survey by making a POST request. Submit the survey responses using the PATCH request. You can create a survey to collect data from customers, employees, or other people whose feedback you need. The survey responses are stored in the SurveyResponse object and the responses to individual questions in the SurveyQuestionResponse object.

Salesforce Feedback Management (SFM) Business API performance can be impacted if a POST request exceeds 5,400 calls per minute and if a PATCH request exceeds 2,700 calls per minute at the org level. For more rate limit information, see Connect REST API Limits.

The Feedback Management - Starter and Feedback Management - Growth licenses are required to use this resource.

Where SURVEY_ID and SURVEY_INVITATION_ID are variables.

56.0

POST, PATCH

The HTTP header request format only accepts Content-Type: application/json.

<SurveyDescriptionInput>

NameTypeDescriptionRequired or OptionalAvailable Version
invitationSettingsSurvey Invitation Settings InputInvitation settings of the survey. The Invitation ID API doesn’t require the invitation configuration settings to be passed with the Survey Invitations.Required56.0
languageCodeStringCode of the language in which the survey is created.Optional56.0
recipient​Engagement​ContextMap<String, String>Engagement context settings for a recipient of the survey.Optional56.0
relatedRecordIdsString[]IDs of the records that are related to the survey.Optional56.0
shouldLoad​PartiallyCmpl​SurveyBooleanIndicates whether to load partially completed surveys when a partially completed survey is selected (true), or to start a new survey (false). The default value is false.Optional63.0
staticMergeFieldsMap<String, String>Map of static merge field values.Optional56.0

Survey Description Output

<SurveyResponseInput>

Here’s an example for multiple questions.

Here’s an example for a single question.

NameTypeDescriptionRequired or OptionalAvailable Version
flowInterview​StateStringState of the flow interview.Required56.0
invitationIdStringID of the survey invitation.Required56.0
languageCodeStringCode of the language that the survey is created in.Optional56.0
navigationActionStringAvailable navigation actions on the survey page. Possible values are:
  • Back—Navigate to the previous survey page.
  • Next—Navigate to the next survey page.
Required57.0
surveyPage​ResponsesSurvey Page Response InputResponses to the survey questions on a page.Required56.0

Survey Response Output