Show / Hide Table of Contents

Class AppointmentAgent

Proxy class for the Appointment Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.

Inheritance
object
AppointmentAgent
Implements
IAppointmentAgent
IAgent
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: SuperOffice.CRM.Services
Assembly: SuperOffice.Services.Implementation.dll
Syntax
public class AppointmentAgent : IAppointmentAgent, IAgent

Constructors

AppointmentAgent(IAppointmentImplementation, IAppointmentEntityImplementation, IAppointmentListImplementation, IAppointmentSyncDataImplementation, IDayInformationListImplementation, IMultiAlarmDataImplementation, INextAvailableTimeListImplementation, ISalesActivityImplementation, ISuggestedAppointmentImplementation, ISuggestedAppointmentEntityImplementation, ITaskListItemImplementation, IVideoMeetingReservationImplementation, ISoRequestItemsAccessor)

Proxy class for the Appointment Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.

Declaration
public AppointmentAgent(IAppointmentImplementation appointmentImplementation, IAppointmentEntityImplementation appointmentEntityImplementation, IAppointmentListImplementation appointmentListImplementation, IAppointmentSyncDataImplementation appointmentSyncDataImplementation, IDayInformationListImplementation dayInformationListImplementation, IMultiAlarmDataImplementation multiAlarmDataImplementation, INextAvailableTimeListImplementation nextAvailableTimeListImplementation, ISalesActivityImplementation salesActivityImplementation, ISuggestedAppointmentImplementation suggestedAppointmentImplementation, ISuggestedAppointmentEntityImplementation suggestedAppointmentEntityImplementation, ITaskListItemImplementation taskListItemImplementation, IVideoMeetingReservationImplementation videoMeetingReservationImplementation, ISoRequestItemsAccessor accessor)
Parameters
Type Name Description
IAppointmentImplementation appointmentImplementation
IAppointmentEntityImplementation appointmentEntityImplementation
IAppointmentListImplementation appointmentListImplementation
IAppointmentSyncDataImplementation appointmentSyncDataImplementation
IDayInformationListImplementation dayInformationListImplementation
IMultiAlarmDataImplementation multiAlarmDataImplementation
INextAvailableTimeListImplementation nextAvailableTimeListImplementation
ISalesActivityImplementation salesActivityImplementation
ISuggestedAppointmentImplementation suggestedAppointmentImplementation
ISuggestedAppointmentEntityImplementation suggestedAppointmentEntityImplementation
ITaskListItemImplementation taskListItemImplementation
IVideoMeetingReservationImplementation videoMeetingReservationImplementation
ISoRequestItemsAccessor accessor

AppointmentAgent(IAppointmentImplementation, IAppointmentEntityImplementation, IAppointmentListImplementation, IAppointmentSyncDataImplementation, IDayInformationListImplementation, IMultiAlarmDataImplementation, INextAvailableTimeListImplementation, ISalesActivityImplementation, ISuggestedAppointmentImplementation, ISuggestedAppointmentEntityImplementation, ITaskListItemImplementation, IVideoMeetingReservationImplementation, ISoRequestItemsAccessor, IDebugUser, IServiceCallsRepository)

Proxy class for the Appointment Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.

Declaration
public AppointmentAgent(IAppointmentImplementation appointmentImplementation, IAppointmentEntityImplementation appointmentEntityImplementation, IAppointmentListImplementation appointmentListImplementation, IAppointmentSyncDataImplementation appointmentSyncDataImplementation, IDayInformationListImplementation dayInformationListImplementation, IMultiAlarmDataImplementation multiAlarmDataImplementation, INextAvailableTimeListImplementation nextAvailableTimeListImplementation, ISalesActivityImplementation salesActivityImplementation, ISuggestedAppointmentImplementation suggestedAppointmentImplementation, ISuggestedAppointmentEntityImplementation suggestedAppointmentEntityImplementation, ITaskListItemImplementation taskListItemImplementation, IVideoMeetingReservationImplementation videoMeetingReservationImplementation, ISoRequestItemsAccessor accessor, IDebugUser debugUser, IServiceCallsRepository serviceCallsRepository)
Parameters
Type Name Description
IAppointmentImplementation appointmentImplementation
IAppointmentEntityImplementation appointmentEntityImplementation
IAppointmentListImplementation appointmentListImplementation
IAppointmentSyncDataImplementation appointmentSyncDataImplementation
IDayInformationListImplementation dayInformationListImplementation
IMultiAlarmDataImplementation multiAlarmDataImplementation
INextAvailableTimeListImplementation nextAvailableTimeListImplementation
ISalesActivityImplementation salesActivityImplementation
ISuggestedAppointmentImplementation suggestedAppointmentImplementation
ISuggestedAppointmentEntityImplementation suggestedAppointmentEntityImplementation
ITaskListItemImplementation taskListItemImplementation
IVideoMeetingReservationImplementation videoMeetingReservationImplementation
ISoRequestItemsAccessor accessor
IDebugUser debugUser
IServiceCallsRepository serviceCallsRepository

Methods

AcceptAsync(int, RecurrenceUpdateMode, CancellationToken)

Accepting an appointment invitation.

Declaration
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task

Updated AppointmentEntity

AcceptRejectedAsync(int, RecurrenceUpdateMode, CancellationToken)

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

Declaration
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task

Updated AppointmentEntity

AssignToAsync(int, ParticipantInfo, RecurrenceUpdateMode, CancellationToken)

Assigning an appointment to another person.

Declaration
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public Task<RecurrenceInfo> CalculateDaysAsync(AppointmentEntity appointmentEntity, CancellationToken cancellationToken = default)
Parameters
Type Name Description
AppointmentEntity appointmentEntity
CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<RecurrenceInfo>

CanAssignToProjectMemberAsync(int, int, CancellationToken)

Proxy class for the Appointment Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.

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

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<bool>

CleanUpBookingDeletedAsync(int[], CancellationToken)

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

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

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task

CleanUpRecurringBookingDeletedAsync(CancellationToken)

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

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

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<int>

ConvertAppointmentToTaskAsync(int, CancellationToken)

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

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

Appointment ID

CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<AppointmentEntity>

Appointment entity

CreateAndAcceptAsync(int, RecurrenceUpdateMode, CancellationToken)

Creating an appointment from an emailItem invitation and accepting it.

Declaration
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

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. NetServer calculates default values (e.g. Country) on the entity, which is required when creating/storing a new instance

Declaration
public 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
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public Task<AppointmentEntity> CreateDefaultAppointmentEntityByTypeAsync(TaskType type, CancellationToken cancellationToken = default)
Parameters
Type Name Description
TaskType type

The type of task requested.

CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<AppointmentEntity>

AppointmentEntity with default values.

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

Proxy class for the Appointment Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.

Declaration
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<AppointmentEntity>

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

Creates an appointment based on a suggested appointment.

Declaration
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public Task<RecurrenceInfo> CreateDefaultRecurrenceAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public Task<RecurrenceInfo> CreateDefaultRecurrenceByDateAsync(DateTime startDate, CancellationToken cancellationToken = default)
Parameters
Type Name Description
DateTime startDate

Date of which the recurring pattern should start.

CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<RecurrenceInfo>

CreateDefaultSuggestedAppointmentEntityAsync(CancellationToken)

Loading default values into a new SuggestedAppointmentEntity. NetServer calculates default values (e.g. Country) on the entity, which is required when creating/storing a new instance

Declaration
public 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. NetServer calculates default values (e.g. Country) on the entity, which is required when creating/storing a new instance

Declaration
public 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
public Task<VideoMeetingReservation> CreateVideoMeetingReservationAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<VideoMeetingReservation>

The created VideoMeetingReservation.

DeclineInvitationFromEmailItemAsync(int, string, CancellationToken)

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

Declaration
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task

DeleteAppointmentEntityAsync(int, CancellationToken)

Deletes the AppointmentEntity

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

The identity of the AppointmentEntity

CancellationToken cancellationToken
Returns
Type Description
Task

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

Deleting a booking

Declaration
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task

DeleteVideoMeetingReservationAsync(string, CancellationToken)

Delete a VideoMeetingReservation.

Declaration
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

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)

Proxy class for the Appointment Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.

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

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<MultiAlarmData>

GetAppointmentAsync(int, CancellationToken)

Gets a Appointment object.

Declaration
public 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>

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
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<EMailEntity>

Email entity with the preview in HTMLBody

GetAppointmentEntityAsync(int, CancellationToken)

Gets a AppointmentEntity object.

Declaration
public 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>

AppointmentEntity

GetAppointmentFromUIDAsync(string, CancellationToken)

Get the appointment that corresponds to the given UID.

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

The UID associated with the appointment

CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public Task<bool> GetAppointmentHaveParticipantsWithEmailAsync(int appointmentId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int appointmentId

The appointmentId.

CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<bool>

Return true or false.

GetAppointmentListAsync(int[], CancellationToken)

Gets an array of Appointment objects.

Declaration
public 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 objects

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
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<Appointment[]>

Array of Appointments.

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

Proxy class for the Appointment Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.

Declaration
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<Appointment[]>

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

Fetch appointments for given associates

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

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<Appointment[]>

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

Fetch appointment info for given associates

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

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<AppointmentInfo[]>

GetCanInsertForAssociatesAsync(int[], CancellationToken)

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

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

Array of associate ids to check for.

CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

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)

Proxy class for the Appointment Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.

Declaration
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<Appointment[]>

Array of Appointments.

GetMyPublishedAppointmentsAsync(CancellationToken)

Get published appointments from the logged in user.

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

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public Task<string> GetOrganizerNameAsync(int motherAppointmentId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int motherAppointmentId

The id of the mother-appointment.

CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<Appointment[]>

Array of Appointments.

GetPublishedAppointmentAsync(int, CancellationToken)

Get published appointment by appointment id.

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

The appointment id

CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<Appointment>

Appointment

GetPublishedAppointmentsAsync(int[], CancellationToken)

Get published appointments by appointment ids.

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

The array of appointment ids

CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<Appointment[]>

Array of Appointment

GetPublishedProjectAppointmentsAsync(int, CancellationToken)

Get published appointments by project id.

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

The project id

CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public 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>

SuggestedAppointment

GetSuggestedAppointmentEntityAsync(int, CancellationToken)

Gets a SuggestedAppointmentEntity object.

Declaration
public 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>

SuggestedAppointmentEntity

GetTaskListItemAsync(int, CancellationToken)

Gets a TaskListItem object.

Declaration
public 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>

TaskListItem

GetTaskListItemsAsync(bool, CancellationToken)

Gets all takslist items

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

Include deleted items

CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<string>

The associated UID, or null if none exist.

MoveAsync(int, DateTime, RecurrenceUpdateMode, CancellationToken)

Moving a booking to another start time.

Declaration
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public Task<AppointmentEntity> MoveExtendedAsync(AppointmentMoveData appointmentMoveData, CancellationToken cancellationToken = default)
Parameters
Type Name Description
AppointmentMoveData appointmentMoveData

Move parameter data.

CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<AppointmentEntity>

Updated AppointmentEntity

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

Moving a booking to another start time.

Declaration
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<AppointmentEntity>

Updated AppointmentEntity

RejectAsync(int, string, RecurrenceUpdateMode, CancellationToken)

Rejecting an appointment invitation

Declaration
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

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 empty

Declaration
public 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
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<AppointmentEntity>

Updated AppointmentEntity

SaveSuggestedAppointmentEntityAsync(SuggestedAppointmentEntity, CancellationToken)

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

Declaration
public 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 empty

Declaration
public 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
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task

SetSeenAsync(int, RecurrenceUpdateMode, CancellationToken)

Sets an appointment invitiation to seen.

Declaration
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task

ToggleActivitiesAsync(string[], CancellationToken)

Toggle the completed status for an array of activities.

Declaration
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public Task<string[]> ToggleAndSetActivitiesAsync(string[] activityIdentifiers, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string[] activityIdentifiers

Array of activity ids. ex. appointment_id=666

CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public Task<AppointmentStatus> ToggleAppointmentStatusAsync(int appointmentId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int appointmentId

The appointment id.

CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<AppointmentStatus>

The new AppointmentStatus

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

Updates an appointment record.

Declaration
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<Appointment>

UpdateAppointmentFromIcsResponseAsync(string, Stream, CancellationToken)

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

Declaration
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<Appointment>

ValidateAppointmentEntityAsync(AppointmentEntity, CancellationToken)

Check that entity is ready for saving.

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

Entity to be checked.

CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<StringDictionary>

Error messages tagged by field.

ValidateDaysAsync(AppointmentEntity, DateTime[], CancellationToken)

Validates the set of dates to calculate any conflicts.

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

The dates to validate.

CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

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
public 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

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<bool>

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

Implements

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