Skip to main content

<a id=“SuperOffice_WebApi_Agents_IPocketAgent”></a> Interface IPocketAgent

Namespace: SuperOffice.WebApi.Agents
Assembly: SuperOffice.WebApi.dll
Agent with Pocket specific functionality

Implements

IAgentBase, IDisposable

Methods

<a id=“SuperOffice_WebApi_Agents_IPocketAgent_GetCallerIDsFromSelectionAsync_System_Int32_System_String_SuperOffice_WebApi_RequestOptions_”></a> GetCallerIDsFromSelectionAsync(int, string, RequestOptions)

Get caller ids from a selection. Queries the shadow selection of persons and companies, so selections of any kind can be used

Parameters

selectionId int Id of selection to get caller ids from lastHash string Hash for the previous call, used for checking if the same set of caller ids was sent in an earlier call, and returning null in that case requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<CallerIDCollection&gt; Collection of caller IDs, containing the hash of the caller ids

<a id=“SuperOffice_WebApi_Agents_IPocketAgent_GetMyCallerIDsAsync_System_String_System_DateTime_System_DateTime_SuperOffice_WebApi_RequestOptions_”></a> GetMyCallerIDsAsync(string, DateTime, DateTime, RequestOptions)

Get caller ids that the current principal might be interested in (phone numbers of related persons in sales and appointments created/owned/touched by ourselves or colleagues in our primary group

Parameters

lastHash string Hash for the previous call, used for checking if the same set of caller ids was sent in a previous call, and returning null in that case minDate DateTime Only check activities after this date maxDate DateTime Only check activities before this date requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<CallerIDCollection&gt; Collection of caller IDs, containing the hash of the caller ids

<a id=“SuperOffice_WebApi_Agents_IPocketAgent_GetPocketStartupDataAsync_System_String___System_DateTime_SuperOffice_WebApi_RequestOptions_”></a> GetPocketStartupDataAsync(string[], DateTime, RequestOptions)

Parameters

tables string[] Tables to check for license currentClientTime DateTime Current time on the client, used for overdue sale lookup having correct timezone relative to client requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<PocketStartupData&gt; Startup data for pocket

<a id=“SuperOffice_WebApi_Agents_IPocketAgent_GetPushNotificationTagsForDeviceAsync_System_String_SuperOffice_WebApi_RequestOptions_”></a> GetPushNotificationTagsForDeviceAsync(string, RequestOptions)

Retrieve current tag value for a device

Parameters

deviceIdentifier string The unique identifier of this device requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<string&gt; A comma separated list of events this device should receive push events for

<a id=“SuperOffice_WebApi_Agents_IPocketAgent_GetRegisteredDevicesAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetRegisteredDevicesAsync(int, RequestOptions)

Retrieve all registered devices for an associate

Parameters

associateId int The user to get devices for requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<PocketDeviceInfo[]&gt;

<a id=“SuperOffice_WebApi_Agents_IPocketAgent_NotificationHandledAsync_SuperOffice_WebApi_Data_NotificationEventType_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> NotificationHandledAsync(NotificationEventType, int, RequestOptions)

Mark a notification as handled, so it can be cleaned up on other clients that have received the notification

Parameters

notificationEventType NotificationEventType Type of notification id int Id of entity to notify about requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task This method has no return value

<a id=“SuperOffice_WebApi_Agents_IPocketAgent_NotificationsHandledAsync_SuperOffice_WebApi_Data_NotificationEvent___SuperOffice_WebApi_RequestOptions_”></a> NotificationsHandledAsync(NotificationEvent[], RequestOptions)

Mark a set of notifications as handled, so they can be cleaned up on other clients that have received the notification

Parameters

notificationEvents NotificationEvent[] List of notifications to mark as handled requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task This method has no return value

<a id=“SuperOffice_WebApi_Agents_IPocketAgent_NotifyUsersAsync_SuperOffice_WebApi_Data_NotificationEventType_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> NotifyUsersAsync(NotificationEventType, int, RequestOptions)

Notify users about a new or changed entity

Parameters

notificationEventType NotificationEventType Type of notification id int Id of entity to notify about requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task This method has no return value

<a id=“SuperOffice_WebApi_Agents_IPocketAgent_RegisterDeviceForPushNotificationAsync_SuperOffice_WebApi_Data_PocketDeviceInfo_SuperOffice_WebApi_RequestOptions_”></a> RegisterDeviceForPushNotificationAsync(PocketDeviceInfo, RequestOptions)

Register a device that should receive push notifications when notable events occour

Parameters

deviceInfo PocketDeviceInfo Properties for the device to register requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task This method has no return value

<a id=“SuperOffice_WebApi_Agents_IPocketAgent_RunAppointmentAlarmBrokerAsync_SuperOffice_WebApi_RequestOptions_”></a> RunAppointmentAlarmBrokerAsync(RequestOptions)

Execute the AppointmentAlarmBroker once

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task This method has no return value

<a id=“SuperOffice_WebApi_Agents_IPocketAgent_SendPushNotificationAsync_System_Int32___SuperOffice_WebApi_Data_PocketNotificationMessage_SuperOffice_WebApi_RequestOptions_”></a> SendPushNotificationAsync(int[], PocketNotificationMessage, RequestOptions)

Send a push notification to one or more associates

Parameters

associateIds int[] The associates to send the push notification message to message PocketNotificationMessage The message to send requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task This method has no return value

<a id=“SuperOffice_WebApi_Agents_IPocketAgent_SetPushNotificationTagsForDeviceAsync_System_String_System_String_SuperOffice_WebApi_RequestOptions_”></a> SetPushNotificationTagsForDeviceAsync(string, string, RequestOptions)

Specify what kind of notification events a device should receive push notifications for

Parameters

deviceIdentifier string The unique identifier for a device tags string A comma separated list of events this device should receive push events for requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task This method has no return value

<a id=“SuperOffice_WebApi_Agents_IPocketAgent_SetPushNotificationTagsForUserAsync_System_Int32_System_String_SuperOffice_WebApi_RequestOptions_”></a> SetPushNotificationTagsForUserAsync(int, string, RequestOptions)

Specify what kind of notification events a user should receive push notifications for. This will update all registerred devices for this user.

Parameters

associateId int The associate to set tags for tags string A comma separated list of events the associate should receive push events for requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task This method has no return value