Interface ISaintAgent
Interface for the Saint Agent Administration and maintenance of SAINT counters and statuses
Namespace: SuperOffice.CRM.Services
Assembly: SuperOffice.Services.dll
Syntax
[Agent("Saint Agent", "Interface for the Saint Agent. Administration and maintenance of SAINT counters and statuses")]
public interface ISaintAgent : IAgent
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (SaintAgent agent = new SaintAgent())
{
// call methods on agent here...
}
}
Methods
CreateDefaultSaintConfiguration()
Loading default values into a new SaintConfiguration. NetServer calculates default values (e.g. Country) on the entity, which is required when creating/storing a new instance
Declaration
SaintConfiguration CreateDefaultSaintConfiguration()
Returns
Type | Description |
---|---|
SaintConfiguration | New SaintConfiguration with default values |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (SaintAgent agent = new SaintAgent())
{
// call methods on agent here...
}
}
CreateDefaultStatusMonitor()
Loading default values into a new StatusMonitor. NetServer calculates default values (e.g. Country) on the entity, which is required when creating/storing a new instance
Declaration
StatusMonitor CreateDefaultStatusMonitor()
Returns
Type | Description |
---|---|
StatusMonitor | New StatusMonitor with default values |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (SaintAgent agent = new SaintAgent())
{
// call methods on agent here...
}
}
CreateDefaultStatusMonitorPeriods()
Loading default values into a new StatusMonitorPeriods. NetServer calculates default values (e.g. Country) on the entity, which is required when creating/storing a new instance
Declaration
StatusMonitorPeriods CreateDefaultStatusMonitorPeriods()
Returns
Type | Description |
---|---|
StatusMonitorPeriods | New StatusMonitorPeriods with default values |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (SaintAgent agent = new SaintAgent())
{
// call methods on agent here...
}
}
GetSaintConfigurations()
Returns the StatusMonitorPeriods entity.
Declaration
SaintConfiguration[] GetSaintConfigurations()
Returns
Type | Description |
---|---|
SaintConfiguration[] | The SaintConfiguration for all entities |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (SaintAgent agent = new SaintAgent())
{
// call methods on agent here...
}
}
GetStatusMonitor(Int32)
Get a single status monitor based on its identity
Declaration
StatusMonitor GetStatusMonitor(int id)
Parameters
Type | Name | Description |
---|---|---|
Int32 | id | Identity of status monitor |
Returns
Type | Description |
---|---|
StatusMonitor | The requested status monitor |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (SaintAgent agent = new SaintAgent())
{
// call methods on agent here...
}
}
GetStatusMonitorPeriods()
Returns the StatusMonitorPeriods entity.
Declaration
StatusMonitorPeriods GetStatusMonitorPeriods()
Returns
Type | Description |
---|---|
StatusMonitorPeriods | The StatusMonitorEntity |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (SaintAgent agent = new SaintAgent())
{
// call methods on agent here...
}
}
GetStatusMonitors(Int32, String)
Get all active status monitors for a specified target
Declaration
StatusMonitor[] GetStatusMonitors(int id, string type)
Parameters
Type | Name | Description |
---|---|---|
Int32 | id | Identity of target type(contact identity, project identity etc.) |
String | type | Type to get status monitors for("contact", "project", etc.) |
Returns
Type | Description |
---|---|
StatusMonitor[] | Active status monitors |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (SaintAgent agent = new SaintAgent())
{
// call methods on agent here...
}
}
RegenerateCounters(Boolean)
Regenerate the Saint counters - this can take several minutes
Declaration
BatchTaskInfo RegenerateCounters(bool runAsBatch)
Parameters
Type | Name | Description |
---|---|---|
Boolean | runAsBatch | If true, then execute the regeneration as a Batch Task; the service call will return immediately. Otherwise wait until the task completes, may cause a timeout if called as a Web Service |
Returns
Type | Description |
---|---|
BatchTaskInfo | Information about the batch task, if batch execution was requested. Otherwise null |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (SaintAgent agent = new SaintAgent())
{
// call methods on agent here...
}
}
RegenerateStatusMonitor(Int32)
Regenerate the given status monitor
Declaration
void RegenerateStatusMonitor(int statusMonitorId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | statusMonitorId | The id of the statusmonitor to regenerate |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (SaintAgent agent = new SaintAgent())
{
// call methods on agent here...
}
}
RegenerateStatusMonitors(Boolean)
Regenerate status monitors
Declaration
BatchTaskInfo RegenerateStatusMonitors(bool runAsBatch)
Parameters
Type | Name | Description |
---|---|---|
Boolean | runAsBatch | If true, then execute the regeneration as a Batch Task; the service call will return immediately. Otherwise wait until the task completes, may cause a timeout if called as a Web Service |
Returns
Type | Description |
---|---|
BatchTaskInfo | Information about the batch task, if batch execution was requested. Otherwise null |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (SaintAgent agent = new SaintAgent())
{
// call methods on agent here...
}
}
SaveSaintConfiguration(SaintConfiguration)
Updates the existing SaintConfiguration or creates a new SaintConfiguration if the id parameter is empty
Declaration
SaintConfiguration SaveSaintConfiguration(SaintConfiguration saintConfiguration)
Parameters
Type | Name | Description |
---|---|---|
SaintConfiguration | saintConfiguration | The SaintConfiguration that is saved. |
Returns
Type | Description |
---|---|
SaintConfiguration | New or updated SaintConfiguration |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (SaintAgent agent = new SaintAgent())
{
// call methods on agent here...
}
}
SaveStatusMonitor(StatusMonitor)
Updates the existing StatusMonitor or creates a new StatusMonitor if the id parameter is empty
Declaration
StatusMonitor SaveStatusMonitor(StatusMonitor statusMonitor)
Parameters
Type | Name | Description |
---|---|---|
StatusMonitor | statusMonitor | The StatusMonitor that is saved. |
Returns
Type | Description |
---|---|
StatusMonitor | New or updated StatusMonitor |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (SaintAgent agent = new SaintAgent())
{
// call methods on agent here...
}
}
SaveStatusMonitorPeriods(StatusMonitorPeriods)
Updates the existing StatusMonitorPeriods or creates a new StatusMonitorPeriods if the id parameter is empty
Declaration
StatusMonitorPeriods SaveStatusMonitorPeriods(StatusMonitorPeriods statusMonitorPeriods)
Parameters
Type | Name | Description |
---|---|---|
StatusMonitorPeriods | statusMonitorPeriods | The StatusMonitorPeriods that is saved. |
Returns
Type | Description |
---|---|
StatusMonitorPeriods | New or updated StatusMonitorPeriods |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (SaintAgent agent = new SaintAgent())
{
// call methods on agent here...
}
}
SetRankOnStatusMonitors(String, Int32[])
Set rank order on status monitors
Declaration
void SetRankOnStatusMonitors(string type, int[] itemsIds)
Parameters
Type | Name | Description |
---|---|---|
String | type | Type of status monitors to reorder ("contact", "project", etc.) |
Int32[] | itemsIds | The ids of the items in the order you want |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (SaintAgent agent = new SaintAgent())
{
// call methods on agent here...
}
}