Interface IAppointmentAgent
Interface for the Appointment Agent Collection of all services that works with Appointment data.
Namespace: SuperOffice.CRM.Services
Assembly: SuperOffice.Services.dll
Syntax
[Agent("Appointment Agent", "Interface for the Appointment Agent. Collection of all services that works with Appointment data.")]
public interface IAppointmentAgent : IAgent
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
Methods
Accept(Int32, RecurrenceUpdateMode)
Accepting an appointment invitation.
Declaration
void Accept(int appointmentId, RecurrenceUpdateMode updateMode)
Parameters
Type | Name | Description |
---|---|---|
Int32 | appointmentId | The appointmentId. Both master and child record ids are accepted. |
RecurrenceUpdateMode | updateMode | Update mode for a recurring appointment. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
AcceptRejected(Int32, RecurrenceUpdateMode)
Accept that an invited participant has rejected your invitation or assignment.
Declaration
AppointmentEntity AcceptRejected(int appointmentId, RecurrenceUpdateMode updateMode)
Parameters
Type | Name | Description |
---|---|---|
Int32 | appointmentId | The appointmentId. Both master and child record ids are accepted. |
RecurrenceUpdateMode | updateMode | Update mode for a recurring appointment. |
Returns
Type | Description |
---|---|
AppointmentEntity | Updated AppointmentEntity |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
AcceptWithEmailConfirmation(Int32, RecurrenceUpdateMode)
Accepting an appointment invitation and send an email confirmation to the meeting organizer.
Declaration
void AcceptWithEmailConfirmation(int appointmentId, RecurrenceUpdateMode updateMode)
Parameters
Type | Name | Description |
---|---|---|
Int32 | appointmentId | The appointmentId. Both master and child record ids are accepted. |
RecurrenceUpdateMode | updateMode | Update mode for a recurring appointment. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
AcceptWithSmtpEmailConfirmation(Int32, RecurrenceUpdateMode, EMailConnectionInfo)
Accepting an appointment invitation and send an email confirmation to the meeting organizer.
Declaration
void AcceptWithSmtpEmailConfirmation(int appointmentId, RecurrenceUpdateMode updateMode, EMailConnectionInfo smtpEMailConnectionInfo)
Parameters
Type | Name | Description |
---|---|---|
Int32 | 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. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
AssignTo(Int32, ParticipantInfo, RecurrenceUpdateMode)
Assigning an appointment to another person.
Declaration
AppointmentEntity AssignTo(int appointmentId, ParticipantInfo participant, RecurrenceUpdateMode updateMode)
Parameters
Type | Name | Description |
---|---|---|
Int32 | appointmentId | The appointmentId. Both master and child record ids are accepted. |
ParticipantInfo | participant | |
RecurrenceUpdateMode | updateMode | Update mode for a recurring appointment. |
Returns
Type | Description |
---|---|
AppointmentEntity | Updated AppointmentEntity |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
CalculateDays(AppointmentEntity)
Calculates the set of dates that represents a recurrence pattern. Adds conflict information to each date.
Declaration
RecurrenceInfo CalculateDays(AppointmentEntity appointmentEntity)
Parameters
Type | Name | Description |
---|---|---|
AppointmentEntity | appointmentEntity |
Returns
Type | Description |
---|---|
RecurrenceInfo |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
CanAssignToProjectMember(Int32, Int32)
Interface for the Appointment Agent Collection of all services that works with Appointment data.
Declaration
bool CanAssignToProjectMember(int projectId, int suggestedAppointmentId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | projectId | |
Int32 | suggestedAppointmentId |
Returns
Type | Description |
---|---|
Boolean |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
CleanUpBookingDeleted(Int32[])
Deletes all appointments(within the appointmentIds array) with status BookingDeleted.
Declaration
int CleanUpBookingDeleted(int[] appointmentIds)
Parameters
Type | Name | Description |
---|---|---|
Int32[] | appointmentIds |
Returns
Type | Description |
---|---|
Int32 | Number of modified or deleted appointments |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
CleanUpBookingDeletedWithUpdateMode(Int32[], RecurrenceUpdateMode)
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
void CleanUpBookingDeletedWithUpdateMode(int[] appointmentIds, RecurrenceUpdateMode updateMode)
Parameters
Type | Name | Description |
---|---|---|
Int32[] | appointmentIds | List of appointment IDs |
RecurrenceUpdateMode | updateMode | Update mode |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
CleanUpRecurringBookingDeleted()
Deletes all appointments with status BookingDeleted and for in logged user.
Declaration
int CleanUpRecurringBookingDeleted()
Returns
Type | Description |
---|---|
Int32 |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
ConvertAppointmentToTask(Int32)
Convert appointment to task if certain criteria are met (participants < 2)
Declaration
AppointmentEntity ConvertAppointmentToTask(int appointmentId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | appointmentId | Appointment ID |
Returns
Type | Description |
---|---|
AppointmentEntity | Appointment entity |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
CreateAndAccept(Int32, RecurrenceUpdateMode)
Creating an appointment from an emailItem invitation and accepting it.
Declaration
void CreateAndAccept(int emailItemId, RecurrenceUpdateMode updateMode)
Parameters
Type | Name | Description |
---|---|---|
Int32 | emailItemId | The emailItemId |
RecurrenceUpdateMode | updateMode | Update mode for a recurring appointment. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
CreateAndAcceptWithEmailConfirmation(Int32, RecurrenceUpdateMode)
Creating an appointment from an emailItem invitation and accepting it with email confirmation to the meeting organizer.
Declaration
void CreateAndAcceptWithEmailConfirmation(int emailItemId, RecurrenceUpdateMode updateMode)
Parameters
Type | Name | Description |
---|---|---|
Int32 | emailItemId | The emailItemId |
RecurrenceUpdateMode | updateMode | Update mode for a recurring appointment. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
CreateAppointmentEntityFromExisting(Int32, Int32)
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
AppointmentEntity CreateAppointmentEntityFromExisting(int appointmentId, int associateId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | appointmentId | Source appointment ID |
Int32 | associateId | Associate owning the new appointment. If 0 the current associate is used. |
Returns
Type | Description |
---|---|
AppointmentEntity | AppointmentEntity with values copied from an existing appointment. Values that are not copied will be the default values. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
CreateAppointmentForUID(AppointmentEntity, String)
Create an invitation record and an appointment with a given UID to reserve it if the UID is unused, otherwise null.
Declaration
AppointmentEntity CreateAppointmentForUID(AppointmentEntity appointmentEntity, string uID)
Parameters
Type | Name | Description |
---|---|---|
AppointmentEntity | appointmentEntity | |
String | uID | The UID associated with the appointment |
Returns
Type | Description |
---|---|
AppointmentEntity | The newly created AppointmentEntity or null if the UID is in the DB already. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
CreateDefaultAppointmentEntity()
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
AppointmentEntity CreateDefaultAppointmentEntity()
Returns
Type | Description |
---|---|
AppointmentEntity | New AppointmentEntity with default values |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
CreateDefaultAppointmentEntityByType(TaskType)
Creates an AppointmentEntity populated with the default values for the specific type.
Declaration
AppointmentEntity CreateDefaultAppointmentEntityByType(TaskType type)
Parameters
Type | Name | Description |
---|---|---|
TaskType | type | The type of task requested. |
Returns
Type | Description |
---|---|
AppointmentEntity | AppointmentEntity with default values. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
CreateDefaultAppointmentEntityByTypeAndAssociate(TaskType, Int32)
Creates a AppointmentEntity populated with the default values for the specific type and owner.
Declaration
AppointmentEntity CreateDefaultAppointmentEntityByTypeAndAssociate(TaskType type, int associateId)
Parameters
Type | Name | Description |
---|---|---|
TaskType | type | The type of task requested. |
Int32 | associateId | The associateId of the appointment owner. |
Returns
Type | Description |
---|---|
AppointmentEntity | AppointmentEntity with default values. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
CreateDefaultAppointmentEntityFromProjectSuggestion(Int32, Int32, Boolean, Int32)
Interface for the Appointment Agent Collection of all services that works with Appointment data.
Declaration
AppointmentEntity CreateDefaultAppointmentEntityFromProjectSuggestion(int suggestedAppointmentId, int projectId, bool createNow, int ownerId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | suggestedAppointmentId | |
Int32 | projectId | |
Boolean | createNow | |
Int32 | ownerId |
Returns
Type | Description |
---|---|
AppointmentEntity |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
CreateDefaultAppointmentEntityFromSaleSuggestion(Int32, Int32, Boolean, Int32)
Creates an appointment based on a suggested appointment.
Declaration
AppointmentEntity CreateDefaultAppointmentEntityFromSaleSuggestion(int suggestedAppointmentId, int saleId, bool createNow, int ownerId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | suggestedAppointmentId | The id of the suggested appointment |
Int32 | 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 |
Boolean | createNow | If this parameter is true, we override the suggested start time and create the appointment with the current date and time |
Int32 | ownerId |
Returns
Type | Description |
---|---|
AppointmentEntity | The newly created appointment |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
CreateDefaultRecurrence()
Creates a RecurrenceInfo object populated with the default values for the specific type.
Declaration
RecurrenceInfo CreateDefaultRecurrence()
Returns
Type | Description |
---|---|
RecurrenceInfo | RecurrenceInfo object with default values. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
CreateDefaultRecurrenceByDate(DateTime)
Creates a RecurrenceInfo object populated with the default values for the specific type. Using startDate as start date for the recurreing pattern.
Declaration
RecurrenceInfo CreateDefaultRecurrenceByDate(DateTime startDate)
Parameters
Type | Name | Description |
---|---|---|
DateTime | startDate | Date of which the recurring pattern should start. |
Returns
Type | Description |
---|---|
RecurrenceInfo |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
CreateDefaultReOpenAppointment(Int32)
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
AppointmentEntity CreateDefaultReOpenAppointment(int saleId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | saleId | The identifier of the stalled sale from which we create a re-open appointment |
Returns
Type | Description |
---|---|
AppointmentEntity | The re-open appointment with start date = the re-open date of the sale and a description matching the sales stalled reason. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
CreateDefaultSuggestedAppointmentEntity()
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
SuggestedAppointmentEntity CreateDefaultSuggestedAppointmentEntity()
Returns
Type | Description |
---|---|
SuggestedAppointmentEntity | New SuggestedAppointmentEntity with default values |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
CreateDefaultTaskListItem()
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
TaskListItem CreateDefaultTaskListItem()
Returns
Type | Description |
---|---|
TaskListItem | New TaskListItem with default values |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
DeclineInvitationFromEmailItem(Int32, String)
Declining an appointment invitation where no tentative appointments have been created.
Declaration
void DeclineInvitationFromEmailItem(int emailItemId, string rejectReason)
Parameters
Type | Name | Description |
---|---|---|
Int32 | emailItemId | The emailItemId. |
String | rejectReason | The reason the invitation was rejected. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
Delete(Int32, RecurrenceUpdateMode, Boolean, EMailConnectionInfo, EMailConnectionInfo)
Deleting a booking
Declaration
void Delete(int appointmentId, RecurrenceUpdateMode updateMode, bool sendEmailToParticipants, EMailConnectionInfo smtpEMailConnectionInfo, EMailConnectionInfo imapEMailConnectionInfo)
Parameters
Type | Name | Description |
---|---|---|
Int32 | appointmentId | The appointmentId. Both master and child record ids are accepted. |
RecurrenceUpdateMode | updateMode | Update mode for a recurring appointment. |
Boolean | 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. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
DeleteAppointmentEntity(Int32)
Deletes the AppointmentEntity
Declaration
void DeleteAppointmentEntity(int appointmentEntityId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | appointmentEntityId | The identity of the AppointmentEntity |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
GenerateLead(Int32, String, String, Int32, String, String, String, String, String, String, String, String)
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
SalesActivity GenerateLead(int associateIdForNewContact, string leadDescription, string relation, int relationId, string leadContact, string leadPersonFirstname, string leadPersonLastname, string leadPersonEmail, string leadPhoneNumber, string creatorsContact, string creatorsFirstname, string creatorsLastname)
Parameters
Type | Name | Description |
---|---|---|
Int32 | 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. |
Int32 | 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 |
Returns
Type | Description |
---|---|
SalesActivity | True if successfull. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
GetActivityInformationListByDatesAndAssociate(DateTime, DateTime, Int32)
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
ActivityInformationListItem[] GetActivityInformationListByDatesAndAssociate(DateTime startDate, DateTime endDate, int associateId)
Parameters
Type | Name | Description |
---|---|---|
DateTime | startDate | Start date of interval. Time portion is ignored. |
DateTime | endDate | End date of interval. Time portion is ignored. |
Int32 | associateId | Associate id to identify the calendar to scan. If 0 is passed in, the currently authenticated associate is used instead. |
Returns
Type | Description |
---|---|
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. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
GetAlarms(Boolean, Boolean, Int32)
Interface for the Appointment Agent Collection of all services that works with Appointment data.
Declaration
MultiAlarmData GetAlarms(bool includeInvitations, bool includeAllAppointments, int defaultAlarmLeadTimeInMinutes)
Parameters
Type | Name | Description |
---|---|---|
Boolean | includeInvitations | |
Boolean | includeAllAppointments | |
Int32 | defaultAlarmLeadTimeInMinutes |
Returns
Type | Description |
---|---|
MultiAlarmData |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
GetAppointment(Int32)
Gets a Appointment object.
Declaration
Appointment GetAppointment(int appointmentId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | appointmentId | The identifier of the Appointment object |
Returns
Type | Description |
---|---|
Appointment | Appointment |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
GetAppointmentEmailInvitation(AppointmentEntity, String, String)
Create an EMailEntity (without an ical attachment) with the email sent to participants when the appointment is saved
Declaration
EMailEntity GetAppointmentEmailInvitation(AppointmentEntity appointment, string templateName, string language)
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 |
Returns
Type | Description |
---|---|
EMailEntity | Email entity with the preview in HTMLBody |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
GetAppointmentEntity(Int32)
Gets a AppointmentEntity object.
Declaration
AppointmentEntity GetAppointmentEntity(int appointmentEntityId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | appointmentEntityId | The identifier of the AppointmentEntity object |
Returns
Type | Description |
---|---|
AppointmentEntity | AppointmentEntity |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
GetAppointmentFromUID(String)
Get the appointment that corresponds to the given UID.
Declaration
AppointmentEntity GetAppointmentFromUID(string uID)
Parameters
Type | Name | Description |
---|---|---|
String | uID | The UID associated with the appointment |
Returns
Type | Description |
---|---|
AppointmentEntity | The corresponding AppointmentEntity if exists or a default appointment entity. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
GetAppointmentHaveParticipantsWithEmail(Int32)
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
bool GetAppointmentHaveParticipantsWithEmail(int appointmentId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | appointmentId | The appointmentId. |
Returns
Type | Description |
---|---|
Boolean | Return true or false. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
GetAppointmentList(Int32[])
Gets an array of Appointment objects.
Declaration
Appointment[] GetAppointmentList(int[] appointmentIds)
Parameters
Type | Name | Description |
---|---|---|
Int32[] | appointmentIds | The identifiers of the Appointment object |
Returns
Type | Description |
---|---|
Appointment[] | Array of Appointment objects |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
GetAppointmentRecords(Int32, Int32)
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
Appointment[] GetAppointmentRecords(int motherId, int recurrenceRuleId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | motherId | Appointment id of the owner of a booking |
Int32 | recurrenceRuleId | RecurrenceId of a recuring appointment |
Returns
Type | Description |
---|---|
Appointment[] |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
GetAppointmentsByTaskHeading(Int32)
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
Appointment[] GetAppointmentsByTaskHeading(int taskHeadingId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | 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 |
Returns
Type | Description |
---|---|
Appointment[] | Array of Appointments. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
GetAssociateDiary(Int32, DateTime, DateTime, Int32)
Interface for the Appointment Agent Collection of all services that works with Appointment data.
Declaration
Appointment[] GetAssociateDiary(int associateId, DateTime startTime, DateTime endTime, int count)
Parameters
Type | Name | Description |
---|---|---|
Int32 | associateId | |
DateTime | startTime | |
DateTime | endTime | |
Int32 | count |
Returns
Type | Description |
---|---|
Appointment[] |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
GetAssociatesDiary(Int32[], DateTime, DateTime)
Fetch appointments for given associates
Declaration
Appointment[] GetAssociatesDiary(int[] associateIds, DateTime startTime, DateTime endTime)
Parameters
Type | Name | Description |
---|---|---|
Int32[] | associateIds | |
DateTime | startTime | |
DateTime | endTime |
Returns
Type | Description |
---|---|
Appointment[] |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
GetAssociatesDiaryInfo(Int32[], DateTime, DateTime)
Fetch appointment info for given associates
Declaration
AppointmentInfo[] GetAssociatesDiaryInfo(int[] associateIds, DateTime startTime, DateTime endTime)
Parameters
Type | Name | Description |
---|---|---|
Int32[] | associateIds | |
DateTime | startTime | |
DateTime | endTime |
Returns
Type | Description |
---|---|
AppointmentInfo[] |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
GetCanInsertForAssociates(Int32[])
Check if current associate can create appointments in the diary of other associates.
Declaration
bool[] GetCanInsertForAssociates(int[] associateIds)
Parameters
Type | Name | Description |
---|---|---|
Int32[] | associateIds | Array of associate ids to check for. |
Returns
Type | Description |
---|---|
Boolean[] | Returns an array of bool corresponding to the associate array input parameter. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
GetContactAppointments(Int32, DateTime, DateTime, Int32)
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
Appointment[] GetContactAppointments(int contactId, DateTime startTime, DateTime endTime, int count)
Parameters
Type | Name | Description |
---|---|---|
Int32 | 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. |
Int32 | count | The maximum number of appointments that should be returned. -1 means no count restrictions. |
Returns
Type | Description |
---|---|
Appointment[] | Array of Appointments. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
GetContactAppointmentsByTask(Int32, DateTime, DateTime, Int32, Int32)
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
Appointment[] GetContactAppointmentsByTask(int contactId, DateTime startTime, DateTime endTime, int count, int taskId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | 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. |
Int32 | count | The maximum number of appointments that should be returned. -1 means no count restrictions. |
Int32 | taskId | The task id. Task represents the different types of activities, like “Phone call”, “Meeting” and so on. |
Returns
Type | Description |
---|---|
Appointment[] | Array of Appointments. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
GetContactAppointmentsByTaskHeading(Int32, DateTime, DateTime, Int32, Int32)
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
Appointment[] GetContactAppointmentsByTaskHeading(int contactId, DateTime startTime, DateTime endTime, int count, int taskHeadingId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | 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. |
Int32 | count | The maximum number of appointments that should be returned. -1 means no count restrictions. |
Int32 | 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. |
Returns
Type | Description |
---|---|
Appointment[] | Array of Appointments. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
GetContactAppointmentsByTasks(Int32, DateTime, DateTime, Int32, Int32[])
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
Appointment[] GetContactAppointmentsByTasks(int contactId, DateTime startTime, DateTime endTime, int count, int[] taskIds)
Parameters
Type | Name | Description |
---|---|---|
Int32 | 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. |
Int32 | count | The maximum number of appointments that should be returned. -1 means no count restrictions. |
Int32[] | taskIds | The task ids as an integer array. Task represents the different types of activities, like “Phone call”, “Meeting” and so on. |
Returns
Type | Description |
---|---|
Appointment[] | Array of Appointments. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
GetContactAppointmentsByType(Int32, DateTime, DateTime, Int32, AppointmentType)
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
Appointment[] GetContactAppointmentsByType(int contactId, DateTime startTime, DateTime endTime, int count, AppointmentType appointmentType)
Parameters
Type | Name | Description |
---|---|---|
Int32 | 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. |
Int32 | 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. |
Returns
Type | Description |
---|---|
Appointment[] | Array of Appointments. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
GetDayInformationListByDatesAndAssociate(DateTime, DateTime, Int32)
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
DayInformationListItem[] GetDayInformationListByDatesAndAssociate(DateTime startDate, DateTime endDate, int associateId)
Parameters
Type | Name | Description |
---|---|---|
DateTime | startDate | Start date of interval. Time portion is ignored. |
DateTime | endDate | End date of interval. Time portion is ignored. |
Int32 | associateId | Associate id to identify the calendar to scan. If 0 is passed in, the currently authenticated associate is used instead. |
Returns
Type | Description |
---|---|
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. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
GetDiaryByGroup(Int32, Int32, DateTime, DateTime, Int32)
Interface for the Appointment Agent Collection of all services that works with Appointment data.
Declaration
Appointment[] GetDiaryByGroup(int groupId, int groupType, DateTime startTime, DateTime endTime, int count)
Parameters
Type | Name | Description |
---|---|---|
Int32 | groupId | |
Int32 | groupType | |
DateTime | startTime | |
DateTime | endTime | |
Int32 | count |
Returns
Type | Description |
---|---|
Appointment[] |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
GetMyAppointments(DateTime, DateTime, Int32)
Method that returns a specified number of appointments within a time range. The appointments belong to the currently logged on user.
Declaration
Appointment[] GetMyAppointments(DateTime startTime, DateTime endTime, int count)
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. |
Int32 | count | The maximum number of appointments that should be returned. -1 means no count restrictions. |
Returns
Type | Description |
---|---|
Appointment[] | Array of Appointments. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
GetMyDiary(DateTime, DateTime, Int32)
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
Appointment[] GetMyDiary(DateTime startTime, DateTime endTime, int count)
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. |
Int32 | count | The maximum number of appointments that should be returned. -1 means no count restrictions. |
Returns
Type | Description |
---|---|
Appointment[] | Array of Appointments. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
GetMyPublishedAppointments()
Get published appointments from the logged in user.
Declaration
Appointment[] GetMyPublishedAppointments()
Returns
Type | Description |
---|---|
Appointment[] | Appointments |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
GetMySyncAppointments(DateTime, DateTime)
Method that returns a specified number of appointments within a time range. The appointments belong to the currently logged on user.
Declaration
AppointmentSyncData[] GetMySyncAppointments(DateTime startTime, DateTime endTime)
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. |
Returns
Type | Description |
---|---|
AppointmentSyncData[] | Array of Appointments. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
GetMyTasks(Int32)
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
Appointment[] GetMyTasks(int count)
Parameters
Type | Name | Description |
---|---|---|
Int32 | count | The maximum number of appointments that should be returned. -1 means no count restrictions. |
Returns
Type | Description |
---|---|
Appointment[] | Array of Appointments. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
GetNextAvailableTime(Int32[], DateTime, DateTime, Int32, Boolean)
An array of the soonest-available working time slots.
Declaration
NextAvailableTime[] GetNextAvailableTime(int[] associates, DateTime startTime, DateTime endTime, int count, bool isAllDay)
Parameters
Type | Name | Description |
---|---|---|
Int32[] | 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. |
Int32 | count | How many next-available date time slots should be returned. |
Boolean | isAllDay | Is the appointment an all day event. |
Returns
Type | Description |
---|---|
NextAvailableTime[] | Array of the soonest-available working time slots. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
GetNextSuggestedAppointmentBySale(Int32, Int32, Boolean)
Gets the next suggested appointment for a given sale (or rather a given sale's guide).
Declaration
SuggestedAppointment GetNextSuggestedAppointmentBySale(int saleId, int currentAppointmentId, bool skipCompleteCheck)
Parameters
Type | Name | Description |
---|---|---|
Int32 | saleId | The identifier of the (guided) sale from which we want to find a suggested appointment |
Int32 | 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. |
Boolean | 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. |
Returns
Type | Description |
---|---|
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. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
GetOrganizerName(Int32)
Lookup the name / email of an event-organizer
Declaration
string GetOrganizerName(int motherAppointmentId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | motherAppointmentId | The id of the mother-appointment. |
Returns
Type | Description |
---|---|
String | The displayed name of the organizer: name or email |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
GetPersonAppointments(Int32, Boolean, DateTime, DateTime, Int32)
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
Appointment[] GetPersonAppointments(int personId, bool includeProjectAppointments, DateTime startTime, DateTime endTime, int count)
Parameters
Type | Name | Description |
---|---|---|
Int32 | personId | The person id of the SuperOffice user (associate). |
Boolean | 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. |
Int32 | count | The maximum number of appointments that should be returned. -1 means no count restrictions. |
Returns
Type | Description |
---|---|
Appointment[] | Array of Appointments. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
GetPersonAppointmentsByTask(Int32, Boolean, DateTime, DateTime, Int32, Int32)
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
Appointment[] GetPersonAppointmentsByTask(int personId, bool includeProjectAppointments, DateTime startTime, DateTime endTime, int count, int taskId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | personId | The person id of the SuperOffice user (associate). |
Boolean | 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. |
Int32 | count | The maximum number of appointments that should be returned. -1 means no count restrictions. |
Int32 | taskId | The task id. Task represents the different types of activities, like “Phone call”, “Meeting” and so on. |
Returns
Type | Description |
---|---|
Appointment[] | Array of Appointments. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
GetPersonAppointmentsByTaskHeading(Int32, Boolean, DateTime, DateTime, Int32, Int32)
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
Appointment[] GetPersonAppointmentsByTaskHeading(int personId, bool includeProjectAppointments, DateTime startTime, DateTime endTime, int count, int taskHeadingId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | personId | The person id of the SuperOffice user (associate). |
Boolean | 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. |
Int32 | count | The maximum number of appointments that should be returned. -1 means no count restrictions. |
Int32 | 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. |
Returns
Type | Description |
---|---|
Appointment[] | Array of Appointments. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
GetPersonAppointmentsByTasks(Int32, Boolean, DateTime, DateTime, Int32, Int32[])
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
Appointment[] GetPersonAppointmentsByTasks(int personId, bool includeProjectAppointments, DateTime startTime, DateTime endTime, int count, int[] taskIds)
Parameters
Type | Name | Description |
---|---|---|
Int32 | personId | The person id of the SuperOffice user (associate). |
Boolean | 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. |
Int32 | count | The maximum number of appointments that should be returned. -1 means no count restrictions. |
Int32[] | taskIds | The task ids as an integer array. Task represents the different types of activities, like “Phone call”, “Meeting” and so on. |
Returns
Type | Description |
---|---|
Appointment[] | Array of Appointments. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
GetPersonAppointmentsByType(Int32, Boolean, DateTime, DateTime, Int32, AppointmentType)
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
Appointment[] GetPersonAppointmentsByType(int personId, bool includeProjectAppointments, DateTime startTime, DateTime endTime, int count, AppointmentType appointmentType)
Parameters
Type | Name | Description |
---|---|---|
Int32 | personId | The person id of the SuperOffice user (associate). |
Boolean | 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. |
Int32 | 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. |
Returns
Type | Description |
---|---|
Appointment[] | Array of Appointments. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
GetPersonDiary(Int32, DateTime, DateTime, Int32)
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
Appointment[] GetPersonDiary(int personId, DateTime startTime, DateTime endTime, int count)
Parameters
Type | Name | Description |
---|---|---|
Int32 | 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. |
Int32 | count | The maximum number of appointments that should be returned. -1 means no count restrictions. |
Returns
Type | Description |
---|---|
Appointment[] | Array of Appointments. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
GetPersonTasks(Int32, Int32)
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
Appointment[] GetPersonTasks(int personId, int count)
Parameters
Type | Name | Description |
---|---|---|
Int32 | personId | The person id of the SuperOffice user (associate). |
Int32 | count | The maximum number of appointments that should be returned. -1 means no count restrictions. |
Returns
Type | Description |
---|---|
Appointment[] | Array of Appointments. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
GetProjectAppointments(Int32, DateTime, DateTime, Int32)
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
Appointment[] GetProjectAppointments(int projectId, DateTime startTime, DateTime endTime, int count)
Parameters
Type | Name | Description |
---|---|---|
Int32 | 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. |
Int32 | count | The maximum number of appointments that should be returned. -1 means no count restrictions. |
Returns
Type | Description |
---|---|
Appointment[] | Array of Appointments. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
GetProjectAppointmentsByTask(Int32, DateTime, DateTime, Int32, Int32)
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
Appointment[] GetProjectAppointmentsByTask(int projectId, DateTime startTime, DateTime endTime, int count, int taskId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | 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. |
Int32 | count | The maximum number of appointments that should be returned. -1 means no count restrictions. |
Int32 | taskId | The task id. Task represents the different types of activities, like “Phone call”, “Meeting” and so on. |
Returns
Type | Description |
---|---|
Appointment[] | Array of Appointments. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
GetProjectAppointmentsByTaskHeading(Int32, DateTime, DateTime, Int32, Int32)
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
Appointment[] GetProjectAppointmentsByTaskHeading(int projectId, DateTime startTime, DateTime endTime, int count, int taskHeadingId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | 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. |
Int32 | count | The maximum number of appointments that should be returned. -1 means no count restrictions. |
Int32 | 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. |
Returns
Type | Description |
---|---|
Appointment[] | Array of Appointments. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
GetProjectAppointmentsByTasks(Int32, DateTime, DateTime, Int32, Int32[])
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
Appointment[] GetProjectAppointmentsByTasks(int projectId, DateTime startTime, DateTime endTime, int count, int[] taskIds)
Parameters
Type | Name | Description |
---|---|---|
Int32 | 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. |
Int32 | count | The maximum number of appointments that should be returned. -1 means no count restrictions. |
Int32[] | taskIds | The task ids as an integer array. Task represents the different types of activities, like “Phone call”, “Meeting” and so on. |
Returns
Type | Description |
---|---|
Appointment[] | Array of Appointments. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
GetProjectAppointmentsByType(Int32, DateTime, DateTime, Int32, AppointmentType)
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
Appointment[] GetProjectAppointmentsByType(int projectId, DateTime startTime, DateTime endTime, int count, AppointmentType appointmentType)
Parameters
Type | Name | Description |
---|---|---|
Int32 | 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. |
Int32 | 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. |
Returns
Type | Description |
---|---|
Appointment[] | Array of Appointments. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
GetProjectMemberAppointments(Int32, DateTime, DateTime, Int32)
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
Appointment[] GetProjectMemberAppointments(int personId, DateTime startTime, DateTime endTime, int count)
Parameters
Type | Name | Description |
---|---|---|
Int32 | 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. |
Int32 | count | The maximum number of appointments that should be returned. -1 means no count restrictions. |
Returns
Type | Description |
---|---|
Appointment[] | Array of Appointments. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
GetProjectMemberAppointmentsByTask(Int32, DateTime, DateTime, Int32, Int32)
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
Appointment[] GetProjectMemberAppointmentsByTask(int personId, DateTime startTime, DateTime endTime, int count, int taskId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | 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. |
Int32 | count | The maximum number of appointments that should be returned. -1 means no count restrictions. |
Int32 | taskId | The task id. Task represents the different types of activities, like “Phone call”, “Meeting” and so on. |
Returns
Type | Description |
---|---|
Appointment[] | Array of Appointments. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
GetProjectMemberAppointmentsByTaskHeading(Int32, DateTime, DateTime, Int32, Int32)
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
Appointment[] GetProjectMemberAppointmentsByTaskHeading(int personId, DateTime startTime, DateTime endTime, int count, int taskHeadingId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | 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. |
Int32 | count | The maximum number of appointments that should be returned. -1 means no count restrictions. |
Int32 | 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. |
Returns
Type | Description |
---|---|
Appointment[] | Array of Appointments. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
GetProjectMemberAppointmentsByTasks(Int32, DateTime, DateTime, Int32, Int32[])
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
Appointment[] GetProjectMemberAppointmentsByTasks(int personId, DateTime startTime, DateTime endTime, int count, int[] taskIds)
Parameters
Type | Name | Description |
---|---|---|
Int32 | 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. |
Int32 | count | The maximum number of appointments that should be returned. -1 means no count restrictions. |
Int32[] | taskIds | The task ids as an integer array. Task represents the different types of activities, like “Phone call”, “Meeting” and so on. |
Returns
Type | Description |
---|---|
Appointment[] | Array of Appointments. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
GetProjectMemberAppointmentsByType(Int32, DateTime, DateTime, Int32, AppointmentType)
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
Appointment[] GetProjectMemberAppointmentsByType(int personId, DateTime startTime, DateTime endTime, int count, AppointmentType appointmentType)
Parameters
Type | Name | Description |
---|---|---|
Int32 | 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. |
Int32 | 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. |
Returns
Type | Description |
---|---|
Appointment[] | Array of Appointments. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
GetPublishedAppointment(Int32)
Get published appointment by appointment id.
Declaration
Appointment GetPublishedAppointment(int appointmentId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | appointmentId | The appointment id |
Returns
Type | Description |
---|---|
Appointment | Appointment |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
GetPublishedAppointments(Int32[])
Get published appointments by appointment ids.
Declaration
Appointment[] GetPublishedAppointments(int[] appointmentIds)
Parameters
Type | Name | Description |
---|---|---|
Int32[] | appointmentIds | The array of appointment ids |
Returns
Type | Description |
---|---|
Appointment[] | Array of Appointment |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
GetPublishedProjectAppointments(Int32)
Get published appointments by project id.
Declaration
Appointment[] GetPublishedProjectAppointments(int projectId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | projectId | The project id |
Returns
Type | Description |
---|---|
Appointment[] | Array of Appointment |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
GetRedLetterInformationListByDatesAndAssociate(DateTime, DateTime, Int32)
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
RedLetterInformationListItem[] GetRedLetterInformationListByDatesAndAssociate(DateTime startDate, DateTime endDate, int associateId)
Parameters
Type | Name | Description |
---|---|---|
DateTime | startDate | Start date of interval. Time portion is ignored. |
DateTime | endDate | End date of interval. Time portion is ignored. |
Int32 | associateId | Associate id to identify the calendar to scan. If 0 is passed in, the currently authenticated associate is used instead. |
Returns
Type | Description |
---|---|
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. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
GetSuggestedAppointment(Int32)
Gets a SuggestedAppointment object.
Declaration
SuggestedAppointment GetSuggestedAppointment(int suggestedAppointmentId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | suggestedAppointmentId | The identifier of the SuggestedAppointment object |
Returns
Type | Description |
---|---|
SuggestedAppointment | SuggestedAppointment |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
GetSuggestedAppointmentEntity(Int32)
Gets a SuggestedAppointmentEntity object.
Declaration
SuggestedAppointmentEntity GetSuggestedAppointmentEntity(int suggestedAppointmentEntityId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | suggestedAppointmentEntityId | The identifier of the SuggestedAppointmentEntity object |
Returns
Type | Description |
---|---|
SuggestedAppointmentEntity | SuggestedAppointmentEntity |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
GetTaskListItem(Int32)
Gets a TaskListItem object.
Declaration
TaskListItem GetTaskListItem(int taskListItemId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | taskListItemId | The identifier of the TaskListItem object |
Returns
Type | Description |
---|---|
TaskListItem | TaskListItem |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
GetTaskListItems(Boolean)
Gets all takslist items
Declaration
TaskListItem[] GetTaskListItems(bool includeDeleted)
Parameters
Type | Name | Description |
---|---|---|
Boolean | includeDeleted | Include deleted items |
Returns
Type | Description |
---|---|
TaskListItem[] | An array of tasklist items |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
GetUIDFromAppointmentId(Int32, Boolean)
Get the UID associated with the appointment id in the Invitation table.
Declaration
string GetUIDFromAppointmentId(int appointmentId, bool useMotherId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | appointmentId | |
Boolean | useMotherId | Uses motherId if no UID is found for appointmentId. |
Returns
Type | Description |
---|---|
String | The associated UID, or null if none exist. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
Move(Int32, DateTime, RecurrenceUpdateMode)
Moving a booking to another start time.
Declaration
AppointmentEntity Move(int appointmentId, DateTime newStartTime, RecurrenceUpdateMode updateMode)
Parameters
Type | Name | Description |
---|---|---|
Int32 | 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. |
Returns
Type | Description |
---|---|
AppointmentEntity | Updated AppointmentEntity |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
MoveWithEmail(Int32, DateTime, RecurrenceUpdateMode, Boolean, EMailConnectionInfo, EMailConnectionInfo)
Moving a booking to another start time.
Declaration
AppointmentEntity MoveWithEmail(int appointmentId, DateTime newStartTime, RecurrenceUpdateMode updateMode, bool sendEmailToParticipants, EMailConnectionInfo smtpEMailConnectionInfo, EMailConnectionInfo imapEMailConnectionInfo)
Parameters
Type | Name | Description |
---|---|---|
Int32 | 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. |
Boolean | 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. |
Returns
Type | Description |
---|---|
AppointmentEntity | Updated AppointmentEntity |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
Reject(Int32, String, RecurrenceUpdateMode)
Rejecting an appointment invitation
Declaration
void Reject(int appointmentId, string rejectReason, RecurrenceUpdateMode updateMode)
Parameters
Type | Name | Description |
---|---|---|
Int32 | 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. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
RejectWithEmailConfirmation(Int32, String, RecurrenceUpdateMode)
Rejecting an appointment invitation and send an email confirmation to the meeting organizer.
Declaration
void RejectWithEmailConfirmation(int appointmentId, string rejectReason, RecurrenceUpdateMode updateMode)
Parameters
Type | Name | Description |
---|---|---|
Int32 | 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. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
RejectWithSmtpEmailConfirmation(Int32, String, RecurrenceUpdateMode, EMailConnectionInfo)
Rejecting an appointment invitation and send an email confirmation to the meeting organizer.
Declaration
void RejectWithSmtpEmailConfirmation(int appointmentId, string rejectReason, RecurrenceUpdateMode updateMode, EMailConnectionInfo smtpEMailConnectionInfo)
Parameters
Type | Name | Description |
---|---|---|
Int32 | 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. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
RequestForInfo(Int32, String, String, String, String, String, String, String)
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
SalesActivity RequestForInfo(int associateIdForNewContact, string channel, string regarding, string contactName, string personFirstname, string personLastname, string emailAddress, string phoneNumber)
Parameters
Type | Name | Description |
---|---|---|
Int32 | 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. |
Returns
Type | Description |
---|---|
SalesActivity | True if the submission was successful. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
Save(AppointmentEntity, RecurrenceUpdateMode, Boolean, EMailConnectionInfo, EMailConnectionInfo)
Saving a booking.
Declaration
AppointmentEntity Save(AppointmentEntity appointmentEntity, RecurrenceUpdateMode updateMode, bool sendEmailToParticipants, EMailConnectionInfo smtpEMailConnectionInfo, EMailConnectionInfo imapEMailConnectionInfo)
Parameters
Type | Name | Description |
---|---|---|
AppointmentEntity | appointmentEntity | |
RecurrenceUpdateMode | updateMode | Update mode for a recurring appointment. |
Boolean | 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. |
Returns
Type | Description |
---|---|
AppointmentEntity | Updated AppointmentEntity |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
SaveAppointmentEntity(AppointmentEntity)
Updates the existing AppointmentEntity or creates a new AppointmentEntity if the id parameter is empty
Declaration
AppointmentEntity SaveAppointmentEntity(AppointmentEntity appointmentEntity)
Parameters
Type | Name | Description |
---|---|---|
AppointmentEntity | appointmentEntity | The AppointmentEntity that is saved. |
Returns
Type | Description |
---|---|
AppointmentEntity | New or updated AppointmentEntity |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
SaveSuggestedAppointmentEntity(SuggestedAppointmentEntity)
Updates the existing SuggestedAppointmentEntity or creates a new SuggestedAppointmentEntity if the id parameter is empty
Declaration
SuggestedAppointmentEntity SaveSuggestedAppointmentEntity(SuggestedAppointmentEntity suggestedAppointmentEntity)
Parameters
Type | Name | Description |
---|---|---|
SuggestedAppointmentEntity | suggestedAppointmentEntity | The SuggestedAppointmentEntity that is saved. |
Returns
Type | Description |
---|---|
SuggestedAppointmentEntity | New or updated SuggestedAppointmentEntity |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
SaveTaskListItem(TaskListItem)
Updates the existing TaskListItem or creates a new TaskListItem if the id parameter is empty
Declaration
TaskListItem SaveTaskListItem(TaskListItem taskListItem)
Parameters
Type | Name | Description |
---|---|---|
TaskListItem | taskListItem | The TaskListItem that is saved. |
Returns
Type | Description |
---|---|
TaskListItem | New or updated TaskListItem |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
SaveWithCustomInvitation(AppointmentEntity, RecurrenceUpdateMode, Boolean, EMailConnectionInfo, EMailConnectionInfo, String, String, String)
Save a booking and send a custom invitation email to participants
Declaration
AppointmentSaveData SaveWithCustomInvitation(AppointmentEntity appointmentEntity, RecurrenceUpdateMode updateMode, bool sendEmailToParticipants, EMailConnectionInfo smtpEMailConnectionInfo, EMailConnectionInfo imapEMailConnectionInfo, string emailBody, string subject, string templateLanguage)
Parameters
Type | Name | Description |
---|---|---|
AppointmentEntity | appointmentEntity | |
RecurrenceUpdateMode | updateMode | Update mode for a recurring appointment. |
Boolean | 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 |
Returns
Type | Description |
---|---|
AppointmentSaveData | Appointment entity and flag for if email was queued to be sent |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
SetActivityStatus(String[], ActivityStatus)
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
void SetActivityStatus(string[] activityIdentifier, ActivityStatus activityStatus)
Parameters
Type | Name | Description |
---|---|---|
String[] | activityIdentifier | Array of activity ids. ex. appointment_id=666 |
ActivityStatus | activityStatus | The status to set the activities |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
SetSeen(Int32, RecurrenceUpdateMode)
Sets an appointment invitiation to seen.
Declaration
void SetSeen(int appointmentId, RecurrenceUpdateMode updateMode)
Parameters
Type | Name | Description |
---|---|---|
Int32 | appointmentId | The appointmentId. Both master and child record ids are accepted. |
RecurrenceUpdateMode | updateMode | Update mode for a recurring appointment. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
SetSeenMany(Int32[], RecurrenceUpdateMode)
Sets a list of appointment invitations to seen. The same update mode will be used for all appointments in this batch.
Declaration
void SetSeenMany(int[] appointmentIds, RecurrenceUpdateMode updateMode)
Parameters
Type | Name | Description |
---|---|---|
Int32[] | appointmentIds | List of appointment IDs |
RecurrenceUpdateMode | updateMode | Update mode for a recurring appointment. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
ToggleActivities(String[])
Toggle the completed status for an array of activities.
Declaration
ActivityStatus ToggleActivities(string[] activityIdentifier)
Parameters
Type | Name | Description |
---|---|---|
String[] | activityIdentifier | Contain of a mix of appointment_id, sale_id, document_id and todo_id. |
Returns
Type | Description |
---|---|
ActivityStatus | The resulting ActivityStatus of the first in the array |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
ToggleActivity(String)
Toggle the completed status for an activity. Activity may be sale, document or appointment. The changes are saved immediately.
Declaration
ActivityStatus ToggleActivity(string activityIdentifier)
Parameters
Type | Name | Description |
---|---|---|
String | activityIdentifier | May contain of a mix of appointment_id, sale_id, document_id and todo_id |
Returns
Type | Description |
---|---|
ActivityStatus | What the result after toggling was. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
ToggleAndSetActivities(String[])
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
string[] ToggleAndSetActivities(string[] activityIdentifiers)
Parameters
Type | Name | Description |
---|---|---|
String[] | activityIdentifiers | Array of activity ids. ex. appointment_id=666 |
Returns
Type | Description |
---|---|
String[] | The identifiers that were not toggled. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
ToggleAppointmentStatus(Int32)
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
AppointmentStatus ToggleAppointmentStatus(int appointmentId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | appointmentId | The appointment id. |
Returns
Type | Description |
---|---|
AppointmentStatus | The new AppointmentStatus |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
UpdateAppointment(Int32, DateTime, DateTime, Int32, Int32, Int32)
Updates an appointment record.
Declaration
Appointment UpdateAppointment(int id, DateTime startTime, DateTime endTime, int status, int type, int associateId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | id | |
DateTime | startTime | |
DateTime | endTime | |
Int32 | status | |
Int32 | type | |
Int32 | associateId | The appointment owner's id (associate id) |
Returns
Type | Description |
---|---|
Appointment |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
UpdateAppointmentFromIcsResponse(String, Stream)
Update the attendance to an appointment based on incoming ICS RSVPs.
Declaration
bool UpdateAppointmentFromIcsResponse(string emailAddress, Stream icsData)
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. |
Returns
Type | Description |
---|---|
Boolean | True if successfull. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
UpdateAppointmentWithMode(Int32, DateTime, DateTime, AppointmentStatus, AppointmentType, Int32, RecurrenceUpdateMode)
Updates an appointment record, taking the given recurrence update mode into account.
Declaration
Appointment UpdateAppointmentWithMode(int id, DateTime startTime, DateTime endTime, AppointmentStatus status, AppointmentType type, int associateId, RecurrenceUpdateMode updateMode)
Parameters
Type | Name | Description |
---|---|---|
Int32 | id | |
DateTime | startTime | |
DateTime | endTime | |
AppointmentStatus | status | |
AppointmentType | type | |
Int32 | associateId | The appointment owner's id (associate id) |
RecurrenceUpdateMode | updateMode | Update mode for recurrence. |
Returns
Type | Description |
---|---|
Appointment |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
UpdateAppointmentWithModeAndEmail(Int32, DateTime, DateTime, AppointmentStatus, AppointmentType, Int32, RecurrenceUpdateMode, Boolean, EMailConnectionInfo, EMailConnectionInfo)
Updates an appointment record, taking the given recurrence update mode into account, possibly sending notification emails.
Declaration
Appointment UpdateAppointmentWithModeAndEmail(int id, DateTime startTime, DateTime endTime, AppointmentStatus status, AppointmentType type, int associateId, RecurrenceUpdateMode updateMode, bool sendEmailToParticipants, EMailConnectionInfo smtpEMailConnectionInfo, EMailConnectionInfo imapEMailConnectionInfo)
Parameters
Type | Name | Description |
---|---|---|
Int32 | id | |
DateTime | startTime | |
DateTime | endTime | |
AppointmentStatus | status | |
AppointmentType | type | |
Int32 | associateId | The appointment owner's id (associate id) |
RecurrenceUpdateMode | updateMode | Update mode for recurrence. |
Boolean | 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. |
Returns
Type | Description |
---|---|
Appointment |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
ValidateAppointmentEntity(AppointmentEntity)
Check that entity is ready for saving.
Declaration
StringDictionary ValidateAppointmentEntity(AppointmentEntity appointmentEntity)
Parameters
Type | Name | Description |
---|---|---|
AppointmentEntity | appointmentEntity | Entity to be checked. |
Returns
Type | Description |
---|---|
StringDictionary | Error messages tagged by field. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
ValidateDays(AppointmentEntity, DateTime[])
Validates the set of dates to calculate any conflicts.
Declaration
RecurrenceDate[] ValidateDays(AppointmentEntity appointmentEntity, DateTime[] dates)
Parameters
Type | Name | Description |
---|---|---|
AppointmentEntity | appointmentEntity | |
DateTime[] | dates | The dates to validate. |
Returns
Type | Description |
---|---|
RecurrenceDate[] | Array of RecurrenceDate object for each validated date. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}
WillSendEmail(AppointmentEntity)
Returns true if the changes will trigger email sending on Save, so you can inform the user.
Declaration
bool WillSendEmail(AppointmentEntity appointment)
Parameters
Type | Name | Description |
---|---|---|
AppointmentEntity | appointment | The appointment carrier with changes made, before saving the changes. |
Returns
Type | Description |
---|---|
Boolean | True if the changes to the appointment and preference settings etc. indicates an email should be sent. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AppointmentAgent agent = new AppointmentAgent())
{
// call methods on agent here...
}
}