Usage

Use SendEmail to send an email to one or more event invitees or survey respondents.

Basic Steps

  1. Determine the ID of the activity (event, survey, or eMarketing campaign) for which you want to send an email for by calling the Search method.
  2. Determine the ID of the invitees or respondents you want to email. For example, you can call the Search method to retrieve the existing invitee’s or respondent’s ID. If the invitee or respondent does not exist for the event or survey, call the TransferInvitee method to add the contact to the event or survey.
  3. Construct a CvObject array and populate it with the IDs of each invitee or respondent you want to email.
  4. Optionally, specify the MessageId if you need to track the result of each record. Message IDs can represent unique identifiers from your system. Message IDs will be returned as Reference IDs in the result array for your tracking purposes.
  5. Create a SendEmaiRequest object and specify the activity type, activity ID, email template, and if the email should be sent to those who have already received this email template. If you are sending a custom email template, provide the name of the custom email in the EmailName parameter.
  6. Make the SendEmail call.

General Syntax

SendEmailResultArray = cventapi.SendEmail(SendEmailRequest sendEmailReq)

Input

NameTypeDescription
SendEmailRequest.ActivityTypeActivity TypeThe type of activity for which you want to send an email to an Event, Survey, or Campaign.
SendEmailRequest.ActivityIdIDThe ID of the activity for which you want to send an email.
SendEmailRequest.CvObjectsCvObject ArrayArray of one or more CvObject, which contains invitees or respondents IDs to be emailed, and optionally MessageIds which will be returned as ReferenceIds.
SendEmailRequest.EmailTemplateEmail TemplateThe email template to be processed.
SendEmailRequest.EmailNameStringThe name of the custom email to be processed.
SendEmailRequest.ResendToPreviousRecipientsBooleanIndicates whether the SendEmail call should send the email to invitees or respondents that have previously received this email.

Output

NameTypeDescription
IdIDID of the invitee or respondent that you attempted to email.
ReferenceIdIDThe MessageId value in the input CvObject.
SuccessBooleanIndicates whether the SendEmail call succeeded (True) or not (False) for this invitee or respondent. Success indicates the emails were successfully for delivery later.
ErrorsError ArrayIf an error occurred during the SendEmail call, an array of one or more Error objects providing the error code and description.

Validation Rules

The following validation rules should be applied to the SendEmail call:

Validation RuleDescription
StatusesValid event statuses are testing, active, closed, and completed. Valid survey statuses are testing, active, and closed. If an invalid status is exists, the entire operation will fail.
Email TemplatesThe following email templates are valid for events. Invitation CustomInviteeMessage InvitationReminder CustomUndecidedMessage RegistrationConfirmation EventReminder CustomAttendeeMessage ModificationConfirmation CancellationConfirmation Regret CustomDeclinedMessage PostEventFollowup CustomAttendedMessage ApprovalDenied ApprovalPending CustomEmail The following email templates are valid for surveys. SurveyInvitation SurveyCustomInviteeMessage SurveyReminder SurveyCustomNoResponseMessage SurveyPartiallyCompleteMessage SurveyCustomMessageToPartials SurveyCompletionMessage SurveyCustomMessageToRespondents SurveyCustomEmail SurveyInvitationWithQuestion
UniquenessBased on ID, only the first instance of an invitee or respondent in the array be processed.

Notes

Take into account the following notes when using the SendEmail call:

  • Activity and Invitee/Respondent Association: The activity ID must match the event, survey, or campaign associated to the invitee or respondent. If the activity ID does not match, the email will not be sent to that invitee or respondent.
  • Targeted Lists Association: If an invitee or respondent is not associated with a targeted list, the default targeted list will be used.
  • Opt-Outs: Invitees or respondents that have opted-out of receiving emails will not be scheduled and returned for delivery.
  • Maximum Number of Emails Scheduled: You can schedule up to 200 individual emails in a single SendEmail call. If a SendEmail request exceeds 200 invitees or respondents, then the entire operation fails. If the event or survey is in test mode, the maximum number of emails that can be sent is 100.
Last updated on