---
schema_version: "1"
id: 60a04d5fff4b24eabf1c5e668850ee5f543a6fcff5e5cb8ac79b57c019a65fe1
title: SurveyInvitation
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/object_reference/sforce_api_objects_surveyinvitation.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_surveyinvitation.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 2f7d9525b30a20fcc5a430507048d10e285765647bd0d42d1c615e6d472d9a36
description: Represents the invitation sent to a participant to complete the survey.
---
# SurveyInvitation

Represents the invitation sent to a participant to complete the survey.

## Supported Calls

create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(), retrieve(), undelete(), update(), upsert()

## Fields

| Field Name | Details |
| --- | --- |
| CommunityId | 
Type

reference

Properties

Create, Filter, Group, Nillable, Sort

Description

The ID of the Experience Cloud site that you want to send the survey to.



 |
| ContactId | 

Type

reference

Properties

Filter, Group, Nillable, Sort

Description

ID of the contact who received the invitation. This field is available in API v49.0 and later.



 |
| EmailBrandingId | 

Type

reference

Properties

Create, Filter, Group, Nillable, Sort

Description

The ID of the survey email branding object that’s associated with this invitation.



 |
| InvitationLink | 

Type

url

Properties

Group, Nillable

Description

The URL to the survey that is sent to participants. To query on this field, you need access to the associated Survey record.



 |
| InviteExpiryDateTime | 

Type

dateTime

Properties

Create, Filter, Nillable, Sort, Update

Description

The date and time that the survey invitation expires.



 |
| IsDefault | 

Type

boolean

Properties

Create, Defaulted on create, Filter, Group, Sort, Update

Description

Determines whether this is the default survey invitation to use when the survey is sent to participants.



 |
| LastReferencedDate | 

Type

dateTime

Properties

Filter, Nillable, Sort

Description

The timestamp for when the current user last viewed a record related to this survey invitation.



 |
| LastViewedDate | 

Type

dateTime

Properties

Filter, Nillable, Sort

Description

The timestamp for when the current user last viewed this survey invitation.



 |
| LeadId | 

Type

reference

Properties

Filter, Group, Nillable, Sort

Description

ID of the lead who received the invitation. This field is available in API v49.0 and later.



 |
| Name | 

Type

string

Properties

Create, Filter, Group, idLookup, Sort, Update

Description

The name of the survey invitation that appears in the UI.



 |
| OptionsAllowGuestUserResponse | 

Type

boolean

Properties

Create, Filter, Update

Description

Determines whether participants who don’t have a Salesforce account can complete the survey.



 |
| OptionsAllowParticipantAccessTheirResponse | 

Type

boolean

Properties

Create, Filter, Update

Description

Determines whether participants can access a copy of their responses after they complete the survey.



 |
| OptionsCollectAnonymousResponse | 

Type

boolean

Properties

Create, Filter, Update

Description

Determines whether participants can complete the survey anonymously.



 |
| OwnerId | 

Type

reference

Properties

Create, Defaulted on create, Filter, Group, Sort, Update

Description

ID of the user who created the survey invitation.



 |
| ParticipantId | 

Type

reference

Properties

Create, Filter, Group, Nillable, Sort

Description

ID of the participant if the participant is a Salesforce contact, user, or lead.



 |
| ResponseStatus | 

Type

picklist

Properties

Filter, Group, Restricted picklist, Sort

Description

The status of a participant’s response to the survey that’s associated with the survey invitation. Possible values include:

- NotStarted — For an invitation with a ParticipantID, it means that the recipient hasn’t opened the survey. For an invitation without the ParticipantID, it means that none of the recipients have opened the survey.
- Started — For an invitation with a ParticipantID, it means that the recipient opened the survey. For an invitation without the ParticipantID, it means that the survey has been opened by at least one recipient.
- Paused — For an invitation with a ParticipantID, it means that the recipient has paused the survey. For an invitation without the ParticipantID, it means that the survey has been paused by any one of the recipients. Paused isn't available for invitations in which either OptionsAllowParticipantAccessTheirResponse or OptionsCollectAnonymousResponse is true.
- PartiallyCompleted— For an invitation with a ParticipantID field, it means that the recipient has partially completed the survey. For an invitation without the ParticipantID field, it means that at least one recipient has partially completed the survey. Available in API version 63.0 and later.
- Completed — For an invitation with a ParticipantID, it means that the recipient has submitted the survey. For an invitation without the ParticipantID, it means that the invitation has been submitted by at least one recipient.





 |
| SurveyId | 

Type

reference

Properties

Create, Filter, Group, Sort

Description

ID of the survey that’s sent in the invitation.



 |
| UUID | 

Type

string

Properties

Filter, Group, Nillable, Sort

Description

A unique user ID that's added to a survey invitation generated for a contact, lead,or user.



 |
| UserId | 

Type

reference

Properties

Filter, Group, Nillable, Sort

Description

ID of the user who received the invitation. This field is available in API v49.0 and later.



 |

## Associated Objects

This object has the following associated objects. Unless noted, they are available in the same API version as this object.

[SurveyInvitationChangeEvent](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_associated_objects_change_event.htm "A ChangeEvent object is available for each object that supports Change Data Capture. You can subscribe to a stream of change events using Change Data Capture to receive data tied to record changes in Salesforce. Changes include record creation, updates to an existing record, deletion of a record, and undeletion of a record. A change event isn’t a Salesforce object—it doesn’t support CRUD operations or queries. It’s included in the object reference so you can discover which Salesforce objects support change events.") (API version 62.0)

Change events are available for the object.

[SurveyInvitationOwnerSharingRule](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_associated_objects_ownersharingrule.htm "StandardObjectNameOwnerSharingRule is the model for all owner sharing rule objects associated with standard objects. These objects represent a rule for sharing a standard object with users other than the owner.")

Sharing rules are available for the object.

[SurveyInvitationShare](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_associated_objects_share.htm "StandardObjectNameShare is the model for all share objects associated with standard objects. These objects represent a sharing entry on the standard object.")

Sharing is available for the object.