Show / Hide Table of Contents

Interface IAppointmentAgent

Interface for the Appointment Agent Collection of all services that works with Appointment data.

Namespace: SuperOffice.CRM.Services
Assembly: SuperOffice.Services.dll
Syntax
[Agent("Appointment Agent", "Interface for the Appointment Agent. Collection of all services that works with Appointment data.")]
public interface IAppointmentAgent : IAgent
Examples
using SuperOffice;
using SuperOffice.CRM.Services;

using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
   using (AppointmentAgent agent = new AppointmentAgent())
   {
      // call methods on agent here...
   }
}

Methods

AcceptAsync(int, RecurrenceUpdateMode, CancellationToken)

Accepting an appointment invitation.

Declaration
Task AcceptAsync(int appointmentId, RecurrenceUpdateMode updateMode, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int appointmentId

The appointmentId. Both master and child record ids are accepted.

RecurrenceUpdateMode updateMode

Update mode for a recurring appointment.

CancellationToken cancellationToken
Returns
Type Description
Task

Updated AppointmentEntity

AcceptRejectedAsync(int, RecurrenceUpdateMode, CancellationToken)

Accept that an invited participant has rejected your invitation or assignment.

Declaration
Task<AppointmentEntity> AcceptRejectedAsync(int appointmentId, RecurrenceUpdateMode updateMode, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int appointmentId

The appointmentId. Both master and child record ids are accepted.

RecurrenceUpdateMode updateMode

Update mode for a recurring appointment.

CancellationToken cancellationToken
Returns
Type Description
Task<AppointmentEntity>

Updated AppointmentEntity

AcceptWithEmailConfirmationAsync(int, RecurrenceUpdateMode, CancellationToken)

Accepting an appointment invitation and send an email confirmation to the meeting organizer.

Declaration
Task AcceptWithEmailConfirmationAsync(int appointmentId, RecurrenceUpdateMode updateMode, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int appointmentId

The appointmentId. Both master and child record ids are accepted.

RecurrenceUpdateMode updateMode

Update mode for a recurring appointment.

CancellationToken cancellationToken
Returns
Type Description
Task

Updated AppointmentEntity

AcceptWithSmtpEmailConfirmationAsync(int, RecurrenceUpdateMode, EMailConnectionInfo, CancellationToken)

Accepting an appointment invitation and send an email confirmation to the meeting organizer.

Declaration
Task AcceptWithSmtpEmailConfirmationAsync(int appointmentId, RecurrenceUpdateMode updateMode, EMailConnectionInfo smtpEMailConnectionInfo, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int appointmentId

The appointmentId. Both master and child record ids are accepted.

RecurrenceUpdateMode updateMode

Update mode for a recurring appointment.

EMailConnectionInfo smtpEMailConnectionInfo

Login information for outgoing smtp email server. Will be null if no login information is relevant.

CancellationToken cancellationToken
Returns
Type Description
Task

Updated AppointmentEntity

AssignToAsync(int, ParticipantInfo, RecurrenceUpdateMode, CancellationToken)

Assigning an appointment to another person.

Declaration
Task<AppointmentEntity> AssignToAsync(int appointmentId, ParticipantInfo participant, RecurrenceUpdateMode updateMode, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int appointmentId

The appointmentId. Both master and child record ids are accepted.

ParticipantInfo participant
RecurrenceUpdateMode updateMode

Update mode for a recurring appointment.

CancellationToken cancellationToken
Returns
Type Description
Task<AppointmentEntity>

Updated AppointmentEntity

CalculateDaysAsync(AppointmentEntity, CancellationToken)

Calculates the set of dates that represents a recurrence pattern. Adds conflict information to each date.

Declaration
Task<RecurrenceInfo> CalculateDaysAsync(AppointmentEntity appointmentEntity, CancellationToken cancellationToken = default)
Parameters
Type Name Description
AppointmentEntity appointmentEntity
CancellationToken cancellationToken
Returns
Type Description
Task<RecurrenceInfo>

CanAssignToProjectMemberAsync(int, int, CancellationToken)

Interface for the Appointment Agent Collection of all services that works with Appointment data.

Declaration
Task<bool> CanAssignToProjectMemberAsync(int projectId, int suggestedAppointmentId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int projectId
int suggestedAppointmentId
CancellationToken cancellationToken
Returns
Type Description
Task<bool>

CleanUpBookingDeletedAsync(int[], CancellationToken)

Deletes all appointments(within the appointmentIds array) with status BookingDeleted.

Declaration
Task<int> CleanUpBookingDeletedAsync(int[] appointmentIds, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int[] appointmentIds
CancellationToken cancellationToken
Returns
Type Description
Task<int>

Number of modified or deleted appointments

CleanUpBookingDeletedWithUpdateModeAsync(int[], RecurrenceUpdateMode, CancellationToken)

Deletes all appointments(within the appointmentIds array) with status BookingDeleted. All appointments in the list will be deleted using the same recurrence update mode.

Declaration
Task CleanUpBookingDeletedWithUpdateModeAsync(int[] appointmentIds, RecurrenceUpdateMode updateMode, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int[] appointmentIds

List of appointment IDs

RecurrenceUpdateMode updateMode

Update mode

CancellationToken cancellationToken
Returns
Type Description
Task

CleanUpRecurringBookingDeletedAsync(CancellationToken)

Deletes all appointments with status BookingDeleted and for in logged user.

Declaration
Task<int> CleanUpRecurringBookingDeletedAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
CancellationToken cancellationToken
Returns
Type Description
Task<int>

ConvertAppointmentToTaskAsync(int, CancellationToken)

Convert appointment to task if certain criteria are met (participants < 2)

Declaration
Task<AppointmentEntity> ConvertAppointmentToTaskAsync(int appointmentId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int appointmentId

Appointment ID

CancellationToken cancellationToken
Returns
Type Description
Task<AppointmentEntity>

Appointment entity

CreateAndAcceptAsync(int, RecurrenceUpdateMode, CancellationToken)

Creating an appointment from an emailItem invitation and accepting it.

Declaration
Task CreateAndAcceptAsync(int emailItemId, RecurrenceUpdateMode updateMode, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int emailItemId

The emailItemId

RecurrenceUpdateMode updateMode

Update mode for a recurring appointment.

CancellationToken cancellationToken
Returns
Type Description
Task

CreateAndAcceptWithEmailConfirmationAsync(int, RecurrenceUpdateMode, CancellationToken)

Creating an appointment from an emailItem invitation and accepting it with email confirmation to the meeting organizer.

Declaration
Task CreateAndAcceptWithEmailConfirmationAsync(int emailItemId, RecurrenceUpdateMode updateMode, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int emailItemId

The emailItemId

RecurrenceUpdateMode updateMode

Update mode for a recurring appointment.

CancellationToken cancellationToken
Returns
Type Description
Task

CreateAppointmentEntityFromExistingAsync(int, int, CancellationToken)

Creates an AppointmentEntity populated with values from an existing appointment. The new appointment will get the same task type and participant list as the source appointment. The date of the new appointment will be set to today, but the time component is kept.

Declaration
Task<AppointmentEntity> CreateAppointmentEntityFromExistingAsync(int appointmentId, int associateId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int appointmentId

Source appointment ID

int associateId

Associate owning the new appointment. If 0 the current associate is used.

CancellationToken cancellationToken
Returns
Type Description
Task<AppointmentEntity>

AppointmentEntity with values copied from an existing appointment. Values that are not copied will be the default values.

CreateAppointmentForUIDAsync(AppointmentEntity, string, CancellationToken)

Create an invitation record and an appointment with a given UID to reserve it if the UID is unused, otherwise null.

Declaration
Task<AppointmentEntity> CreateAppointmentForUIDAsync(AppointmentEntity appointmentEntity, string uID, CancellationToken cancellationToken = default)
Parameters
Type Name Description
AppointmentEntity appointmentEntity
string uID

The UID associated with the appointment

CancellationToken cancellationToken
Returns
Type Description
Task<AppointmentEntity>

The newly created AppointmentEntity or null if the UID is in the DB already.

CreateDefaultAppointmentEntityAsync(CancellationToken)

Loading default values into a new AppointmentEntity.

Declaration
Task<AppointmentEntity> CreateDefaultAppointmentEntityAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
CancellationToken cancellationToken
Returns
Type Description
Task<AppointmentEntity>

New AppointmentEntity with default values

CreateDefaultAppointmentEntityByTypeAndAssociateAsync(TaskType, int, CancellationToken)

Creates a AppointmentEntity populated with the default values for the specific type and owner.

Declaration
Task<AppointmentEntity> CreateDefaultAppointmentEntityByTypeAndAssociateAsync(TaskType type, int associateId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
TaskType type

The type of task requested.

int associateId

The associateId of the appointment owner.

CancellationToken cancellationToken
Returns
Type Description
Task<AppointmentEntity>

AppointmentEntity with default values.

CreateDefaultAppointmentEntityByTypeAsync(TaskType, CancellationToken)

Creates an AppointmentEntity populated with the default values for the specific type.

Declaration
Task<AppointmentEntity> CreateDefaultAppointmentEntityByTypeAsync(TaskType type, CancellationToken cancellationToken = default)
Parameters
Type Name Description
TaskType type

The type of task requested.

CancellationToken cancellationToken
Returns
Type Description
Task<AppointmentEntity>

AppointmentEntity with default values.

CreateDefaultAppointmentEntityFromProjectSuggestionAsync(int, int, bool, int, CancellationToken)

Interface for the Appointment Agent Collection of all services that works with Appointment data.

Declaration
Task<AppointmentEntity> CreateDefaultAppointmentEntityFromProjectSuggestionAsync(int suggestedAppointmentId, int projectId, bool createNow, int ownerId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int suggestedAppointmentId
int projectId
bool createNow
int ownerId
CancellationToken cancellationToken
Returns
Type Description
Task<AppointmentEntity>

CreateDefaultAppointmentEntityFromSaleSuggestionAsync(int, int, bool, int, CancellationToken)

Creates an appointment based on a suggested appointment.

Declaration
Task<AppointmentEntity> CreateDefaultAppointmentEntityFromSaleSuggestionAsync(int suggestedAppointmentId, int saleId, bool createNow, int ownerId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int suggestedAppointmentId

The id of the suggested appointment

int saleId

This is the id of the sale the appointment is connected to. This will be used to give the appointment it's starting date. If the id is 0 or invalid, we assume the start date is now

bool createNow

If this parameter is true, we override the suggested start time and create the appointment with the current date and time

int ownerId
CancellationToken cancellationToken
Returns
Type Description
Task<AppointmentEntity>

The newly created appointment

CreateDefaultReOpenAppointmentAsync(int, CancellationToken)

A re-open appointment should be created as a reminder to re-open the sale at a certain date with information regarding the stalled sale.

Declaration
Task<AppointmentEntity> CreateDefaultReOpenAppointmentAsync(int saleId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int saleId

The identifier of the stalled sale from which we create a re-open appointment

CancellationToken cancellationToken
Returns
Type Description
Task<AppointmentEntity>

The re-open appointment with start date = the re-open date of the sale and a description matching the sales stalled reason.

CreateDefaultRecurrenceAsync(CancellationToken)

Creates a RecurrenceInfo object populated with the default values for the specific type.

Declaration
Task<RecurrenceInfo> CreateDefaultRecurrenceAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
CancellationToken cancellationToken
Returns
Type Description
Task<RecurrenceInfo>

RecurrenceInfo object with default values.

CreateDefaultRecurrenceByDateAsync(DateTime, CancellationToken)

Creates a RecurrenceInfo object populated with the default values for the specific type. Using startDate as start date for the recurreing pattern.

Declaration
Task<RecurrenceInfo> CreateDefaultRecurrenceByDateAsync(DateTime startDate, CancellationToken cancellationToken = default)
Parameters
Type Name Description
DateTime startDate

Date of which the recurring pattern should start.

CancellationToken cancellationToken
Returns
Type Description
Task<RecurrenceInfo>

CreateDefaultSuggestedAppointmentEntityAsync(CancellationToken)

Loading default values into a new SuggestedAppointmentEntity.

Declaration
Task<SuggestedAppointmentEntity> CreateDefaultSuggestedAppointmentEntityAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
CancellationToken cancellationToken
Returns
Type Description
Task<SuggestedAppointmentEntity>

New SuggestedAppointmentEntity with default values

CreateDefaultTaskListItemAsync(CancellationToken)

Loading default values into a new TaskListItem.

Declaration
Task<TaskListItem> CreateDefaultTaskListItemAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
CancellationToken cancellationToken
Returns
Type Description
Task<TaskListItem>

New TaskListItem with default values

CreateVideoMeetingReservationAsync(CancellationToken)

Create a VideoMeetingReservation. System users are not allowed to create video meeting reservations

Declaration
Task<VideoMeetingReservation> CreateVideoMeetingReservationAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
CancellationToken cancellationToken
Returns
Type Description
Task<VideoMeetingReservation>

The created VideoMeetingReservation.

DeclineInvitationFromEmailItemAsync(int, string, CancellationToken)

Declining an appointment invitation where no tentative appointments have been created.

Declaration
Task DeclineInvitationFromEmailItemAsync(int emailItemId, string rejectReason, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int emailItemId

The emailItemId.

string rejectReason

The reason the invitation was rejected.

CancellationToken cancellationToken
Returns
Type Description
Task

DeleteAppointmentEntityAsync(int, CancellationToken)

Deletes the AppointmentEntity

Declaration
Task DeleteAppointmentEntityAsync(int appointmentEntityId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int appointmentEntityId

The identity of the AppointmentEntity

CancellationToken cancellationToken
Returns
Type Description
Task

This method has no return value

DeleteAsync(int, RecurrenceUpdateMode, bool, EMailConnectionInfo, EMailConnectionInfo, CancellationToken)

Deleting a booking

Declaration
Task DeleteAsync(int appointmentId, RecurrenceUpdateMode updateMode, bool sendEmailToParticipants, EMailConnectionInfo smtpEMailConnectionInfo, EMailConnectionInfo imapEMailConnectionInfo, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int appointmentId

The appointmentId. Both master and child record ids are accepted.

RecurrenceUpdateMode updateMode

Update mode for a recurring appointment.

bool sendEmailToParticipants

If true, emails will be sent to all participants that is marked with send email flag. If false no mails will be sent even if the send email flag is true.

EMailConnectionInfo smtpEMailConnectionInfo

Login information for outgoing smtp email server. Will be null if no login information is relevant.

EMailConnectionInfo imapEMailConnectionInfo

Login information for imap server. Will be null if no login information is relevant.

CancellationToken cancellationToken
Returns
Type Description
Task

DeleteVideoMeetingReservationAsync(string, CancellationToken)

Delete a VideoMeetingReservation.

Declaration
Task DeleteVideoMeetingReservationAsync(string videoMeetingId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string videoMeetingId

The VideoMeetingReservation.VideoMeetingId to remove. System users are not allowed to delete video meeting reservations

CancellationToken cancellationToken
Returns
Type Description
Task

GenerateLeadAsync(int, string, string, int, string, string, string, string, string, string, string, string, CancellationToken)

Adds a sales lead (task) to a contact in SuperOffice. If the contact or person is known, the sales lead is added to the current contact. If not, a new contact is created, with the associate with ownerIdForNewContact as responsible (Our Contact). A relation is created between the contact and the person submitting the lead. Based on wether the person the request is made for is found or not, the following happens: If the person is found, the person, person's contact and sales representative is returned. If neither the person nor the contact is found a new person and contact is created (if sufficient data is supplied), and the person, person's contact and sales representative is returned. If the contact and not the person is found a new person is created on this contact, and the contact, salesrep, and person is returned (if there was enough data to return the person). If more than one contact is found a list of contacts is returned.

Declaration
Task<SalesActivity> GenerateLeadAsync(int associateIdForNewContact, string leadDescription, string relation, int relationId, string leadContact, string leadPersonFirstname, string leadPersonLastname, string leadPersonEmail, string leadPhoneNumber, string creatorsContact, string creatorsFirstname, string creatorsLastname, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int associateIdForNewContact

Associate id of the person set as "Our Contact" if a new Contact is created. Ensures that the sales lead is assigned to the correct salesman.

string leadDescription

Description of the lead. The lead text as shown in SuperOffice

string relation

The relation the person submitting the lead has to the contact.

int relationId

Id of the relation type. Database specific.

string leadContact

Name of the new or existing contact (company) the lead is created for.

string leadPersonFirstname

Firstname of the contact's person.

string leadPersonLastname

Lastname of the contact's person.

string leadPersonEmail

Email to the contact's person.

string leadPhoneNumber

Phone number of the contact or contact's person.

string creatorsContact

The contact (company) of the person creating the lead

string creatorsFirstname

The firstname of the person creating the lead

string creatorsLastname

The lastname of the person creating the lead

CancellationToken cancellationToken
Returns
Type Description
Task<SalesActivity>

True if successfull.

GetActivityInformationListByDatesAndAssociateAsync(DateTime, DateTime, int, CancellationToken)

Get activity information for one or more days according to the given date interval. The time portion of the dates is ignored. Private appointments are counted, but may not be visible through tooltips or other more detailed services.

Declaration
Task<ActivityInformationListItem[]> GetActivityInformationListByDatesAndAssociateAsync(DateTime startDate, DateTime endDate, int associateId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
DateTime startDate

Start date of interval. Time portion is ignored.

DateTime endDate

End date of interval. Time portion is ignored.

int associateId

Associate id to identify the calendar to scan. If 0 is passed in, the currently authenticated associate is used instead.

CancellationToken cancellationToken
Returns
Type Description
Task<ActivityInformationListItem[]>

Exactly one item per day of the given time span is returned. Days where nothing happens will have all values set to 0, but will still be in the returned array. Start end dates are treated as inclusive.

GetAlarmsAsync(bool, bool, int, CancellationToken)

Interface for the Appointment Agent Collection of all services that works with Appointment data.

Declaration
Task<MultiAlarmData> GetAlarmsAsync(bool includeInvitations, bool includeAllAppointments, int defaultAlarmLeadTimeInMinutes, CancellationToken cancellationToken = default)
Parameters
Type Name Description
bool includeInvitations
bool includeAllAppointments
int defaultAlarmLeadTimeInMinutes
CancellationToken cancellationToken
Returns
Type Description
Task<MultiAlarmData>

GetAppointmentAsync(int, CancellationToken)

Gets a Appointment object.

Declaration
Task<Appointment> GetAppointmentAsync(int appointmentId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int appointmentId

The identifier of the Appointment object

CancellationToken cancellationToken
Returns
Type Description
Task<Appointment>

A single Appointment

GetAppointmentEmailInvitationAsync(AppointmentEntity, string, string, CancellationToken)

Create an EMailEntity (without an ical attachment) with the email sent to participants when the appointment is saved

Declaration
Task<EMailEntity> GetAppointmentEmailInvitationAsync(AppointmentEntity appointment, string templateName, string language, CancellationToken cancellationToken = default)
Parameters
Type Name Description
AppointmentEntity appointment

The appointment carrier with changes made.

string templateName

Filename of invitation template

string language

The desired SO-language for the template

CancellationToken cancellationToken
Returns
Type Description
Task<EMailEntity>

Email entity with the preview in HTMLBody

GetAppointmentEntityAsync(int, CancellationToken)

Gets a AppointmentEntity object.

Declaration
Task<AppointmentEntity> GetAppointmentEntityAsync(int appointmentEntityId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int appointmentEntityId

The identifier of the AppointmentEntity object

CancellationToken cancellationToken
Returns
Type Description
Task<AppointmentEntity>

A single AppointmentEntity

GetAppointmentFromUIDAsync(string, CancellationToken)

Get the appointment that corresponds to the given UID.

Declaration
Task<AppointmentEntity> GetAppointmentFromUIDAsync(string uID, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string uID

The UID associated with the appointment

CancellationToken cancellationToken
Returns
Type Description
Task<AppointmentEntity>

The corresponding AppointmentEntity if exists or a default appointment entity.

GetAppointmentHaveParticipantsWithEmailAsync(int, CancellationToken)

GetAppointmentHaveParticipantsWithEmail will check if any of the participants is marked to receive emails on this appointment. If no participants are defined, false will be returned.

Declaration
Task<bool> GetAppointmentHaveParticipantsWithEmailAsync(int appointmentId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int appointmentId

The appointmentId.

CancellationToken cancellationToken
Returns
Type Description
Task<bool>

Return true or false.

GetAppointmentListAsync(int[], CancellationToken)

Gets an array of Appointment objects.

Declaration
Task<Appointment[]> GetAppointmentListAsync(int[] appointmentIds, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int[] appointmentIds

The identifiers of the Appointment object

CancellationToken cancellationToken
Returns
Type Description
Task<Appointment[]>

Array of Appointment

GetAppointmentRecordsAsync(int, int, CancellationToken)

Get all records involved in a booking and/or recurring appointments. MotherId can be zero for repeating appointments or bookings, and recurrenceRuleId can be zero for bookings that are not repeating.

Declaration
Task<Appointment[]> GetAppointmentRecordsAsync(int motherId, int recurrenceRuleId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int motherId

Appointment id of the owner of a booking

int recurrenceRuleId

RecurrenceId of a recuring appointment

CancellationToken cancellationToken
Returns
Type Description
Task<Appointment[]>

GetAppointmentsByTaskHeadingAsync(int, CancellationToken)

Method that returns appointments of a specific appointment task heading. Task represents the different types of activities, like “Phone call”, “Meeting” and so on. The heading represents a grouping or filtering of tasks.

Declaration
Task<Appointment[]> GetAppointmentsByTaskHeadingAsync(int taskHeadingId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int taskHeadingId

The task heading id. The heading represents a grouping or filtering of tasks. Task represents the different types of activities, like “Phone call”, “Meeting” and so on

CancellationToken cancellationToken
Returns
Type Description
Task<Appointment[]>

Array of Appointments.

GetAssociateDiaryAsync(int, DateTime, DateTime, int, CancellationToken)

Interface for the Appointment Agent Collection of all services that works with Appointment data.

Declaration
Task<Appointment[]> GetAssociateDiaryAsync(int associateId, DateTime startTime, DateTime endTime, int count, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int associateId
DateTime startTime
DateTime endTime
int count
CancellationToken cancellationToken
Returns
Type Description
Task<Appointment[]>

GetAssociatesDiaryAsync(int[], DateTime, DateTime, CancellationToken)

Fetch appointments for given associates

Declaration
Task<Appointment[]> GetAssociatesDiaryAsync(int[] associateIds, DateTime startTime, DateTime endTime, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int[] associateIds
DateTime startTime
DateTime endTime
CancellationToken cancellationToken
Returns
Type Description
Task<Appointment[]>

GetAssociatesDiaryInfoAsync(int[], DateTime, DateTime, CancellationToken)

Fetch appointment info for given associates

Declaration
Task<AppointmentInfo[]> GetAssociatesDiaryInfoAsync(int[] associateIds, DateTime startTime, DateTime endTime, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int[] associateIds
DateTime startTime
DateTime endTime
CancellationToken cancellationToken
Returns
Type Description
Task<AppointmentInfo[]>

GetCanInsertForAssociatesAsync(int[], CancellationToken)

Check if current associate can create appointments in the diary of other associates.

Declaration
Task<bool[]> GetCanInsertForAssociatesAsync(int[] associateIds, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int[] associateIds

Array of associate ids to check for.

CancellationToken cancellationToken
Returns
Type Description
Task<bool[]>

Returns an array of bool corresponding to the associate array input parameter.

GetContactAppointmentsAsync(int, DateTime, DateTime, int, CancellationToken)

Method that returns a specified number of appointments within a time range. The appointments belong to the contact specified. If the logged on user is not allowed to view this persons appointments an exception is thrown.

Declaration
Task<Appointment[]> GetContactAppointmentsAsync(int contactId, DateTime startTime, DateTime endTime, int count, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int contactId

The contact id

DateTime startTime

The start of the time interval we want appointments from. This will usually be the current time.

DateTime endTime

The end of the time interval.

int count

The maximum number of appointments that should be returned. -1 means no count restrictions.

CancellationToken cancellationToken
Returns
Type Description
Task<Appointment[]>

Array of Appointments.

GetContactAppointmentsByTaskAsync(int, DateTime, DateTime, int, int, CancellationToken)

Method that returns a specified number of appointments of a specific appointment task type within a time range. The appointments belong to the contact specified. Task represents the different types of activities, like “Phone call”, “Meeting” and so on.

Declaration
Task<Appointment[]> GetContactAppointmentsByTaskAsync(int contactId, DateTime startTime, DateTime endTime, int count, int taskId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int contactId

The contact id

DateTime startTime

The start of the time interval we want appointments from. This will usually be the current time.

DateTime endTime

The end of the time interval.

int count

The maximum number of appointments that should be returned. -1 means no count restrictions.

int taskId

The task id. Task represents the different types of activities, like “Phone call”, “Meeting” and so on.

CancellationToken cancellationToken
Returns
Type Description
Task<Appointment[]>

Array of Appointments.

GetContactAppointmentsByTaskHeadingAsync(int, DateTime, DateTime, int, int, CancellationToken)

Method that returns a specified number of appointments of a specific appointment task heading within a time range. The appointments belong to the contact specified. Task represents the different types of activities, like “Phone call”, “Meeting” and so on. The heading represents a grouping or filtering of tasks.

Declaration
Task<Appointment[]> GetContactAppointmentsByTaskHeadingAsync(int contactId, DateTime startTime, DateTime endTime, int count, int taskHeadingId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int contactId

The contact id

DateTime startTime

The start of the time interval we want appointments from. This will usually be the current time.

DateTime endTime

The end of the time interval.

int count

The maximum number of appointments that should be returned. -1 means no count restrictions.

int taskHeadingId

The task heading id. The heading represents a grouping or filtering of tasks. Task represents the different types of activities, like “Phone call”, “Meeting” and so on.

CancellationToken cancellationToken
Returns
Type Description
Task<Appointment[]>

Array of Appointments.

GetContactAppointmentsByTasksAsync(int, DateTime, DateTime, int, int[], CancellationToken)

Method that returns a specified number of appointments belonging to an array of appointment task types within a time range. The appointments belong to the contact specified. Task represents the different types of activities, like “Phone call”, “Meeting” and so on.

Declaration
Task<Appointment[]> GetContactAppointmentsByTasksAsync(int contactId, DateTime startTime, DateTime endTime, int count, int[] taskIds, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int contactId

The contact id

DateTime startTime

The start of the time interval we want appointments from. This will usually be the current time.

DateTime endTime

The end of the time interval.

int count

The maximum number of appointments that should be returned. -1 means no count restrictions.

int[] taskIds

The task ids as an integer array. Task represents the different types of activities, like “Phone call”, “Meeting” and so on.

CancellationToken cancellationToken
Returns
Type Description
Task<Appointment[]>

Array of Appointments.

GetContactAppointmentsByTypeAsync(int, DateTime, DateTime, int, AppointmentType, CancellationToken)

Method that returns a specified number of appointments of a specific appointment type within a time range. The appointments belong to the contact specified. If the logged on user is not allowed to view this contacts appointments an exception is thrown.

Declaration
Task<Appointment[]> GetContactAppointmentsByTypeAsync(int contactId, DateTime startTime, DateTime endTime, int count, AppointmentType appointmentType, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int contactId

The contact id

DateTime startTime

The start of the time interval we want appointments from. This will usually be the current time.

DateTime endTime

The end of the time interval.

int count

The maximum number of appointments that should be returned. -1 means no count restrictions.

AppointmentType appointmentType

The appointment type, e.g. inDiary, inChecklist etc.

CancellationToken cancellationToken
Returns
Type Description
Task<Appointment[]>

Array of Appointments.

GetDayInformationListByDatesAndAssociateAsync(DateTime, DateTime, int, CancellationToken)

Get combined day information (activity + redletter summary) for one or more days according to the given date interval. The time portion of the dates is ignored. Private appointments are counted, but may not be visible through tooltips or other more detailed services.

Declaration
Task<DayInformationListItem[]> GetDayInformationListByDatesAndAssociateAsync(DateTime startDate, DateTime endDate, int associateId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
DateTime startDate

Start date of interval. Time portion is ignored.

DateTime endDate

End date of interval. Time portion is ignored.

int associateId

Associate id to identify the calendar to scan. If 0 is passed in, the currently authenticated associate is used instead.

CancellationToken cancellationToken
Returns
Type Description
Task<DayInformationListItem[]>

Exactly one item per day of the given time span is returned. Days where nothing happens will have all values set to 0, but will still be in the returned array. Start end dates are treated as inclusive.

GetDiaryByGroupAsync(int, int, DateTime, DateTime, int, CancellationToken)

Interface for the Appointment Agent Collection of all services that works with Appointment data.

Declaration
Task<Appointment[]> GetDiaryByGroupAsync(int groupId, int groupType, DateTime startTime, DateTime endTime, int count, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int groupId
int groupType
DateTime startTime
DateTime endTime
int count
CancellationToken cancellationToken
Returns
Type Description
Task<Appointment[]>

GetMyAppointmentsAsync(DateTime, DateTime, int, CancellationToken)

Method that returns a specified number of appointments within a time range. The appointments belong to the currently logged on user.

Declaration
Task<Appointment[]> GetMyAppointmentsAsync(DateTime startTime, DateTime endTime, int count, CancellationToken cancellationToken = default)
Parameters
Type Name Description
DateTime startTime

The start of the time interval we want appointments from. This will usually be the current time.

DateTime endTime

The end of the time interval.

int count

The maximum number of appointments that should be returned. -1 means no count restrictions.

CancellationToken cancellationToken
Returns
Type Description
Task<Appointment[]>

Array of Appointments.

GetMyDiaryAsync(DateTime, DateTime, int, CancellationToken)

Method that returns a specified number of appointments within a time range. It only returns appointments that would be displayed in the user's diary. The appointments belong to the currently logged on user.

Declaration
Task<Appointment[]> GetMyDiaryAsync(DateTime startTime, DateTime endTime, int count, CancellationToken cancellationToken = default)
Parameters
Type Name Description
DateTime startTime

The start of the time interval we want appointments from. This will usually be the current time.

DateTime endTime

The end of the time interval.

int count

The maximum number of appointments that should be returned. -1 means no count restrictions.

CancellationToken cancellationToken
Returns
Type Description
Task<Appointment[]>

Array of Appointments.

GetMyPublishedAppointmentsAsync(CancellationToken)

Get published appointments from the logged in user.

Declaration
Task<Appointment[]> GetMyPublishedAppointmentsAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
CancellationToken cancellationToken
Returns
Type Description
Task<Appointment[]>

Appointments

GetMySyncAppointmentsAsync(DateTime, DateTime, CancellationToken)

Method that returns a specified number of appointments within a time range. The appointments belong to the currently logged on user.

Declaration
Task<AppointmentSyncData[]> GetMySyncAppointmentsAsync(DateTime startTime, DateTime endTime, CancellationToken cancellationToken = default)
Parameters
Type Name Description
DateTime startTime

The start of the time interval in which we want appointments. This will usually be the current time.

DateTime endTime

The end of the time interval.

CancellationToken cancellationToken
Returns
Type Description
Task<AppointmentSyncData[]>

Array of Appointments.

GetMyTasksAsync(int, CancellationToken)

Method that returns a specified number of appointments within a time range. It only returns appointments that would be displayed in the user's task list. The appointments belong to the currently logged on user.

Declaration
Task<Appointment[]> GetMyTasksAsync(int count, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int count

The maximum number of appointments that should be returned. -1 means no count restrictions.

CancellationToken cancellationToken
Returns
Type Description
Task<Appointment[]>

Array of Appointments.

GetNextAvailableTimeAsync(int[], DateTime, DateTime, int, bool, CancellationToken)

An array of the soonest-available working time slots.

Declaration
Task<NextAvailableTime[]> GetNextAvailableTimeAsync(int[] associates, DateTime startTime, DateTime endTime, int count, bool isAllDay, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int[] associates

Associate participants we want to account for while finding the next available times.

DateTime startTime

The start of the time interval we want appointments from.

DateTime endTime

The end of the time interval.

int count

How many next-available date time slots should be returned.

bool isAllDay

Is the appointment an all day event.

CancellationToken cancellationToken
Returns
Type Description
Task<NextAvailableTime[]>

Array of the soonest-available working time slots.

GetNextSuggestedAppointmentBySaleAsync(int, int, bool, CancellationToken)

Gets the next suggested appointment for a given sale (or rather a given sale's guide).

Declaration
Task<SuggestedAppointment> GetNextSuggestedAppointmentBySaleAsync(int saleId, int currentAppointmentId, bool skipCompleteCheck, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int saleId

The identifier of the (guided) sale from which we want to find a suggested appointment

int currentAppointmentId

The identifier of the appointment from which we calculate the next suggestion. The next suggested appointment is the subsequent appointment defined in the SoAdmin's sales guide.

bool skipCompleteCheck

If you want to get the next appointment step in a sales guide for an appointment which is not completed, this value must be true. In all other cases, this value should be false, as it would return the value of null if the current appointment is not completes.

CancellationToken cancellationToken
Returns
Type Description
Task<SuggestedAppointment>

The next suggestion based on the sale id of a guided sale and the id of the current apopintment. If we cannot find a next suggestion or the sale is not guided (or if any of the paramters are invalid), we will return null.

GetOrganizerNameAsync(int, CancellationToken)

Lookup the name / email of an event-organizer

Declaration
Task<string> GetOrganizerNameAsync(int motherAppointmentId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int motherAppointmentId

The id of the mother-appointment.

CancellationToken cancellationToken
Returns
Type Description
Task<string>

The displayed name of the organizer: name or email

GetPersonAppointmentsAsync(int, bool, DateTime, DateTime, int, CancellationToken)

Method that returns a specified number of appointments within a time range. The appointments belong to the person specified. If the person not is a SuperOffice user (associate) or the logged on user is not allowed to view this persons appointments an exception is thrown.

Declaration
Task<Appointment[]> GetPersonAppointmentsAsync(int personId, bool includeProjectAppointments, DateTime startTime, DateTime endTime, int count, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int personId

The person id of the SuperOffice user (associate).

bool includeProjectAppointments

If true, all appointments that belong to projects where the user is a project member are included as well as the appointments belonging to the person.

DateTime startTime

The start of the time interval we want appointments from. This will usually be the current time.

DateTime endTime

The end of the time interval.

int count

The maximum number of appointments that should be returned. -1 means no count restrictions.

CancellationToken cancellationToken
Returns
Type Description
Task<Appointment[]>

Array of Appointments.

GetPersonAppointmentsByTaskAsync(int, bool, DateTime, DateTime, int, int, CancellationToken)

Method that returns a specified number of appointments of a specific appointment task type within a time range. The appointments belong to the person specified. Task represents the different types of activities, like “Phone call”, “Meeting” and so on.

Declaration
Task<Appointment[]> GetPersonAppointmentsByTaskAsync(int personId, bool includeProjectAppointments, DateTime startTime, DateTime endTime, int count, int taskId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int personId

The person id of the SuperOffice user (associate).

bool includeProjectAppointments

If true, all appointments that belong to projects where the user is a project member are included as well as the appointments belonging to the person.

DateTime startTime

The start of the time interval we want appointments from. This will usually be the current time.

DateTime endTime

The end of the time interval.

int count

The maximum number of appointments that should be returned. -1 means no count restrictions.

int taskId

The task id. Task represents the different types of activities, like “Phone call”, “Meeting” and so on.

CancellationToken cancellationToken
Returns
Type Description
Task<Appointment[]>

Array of Appointments.

GetPersonAppointmentsByTaskHeadingAsync(int, bool, DateTime, DateTime, int, int, CancellationToken)

Method that returns a specified number of appointments of a specific appointment task heading within a time range. The appointments belong to the person specified. Task represents the different types of activities, like “Phone call”, “Meeting” and so on. The heading represents a grouping or filtering of tasks.

Declaration
Task<Appointment[]> GetPersonAppointmentsByTaskHeadingAsync(int personId, bool includeProjectAppointments, DateTime startTime, DateTime endTime, int count, int taskHeadingId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int personId

The person id of the SuperOffice user (associate).

bool includeProjectAppointments

If true, all appointments that belong to projects where the user is a project member are included as well as the appointments belonging to the person.

DateTime startTime

The start of the time interval we want appointments from. This will usually be the current time.

DateTime endTime

The end of the time interval.

int count

The maximum number of appointments that should be returned. -1 means no count restrictions.

int taskHeadingId

The task heading id. The heading represents a grouping or filtering of tasks. Task represents the different types of activities, like “Phone call”, “Meeting” and so on.

CancellationToken cancellationToken
Returns
Type Description
Task<Appointment[]>

Array of Appointments.

GetPersonAppointmentsByTasksAsync(int, bool, DateTime, DateTime, int, int[], CancellationToken)

Method that returns a specified number of appointments from a list of appointment task types within a time range. The appointments belong to the person specified. Task represents the different types of activities, like “Phone call”, “Meeting” and so on.

Declaration
Task<Appointment[]> GetPersonAppointmentsByTasksAsync(int personId, bool includeProjectAppointments, DateTime startTime, DateTime endTime, int count, int[] taskIds, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int personId

The person id of the SuperOffice user (associate).

bool includeProjectAppointments

If true, all appointments that belong to projects where the user is a project member are included as well as the appointments belonging to the person.

DateTime startTime

The start of the time interval we want appointments from. This will usually be the current time.

DateTime endTime

The end of the time interval.

int count

The maximum number of appointments that should be returned. -1 means no count restrictions.

int[] taskIds

The task ids as an integer array. Task represents the different types of activities, like “Phone call”, “Meeting” and so on.

CancellationToken cancellationToken
Returns
Type Description
Task<Appointment[]>

Array of Appointments.

GetPersonAppointmentsByTypeAsync(int, bool, DateTime, DateTime, int, AppointmentType, CancellationToken)

Method that returns a specified number of appointments of a specific appointment type within a time range. The appointments belong to the person specified.

Declaration
Task<Appointment[]> GetPersonAppointmentsByTypeAsync(int personId, bool includeProjectAppointments, DateTime startTime, DateTime endTime, int count, AppointmentType appointmentType, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int personId

The person id of the SuperOffice user (associate).

bool includeProjectAppointments

If true, all appointments that belong to projects where the user is a project member are included as well as the appointments belonging to the person.

DateTime startTime

The start of the time interval we want appointments from. This will usually be the current time.

DateTime endTime

The end of the time interval.

int count

The maximum number of appointments that should be returned. -1 means no count restrictions.

AppointmentType appointmentType

The appointment type, e.g. inDiary, inChecklist etc.

CancellationToken cancellationToken
Returns
Type Description
Task<Appointment[]>

Array of Appointments.

GetPersonDiaryAsync(int, DateTime, DateTime, int, CancellationToken)

Method that returns a specified number of appointments within a time range. It only returns appointments that would be displayed in the user's diary. The appointments belong to the person specified. If the person not is a SuperOffice user (associate) or the logged on user is not allowed to view this persons appointments an exception is thrown.

Declaration
Task<Appointment[]> GetPersonDiaryAsync(int personId, DateTime startTime, DateTime endTime, int count, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int personId

The person id of the SuperOffice user (associate).

DateTime startTime

The start of the time interval we want appointments from. This will usually be the current time.

DateTime endTime

The end of the time interval.

int count

The maximum number of appointments that should be returned. -1 means no count restrictions.

CancellationToken cancellationToken
Returns
Type Description
Task<Appointment[]>

Array of Appointments.

GetPersonTasksAsync(int, int, CancellationToken)

Method that returns a specified number of appointments within a time range. It only returns appointments that would be displayed in the user's task list. The appointments belong to the person specified. If the person not is a SuperOffice user (associate) or the logged on user is not allowed to view this persons appointments an exception is thrown.

Declaration
Task<Appointment[]> GetPersonTasksAsync(int personId, int count, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int personId

The person id of the SuperOffice user (associate).

int count

The maximum number of appointments that should be returned. -1 means no count restrictions.

CancellationToken cancellationToken
Returns
Type Description
Task<Appointment[]>

Array of Appointments.

GetProjectAppointmentsAsync(int, DateTime, DateTime, int, CancellationToken)

Method that returns a specified number of appointments within a time range. The appointments belong to the project specified. If the logged on user is not allowed to view this projects appointments an exception is thrown.

Declaration
Task<Appointment[]> GetProjectAppointmentsAsync(int projectId, DateTime startTime, DateTime endTime, int count, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int projectId

The project id

DateTime startTime

The start of the time interval we want appointments from. This will usually be the current time.

DateTime endTime

The end of the time interval.

int count

The maximum number of appointments that should be returned. -1 means no count restrictions.

CancellationToken cancellationToken
Returns
Type Description
Task<Appointment[]>

Array of Appointments.

GetProjectAppointmentsByTaskAsync(int, DateTime, DateTime, int, int, CancellationToken)

Method that returns a specified number of appointments of a specific appointment task type within a time range. The appointments belong to the project specified. Task represents the different types of activities, like “Phone call”, “Meeting” and so on.

Declaration
Task<Appointment[]> GetProjectAppointmentsByTaskAsync(int projectId, DateTime startTime, DateTime endTime, int count, int taskId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int projectId

The project id

DateTime startTime

The start of the time interval we want appointments from. This will usually be the current time.

DateTime endTime

The end of the time interval.

int count

The maximum number of appointments that should be returned. -1 means no count restrictions.

int taskId

The task id. Task represents the different types of activities, like “Phone call”, “Meeting” and so on.

CancellationToken cancellationToken
Returns
Type Description
Task<Appointment[]>

Array of Appointments.

GetProjectAppointmentsByTaskHeadingAsync(int, DateTime, DateTime, int, int, CancellationToken)

Method that returns a specified number of appointments of a specific appointment task heading within a time range. The appointments belong to the project specified. Task represents the different types of activities, like “Phone call”, “Meeting” and so on. The heading represents a grouping or filtering of tasks.

Declaration
Task<Appointment[]> GetProjectAppointmentsByTaskHeadingAsync(int projectId, DateTime startTime, DateTime endTime, int count, int taskHeadingId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int projectId

The project id

DateTime startTime

The start of the time interval we want appointments from. This will usually be the current time.

DateTime endTime

The end of the time interval.

int count

The maximum number of appointments that should be returned. -1 means no count restrictions.

int taskHeadingId

The task heading id. The heading represents a grouping or filtering of tasks. Task represents the different types of activities, like “Phone call”, “Meeting” and so on.

CancellationToken cancellationToken
Returns
Type Description
Task<Appointment[]>

Array of Appointments.

GetProjectAppointmentsByTasksAsync(int, DateTime, DateTime, int, int[], CancellationToken)

Method that returns a specified number of appointments matching the list of appointment task types within a time range. The appointments belong to the project specified. Task represents the different types of activities, like “Phone call”, “Meeting” and so on.

Declaration
Task<Appointment[]> GetProjectAppointmentsByTasksAsync(int projectId, DateTime startTime, DateTime endTime, int count, int[] taskIds, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int projectId

The project id

DateTime startTime

The start of the time interval we want appointments from. This will usually be the current time.

DateTime endTime

The end of the time interval.

int count

The maximum number of appointments that should be returned. -1 means no count restrictions.

int[] taskIds

The task ids as an integer array. Task represents the different types of activities, like “Phone call”, “Meeting” and so on.

CancellationToken cancellationToken
Returns
Type Description
Task<Appointment[]>

Array of Appointments.

GetProjectAppointmentsByTypeAsync(int, DateTime, DateTime, int, AppointmentType, CancellationToken)

Method that returns a specified number of appointments of a specific appointment type within a time range. The appointments belong to the project specified.

Declaration
Task<Appointment[]> GetProjectAppointmentsByTypeAsync(int projectId, DateTime startTime, DateTime endTime, int count, AppointmentType appointmentType, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int projectId

The project id

DateTime startTime

The start of the time interval we want appointments from. This will usually be the current time.

DateTime endTime

The end of the time interval.

int count

The maximum number of appointments that should be returned. -1 means no count restrictions.

AppointmentType appointmentType

The appointment type, e.g. inDiary, inChecklist etc.

CancellationToken cancellationToken
Returns
Type Description
Task<Appointment[]>

Array of Appointments.

GetProjectMemberAppointmentsAsync(int, DateTime, DateTime, int, CancellationToken)

Method that returns a specified number of appointments within a time range. The appointments belong to the projects where the person specified is member.

Declaration
Task<Appointment[]> GetProjectMemberAppointmentsAsync(int personId, DateTime startTime, DateTime endTime, int count, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int personId

The project member's person id

DateTime startTime

The start of the time interval we want appointments from. This will usually be the current time.

DateTime endTime

The end of the time interval.

int count

The maximum number of appointments that should be returned. -1 means no count restrictions.

CancellationToken cancellationToken
Returns
Type Description
Task<Appointment[]>

Array of Appointments.

GetProjectMemberAppointmentsByTaskAsync(int, DateTime, DateTime, int, int, CancellationToken)

Method that returns a specified number of appointments of a specific appointment task type within a time range. The appointments belong to the projects where the person specified is member. Task represents the different types of activities, like “Phone call”, “Meeting” and so on.

Declaration
Task<Appointment[]> GetProjectMemberAppointmentsByTaskAsync(int personId, DateTime startTime, DateTime endTime, int count, int taskId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int personId

The project member's person id

DateTime startTime

The start of the time interval we want appointments from. This will usually be the current time.

DateTime endTime

The end of the time interval.

int count

The maximum number of appointments that should be returned. -1 means no count restrictions.

int taskId

The task id. Task represents the different types of activities, like “Phone call”, “Meeting” and so on.

CancellationToken cancellationToken
Returns
Type Description
Task<Appointment[]>

Array of Appointments.

GetProjectMemberAppointmentsByTaskHeadingAsync(int, DateTime, DateTime, int, int, CancellationToken)

Method that returns a specified number of appointments of a specific appointment task heading within a time range. The appointments belong to the projects where the person specified is member. Task represents the different types of activities, like “Phone call”, “Meeting” and so on. The heading represents a grouping or filtering of tasks.

Declaration
Task<Appointment[]> GetProjectMemberAppointmentsByTaskHeadingAsync(int personId, DateTime startTime, DateTime endTime, int count, int taskHeadingId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int personId

The project member's person id

DateTime startTime

The start of the time interval we want appointments from. This will usually be the current time.

DateTime endTime

The end of the time interval.

int count

The maximum number of appointments that should be returned. -1 means no count restrictions.

int taskHeadingId

The task heading id. The heading represents a grouping or filtering of tasks. Task represents the different types of activities, like “Phone call”, “Meeting” and so on.

CancellationToken cancellationToken
Returns
Type Description
Task<Appointment[]>

Array of Appointments.

GetProjectMemberAppointmentsByTasksAsync(int, DateTime, DateTime, int, int[], CancellationToken)

Method that returns a specified number of appointments matching a set of appointment task types within a time range. The appointments belong to the projects where the person specified is member. Task represents the different types of activities, like “Phone call”, “Meeting” and so on.

Declaration
Task<Appointment[]> GetProjectMemberAppointmentsByTasksAsync(int personId, DateTime startTime, DateTime endTime, int count, int[] taskIds, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int personId

The project member's person id

DateTime startTime

The start of the time interval we want appointments from. This will usually be the current time.

DateTime endTime

The end of the time interval.

int count

The maximum number of appointments that should be returned. -1 means no count restrictions.

int[] taskIds

The task ids as an integer array. Task represents the different types of activities, like “Phone call”, “Meeting” and so on.

CancellationToken cancellationToken
Returns
Type Description
Task<Appointment[]>

Array of Appointments.

GetProjectMemberAppointmentsByTypeAsync(int, DateTime, DateTime, int, AppointmentType, CancellationToken)

Method that returns a specified number of appointments of a specific appointment type within a time range. The appointments belong to the projects where the person specified is member.

Declaration
Task<Appointment[]> GetProjectMemberAppointmentsByTypeAsync(int personId, DateTime startTime, DateTime endTime, int count, AppointmentType appointmentType, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int personId

The project member's person id

DateTime startTime

The start of the time interval we want appointments from. This will usually be the current time.

DateTime endTime

The end of the time interval.

int count

The maximum number of appointments that should be returned. -1 means no count restrictions.

AppointmentType appointmentType

The appointment type, e.g. inDiary, inChecklist etc.

CancellationToken cancellationToken
Returns
Type Description
Task<Appointment[]>

Array of Appointments.

GetPublishedAppointmentAsync(int, CancellationToken)

Get published appointment by appointment id.

Declaration
Task<Appointment> GetPublishedAppointmentAsync(int appointmentId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int appointmentId

The appointment id

CancellationToken cancellationToken
Returns
Type Description
Task<Appointment>

Appointment

GetPublishedAppointmentsAsync(int[], CancellationToken)

Get published appointments by appointment ids.

Declaration
Task<Appointment[]> GetPublishedAppointmentsAsync(int[] appointmentIds, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int[] appointmentIds

The array of appointment ids

CancellationToken cancellationToken
Returns
Type Description
Task<Appointment[]>

Array of Appointment

GetPublishedProjectAppointmentsAsync(int, CancellationToken)

Get published appointments by project id.

Declaration
Task<Appointment[]> GetPublishedProjectAppointmentsAsync(int projectId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int projectId

The project id

CancellationToken cancellationToken
Returns
Type Description
Task<Appointment[]>

Array of Appointment

GetRedLetterInformationListByDatesAndAssociateAsync(DateTime, DateTime, int, CancellationToken)

Get detailed red letter day information (redletter summary + individual day texts) for one or more days according to the given date interval. The time portion of the dates is ignored.

Declaration
Task<RedLetterInformationListItem[]> GetRedLetterInformationListByDatesAndAssociateAsync(DateTime startDate, DateTime endDate, int associateId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
DateTime startDate

Start date of interval. Time portion is ignored.

DateTime endDate

End date of interval. Time portion is ignored.

int associateId

Associate id to identify the calendar to scan. If 0 is passed in, the currently authenticated associate is used instead.

CancellationToken cancellationToken
Returns
Type Description
Task<RedLetterInformationListItem[]>

Exactly one item per day of the given time span is returned. Days where nothing happens will have all values set to 0, but will still be in the returned array. Start end dates are treated as inclusive.

GetSuggestedAppointmentAsync(int, CancellationToken)

Gets a SuggestedAppointment object.

Declaration
Task<SuggestedAppointment> GetSuggestedAppointmentAsync(int suggestedAppointmentId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int suggestedAppointmentId

The identifier of the SuggestedAppointment object

CancellationToken cancellationToken
Returns
Type Description
Task<SuggestedAppointment>

A single SuggestedAppointment

GetSuggestedAppointmentEntityAsync(int, CancellationToken)

Gets a SuggestedAppointmentEntity object.

Declaration
Task<SuggestedAppointmentEntity> GetSuggestedAppointmentEntityAsync(int suggestedAppointmentEntityId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int suggestedAppointmentEntityId

The identifier of the SuggestedAppointmentEntity object

CancellationToken cancellationToken
Returns
Type Description
Task<SuggestedAppointmentEntity>

A single SuggestedAppointmentEntity

GetTaskListItemAsync(int, CancellationToken)

Gets a TaskListItem object.

Declaration
Task<TaskListItem> GetTaskListItemAsync(int taskListItemId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int taskListItemId

The identifier of the TaskListItem object

CancellationToken cancellationToken
Returns
Type Description
Task<TaskListItem>

A single TaskListItem

GetTaskListItemsAsync(bool, CancellationToken)

Gets all takslist items

Declaration
Task<TaskListItem[]> GetTaskListItemsAsync(bool includeDeleted, CancellationToken cancellationToken = default)
Parameters
Type Name Description
bool includeDeleted

Include deleted items

CancellationToken cancellationToken
Returns
Type Description
Task<TaskListItem[]>

An array of tasklist items

GetUIDFromAppointmentIdAsync(int, bool, CancellationToken)

Get the UID associated with the appointment id in the Invitation table.

Declaration
Task<string> GetUIDFromAppointmentIdAsync(int appointmentId, bool useMotherId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int appointmentId
bool useMotherId

Uses motherId if no UID is found for appointmentId.

CancellationToken cancellationToken
Returns
Type Description
Task<string>

The associated UID, or null if none exist.

GetVideoMeetingConnectedStateAsync(CancellationToken)

Get the current users connected state. This indicates if a user is configured to use VideoMeetings.

Declaration
Task<UserConnectedState> GetVideoMeetingConnectedStateAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
CancellationToken cancellationToken
Returns
Type Description
Task<UserConnectedState>

Details about the users connected state

MoveAsync(int, DateTime, RecurrenceUpdateMode, CancellationToken)

Moving a booking to another start time.

Declaration
Task<AppointmentEntity> MoveAsync(int appointmentId, DateTime newStartTime, RecurrenceUpdateMode updateMode, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int appointmentId

The appointmentId. Both master and child record ids are accepted.

DateTime newStartTime

The new start time for the moved booking.

RecurrenceUpdateMode updateMode

Update mode for a recurring appointment.

CancellationToken cancellationToken
Returns
Type Description
Task<AppointmentEntity>

Updated AppointmentEntity

MoveExtendedAsync(AppointmentMoveData, CancellationToken)

Moving a booking to another start time and with new info and possibly notifications.

Declaration
Task<AppointmentEntity> MoveExtendedAsync(AppointmentMoveData appointmentMoveData, CancellationToken cancellationToken = default)
Parameters
Type Name Description
AppointmentMoveData appointmentMoveData

Move parameter data.

CancellationToken cancellationToken
Returns
Type Description
Task<AppointmentEntity>

Updated AppointmentEntity

MoveWithEmailAsync(int, DateTime, RecurrenceUpdateMode, bool, EMailConnectionInfo, EMailConnectionInfo, CancellationToken)

Moving a booking to another start time.

Declaration
Task<AppointmentEntity> MoveWithEmailAsync(int appointmentId, DateTime newStartTime, RecurrenceUpdateMode updateMode, bool sendEmailToParticipants, EMailConnectionInfo smtpEMailConnectionInfo, EMailConnectionInfo imapEMailConnectionInfo, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int appointmentId

The appointmentId. Both master and child record ids are accepted.

DateTime newStartTime

The new start time for the moved booking.

RecurrenceUpdateMode updateMode

Update mode for a recurring appointment.

bool sendEmailToParticipants

If true, emails will be sent to all participants that is marked with send email flag if deemed necessary. If false no mails will be sent even if the send email flag is true.

EMailConnectionInfo smtpEMailConnectionInfo

Login information for outgoing smtp email server. Will be null if no login information is relevant.

EMailConnectionInfo imapEMailConnectionInfo

Login information for imap server. Will be null if no login information is relevant.

CancellationToken cancellationToken
Returns
Type Description
Task<AppointmentEntity>

Updated AppointmentEntity

RejectAsync(int, string, RecurrenceUpdateMode, CancellationToken)

Rejecting an appointment invitation

Declaration
Task RejectAsync(int appointmentId, string rejectReason, RecurrenceUpdateMode updateMode, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int appointmentId

The appointmentId. Both master and child record ids are accepted.

string rejectReason

The reason the invitation was rejected.

RecurrenceUpdateMode updateMode

Update mode for a recurring appointment.

CancellationToken cancellationToken
Returns
Type Description
Task

Updated AppointmentEntity

RejectWithEmailConfirmationAsync(int, string, RecurrenceUpdateMode, CancellationToken)

Rejecting an appointment invitation and send an email confirmation to the meeting organizer.

Declaration
Task RejectWithEmailConfirmationAsync(int appointmentId, string rejectReason, RecurrenceUpdateMode updateMode, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int appointmentId

The appointmentId. Both master and child record ids are accepted.

string rejectReason

The reason the invitation was rejected.

RecurrenceUpdateMode updateMode

Update mode for a recurring appointment.

CancellationToken cancellationToken
Returns
Type Description
Task

Updated AppointmentEntity

RejectWithSmtpEmailConfirmationAsync(int, string, RecurrenceUpdateMode, EMailConnectionInfo, CancellationToken)

Rejecting an appointment invitation and send an email confirmation to the meeting organizer.

Declaration
Task RejectWithSmtpEmailConfirmationAsync(int appointmentId, string rejectReason, RecurrenceUpdateMode updateMode, EMailConnectionInfo smtpEMailConnectionInfo, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int appointmentId

The appointmentId. Both master and child record ids are accepted.

string rejectReason

The reason the invitation was rejected.

RecurrenceUpdateMode updateMode

Update mode for a recurring appointment.

EMailConnectionInfo smtpEMailConnectionInfo

Login information for outgoing smtp email server. Will be null if no login information is relevant.

CancellationToken cancellationToken
Returns
Type Description
Task

Updated AppointmentEntity

RequestForInfoAsync(int, string, string, string, string, string, string, string, CancellationToken)

Submits a request for information. The request is added to the task list of the user that is responsible for this contact. Based on wether the person the request is made for is found or not, the following happens: If the person is found, the person, person's contact and sales representative is returned. If neither the person nor the contact is found a new person and contact is created (if sufficient data is supplied), and the person, person's contact and sales representative is returned. If the contact and not the person is found a new person is created on this contact, and the contact, salesrep, and person is returned (if there was enough data to return the person). If more than one contact is found a list of contacts is returned.

Declaration
Task<SalesActivity> RequestForInfoAsync(int associateIdForNewContact, string channel, string regarding, string contactName, string personFirstname, string personLastname, string emailAddress, string phoneNumber, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int associateIdForNewContact

Associate id of the person set as "Our Contact" if a new Contact is created. Ensures that the request is assigned to the correct salesman.

string channel

The requested channel, e.g. "Phone"

string regarding

The text submitted by the user.

string contactName

The name of the contact that the RFI will be added to. May be empty.

string personFirstname

The firstname of the person that the RFI will be added to. May be empty.

string personLastname

The lastname of the person that the RFI will be added to. May be empty.

string emailAddress

The email address of the person that the RFI will be added to.

string phoneNumber

Phone number of the contact or contact's person.

CancellationToken cancellationToken
Returns
Type Description
Task<SalesActivity>

True if the submission was successful.

SaveAppointmentEntityAsync(AppointmentEntity, CancellationToken)

Updates the existing AppointmentEntity or creates a new AppointmentEntity if the id parameter is 0. Save the appointment entity

Declaration
Task<AppointmentEntity> SaveAppointmentEntityAsync(AppointmentEntity appointmentEntity, CancellationToken cancellationToken = default)
Parameters
Type Name Description
AppointmentEntity appointmentEntity

The AppointmentEntity that is saved

CancellationToken cancellationToken
Returns
Type Description
Task<AppointmentEntity>

New or updated AppointmentEntity

SaveAsync(AppointmentEntity, RecurrenceUpdateMode, bool, EMailConnectionInfo, EMailConnectionInfo, CancellationToken)

Saving a booking.

Declaration
Task<AppointmentEntity> SaveAsync(AppointmentEntity appointmentEntity, RecurrenceUpdateMode updateMode, bool sendEmailToParticipants, EMailConnectionInfo smtpEMailConnectionInfo, EMailConnectionInfo imapEMailConnectionInfo, CancellationToken cancellationToken = default)
Parameters
Type Name Description
AppointmentEntity appointmentEntity
RecurrenceUpdateMode updateMode

Update mode for a recurring appointment.

bool sendEmailToParticipants

If true, emails will be sent to all participants that is marked with send email flag. If false no mails will be sent even if the send email flag is true.

EMailConnectionInfo smtpEMailConnectionInfo

Login information for outgoing smtp email server. Will be null if no login information is relevant.

EMailConnectionInfo imapEMailConnectionInfo

Login information for imap server. Will be null if no login information is relevant.

CancellationToken cancellationToken
Returns
Type Description
Task<AppointmentEntity>

Updated AppointmentEntity

SaveSuggestedAppointmentEntityAsync(SuggestedAppointmentEntity, CancellationToken)

Updates the existing SuggestedAppointmentEntity or creates a new SuggestedAppointmentEntity if the id parameter is 0.

Declaration
Task<SuggestedAppointmentEntity> SaveSuggestedAppointmentEntityAsync(SuggestedAppointmentEntity suggestedAppointmentEntity, CancellationToken cancellationToken = default)
Parameters
Type Name Description
SuggestedAppointmentEntity suggestedAppointmentEntity

The SuggestedAppointmentEntity that is saved

CancellationToken cancellationToken
Returns
Type Description
Task<SuggestedAppointmentEntity>

New or updated SuggestedAppointmentEntity

SaveTaskListItemAsync(TaskListItem, CancellationToken)

Updates the existing TaskListItem or creates a new TaskListItem if the id parameter is 0.

Declaration
Task<TaskListItem> SaveTaskListItemAsync(TaskListItem taskListItem, CancellationToken cancellationToken = default)
Parameters
Type Name Description
TaskListItem taskListItem

The TaskListItem that is saved

CancellationToken cancellationToken
Returns
Type Description
Task<TaskListItem>

New or updated TaskListItem

SaveWithCustomInvitationAsync(AppointmentEntity, RecurrenceUpdateMode, bool, EMailConnectionInfo, EMailConnectionInfo, string, string, string, CancellationToken)

Save a booking and send a custom invitation email to participants

Declaration
Task<AppointmentSaveData> SaveWithCustomInvitationAsync(AppointmentEntity appointmentEntity, RecurrenceUpdateMode updateMode, bool sendEmailToParticipants, EMailConnectionInfo smtpEMailConnectionInfo, EMailConnectionInfo imapEMailConnectionInfo, string emailBody, string subject, string templateLanguage, CancellationToken cancellationToken = default)
Parameters
Type Name Description
AppointmentEntity appointmentEntity
RecurrenceUpdateMode updateMode

Update mode for a recurring appointment.

bool sendEmailToParticipants

If true, emails will be sent to all participants that is marked with send email flag. If false no mails will be sent even if the send email flag is true.

EMailConnectionInfo smtpEMailConnectionInfo

Login information for outgoing smtp email server. Will be null if no login information is relevant.

EMailConnectionInfo imapEMailConnectionInfo

Login information for imap server. Will be null if no login information is relevant.

string emailBody

The email-body to be used for new invitations

string subject

The email-subject to be used for new invitations

string templateLanguage

The template language to use for invitation updates

CancellationToken cancellationToken
Returns
Type Description
Task<AppointmentSaveData>

Appointment entity and flag for if email was queued to be sent

SetActivityStatusAsync(string[], ActivityStatus, CancellationToken)

Sets the completed status for an array of activities. The string activityIdentifier param may contain of a mix of appointment_id, sale_id, document_id and todo_id. The changes are saved immediately. If an invalid id is passed in (nonexistent record), no changes will be made. If there is no write access to the record being changed, a Sentry exception will be thrown in the usual manner.

Declaration
Task SetActivityStatusAsync(string[] activityIdentifier, ActivityStatus activityStatus, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string[] activityIdentifier

Array of activity ids. ex. appointment_id=666

ActivityStatus activityStatus

The status to set the activities

CancellationToken cancellationToken
Returns
Type Description
Task

SetSeenAsync(int, RecurrenceUpdateMode, CancellationToken)

Sets an appointment invitiation to seen.

Declaration
Task SetSeenAsync(int appointmentId, RecurrenceUpdateMode updateMode, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int appointmentId

The appointmentId. Both master and child record ids are accepted.

RecurrenceUpdateMode updateMode

Update mode for a recurring appointment.

CancellationToken cancellationToken
Returns
Type Description
Task

SetSeenManyAsync(int[], RecurrenceUpdateMode, CancellationToken)

Sets a list of appointment invitations to seen. The same update mode will be used for all appointments in this batch.

Declaration
Task SetSeenManyAsync(int[] appointmentIds, RecurrenceUpdateMode updateMode, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int[] appointmentIds

List of appointment IDs

RecurrenceUpdateMode updateMode

Update mode for a recurring appointment.

CancellationToken cancellationToken
Returns
Type Description
Task

ToggleActivitiesAsync(string[], CancellationToken)

Toggle the completed status for an array of activities.

Declaration
Task<ActivityStatus> ToggleActivitiesAsync(string[] activityIdentifier, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string[] activityIdentifier

Contain of a mix of appointment_id, sale_id, document_id and todo_id.

CancellationToken cancellationToken
Returns
Type Description
Task<ActivityStatus>

The resulting ActivityStatus of the first in the array

ToggleActivityAsync(string, CancellationToken)

Toggle the completed status for an activity. Activity may be sale, document or appointment. The changes are saved immediately.

Declaration
Task<ActivityStatus> ToggleActivityAsync(string activityIdentifier, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string activityIdentifier

May contain of a mix of appointment_id, sale_id, document_id and todo_id

CancellationToken cancellationToken
Returns
Type Description
Task<ActivityStatus>

What the result after toggling was.

ToggleAndSetActivitiesAsync(string[], CancellationToken)

Toggles the first activity and sets the rest of the activities to the result of the first toggle. However, there are some special rules for appointments that trigger a suggested appointment when they are completed. If more than one appointment in the set of identifiers triggers a suggestion, we will not toggle those appointments. This rule is only active when changing the status of an appointment to complete. There must be more than one appointment that triggers such an event for this rule to take effect.

Declaration
Task<string[]> ToggleAndSetActivitiesAsync(string[] activityIdentifiers, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string[] activityIdentifiers

Array of activity ids. ex. appointment_id=666

CancellationToken cancellationToken
Returns
Type Description
Task<string[]>

The identifiers that were not toggled.

ToggleAppointmentStatusAsync(int, CancellationToken)

Sets an appointment's status to Completed if the appointment had a different status, or sets the status to started if already set to completed.

Declaration
Task<AppointmentStatus> ToggleAppointmentStatusAsync(int appointmentId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int appointmentId

The appointment id.

CancellationToken cancellationToken
Returns
Type Description
Task<AppointmentStatus>

The new AppointmentStatus

UpdateAppointmentAsync(int, DateTime, DateTime, int, int, int, CancellationToken)

Updates an appointment record.

Declaration
Task<Appointment> UpdateAppointmentAsync(int id, DateTime startTime, DateTime endTime, int status, int type, int associateId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int id
DateTime startTime
DateTime endTime
int status
int type
int associateId

The appointment owner's id (associate id)

CancellationToken cancellationToken
Returns
Type Description
Task<Appointment>

UpdateAppointmentFromIcsResponseAsync(string, Stream, CancellationToken)

Update the attendance to an appointment based on incoming ICS RSVPs.

Declaration
Task<bool> UpdateAppointmentFromIcsResponseAsync(string emailAddress, Stream icsData, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string emailAddress

The email-address of the person responding to our meeting-request.

Stream icsData

The iCal ICS RSVP-content in byte-form.

CancellationToken cancellationToken
Returns
Type Description
Task<bool>

True if successfull.

UpdateAppointmentWithModeAndEmailAsync(int, DateTime, DateTime, AppointmentStatus, AppointmentType, int, RecurrenceUpdateMode, bool, EMailConnectionInfo, EMailConnectionInfo, CancellationToken)

Updates an appointment record, taking the given recurrence update mode into account, possibly sending notification emails.

Declaration
Task<Appointment> UpdateAppointmentWithModeAndEmailAsync(int id, DateTime startTime, DateTime endTime, AppointmentStatus status, AppointmentType type, int associateId, RecurrenceUpdateMode updateMode, bool sendEmailToParticipants, EMailConnectionInfo smtpEMailConnectionInfo, EMailConnectionInfo imapEMailConnectionInfo, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int id
DateTime startTime
DateTime endTime
AppointmentStatus status
AppointmentType type
int associateId

The appointment owner's id (associate id)

RecurrenceUpdateMode updateMode

Update mode for recurrence.

bool sendEmailToParticipants

If true, emails will be sent to all participants that is marked with send email flag if deemed necessary. If false no mails will be sent even if the send email flag is true.

EMailConnectionInfo smtpEMailConnectionInfo

Login information for outgoing smtp email server. Will be null if no login information is relevant.

EMailConnectionInfo imapEMailConnectionInfo

Login information for imap server. Will be null if no login information is relevant.

CancellationToken cancellationToken
Returns
Type Description
Task<Appointment>

UpdateAppointmentWithModeAsync(int, DateTime, DateTime, AppointmentStatus, AppointmentType, int, RecurrenceUpdateMode, CancellationToken)

Updates an appointment record, taking the given recurrence update mode into account.

Declaration
Task<Appointment> UpdateAppointmentWithModeAsync(int id, DateTime startTime, DateTime endTime, AppointmentStatus status, AppointmentType type, int associateId, RecurrenceUpdateMode updateMode, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int id
DateTime startTime
DateTime endTime
AppointmentStatus status
AppointmentType type
int associateId

The appointment owner's id (associate id)

RecurrenceUpdateMode updateMode

Update mode for recurrence.

CancellationToken cancellationToken
Returns
Type Description
Task<Appointment>

ValidateAppointmentEntityAsync(AppointmentEntity, CancellationToken)

Check that entity is ready for saving.

Declaration
Task<StringDictionary> ValidateAppointmentEntityAsync(AppointmentEntity appointmentEntity, CancellationToken cancellationToken = default)
Parameters
Type Name Description
AppointmentEntity appointmentEntity

Entity to be checked.

CancellationToken cancellationToken
Returns
Type Description
Task<StringDictionary>

Error messages tagged by field.

ValidateDaysAsync(AppointmentEntity, DateTime[], CancellationToken)

Validates the set of dates to calculate any conflicts.

Declaration
Task<RecurrenceDate[]> ValidateDaysAsync(AppointmentEntity appointmentEntity, DateTime[] dates, CancellationToken cancellationToken = default)
Parameters
Type Name Description
AppointmentEntity appointmentEntity
DateTime[] dates

The dates to validate.

CancellationToken cancellationToken
Returns
Type Description
Task<RecurrenceDate[]>

Array of RecurrenceDate object for each validated date.

WillSendEmailAsync(AppointmentEntity, CancellationToken)

Returns true if the changes will trigger email sending on Save, so you can inform the user.

Declaration
Task<bool> WillSendEmailAsync(AppointmentEntity appointment, CancellationToken cancellationToken = default)
Parameters
Type Name Description
AppointmentEntity appointment

The appointment carrier with changes made, before saving the changes.

CancellationToken cancellationToken
Returns
Type Description
Task<bool>

True if the changes to the appointment and preference settings etc. indicates an email should be sent.

© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top