Show / Hide Table of Contents

Class NSPocketAgent

Agent with Pocket specific functionality.

Syntax
Examples
NSPocketAgent agent;
agent.callMethod(arg1, arg2);

Constructors

NSPocketAgent()

Agent with Pocket specific functionality.

Declaration
NSPocketAgent
Examples
NSPocketAgent agent;
agent.callMethod(arg1, arg2);

Methods

GetPocketStartupData(String[])

Returns start-up data for SuperOffice Pocket CRM

Declaration
NSPocketStartupData GetPocketStartupData(String[] tables, DateTime currentClientTime)
Parameters
Type Name Description
String[] tables
currentClientTime
Returns
Type Description
NSPocketStartupData
Examples
NSPocketAgent agent;
String[] tables;
DateTime currentClientTime;
NSPocketStartupData res = agent.GetPocketStartupData(tables, currentClientTime);

GetPushNotificationTagsForDevice(String)

Retrieves current tag value for a device

Declaration
String GetPushNotificationTagsForDevice(String deviceIdentifier)
Parameters
Type Name Description
String deviceIdentifier
Returns
Type Description
String
Examples
NSPocketAgent agent;
String deviceIdentifier;
String res = agent.GetPushNotificationTagsForDevice(deviceIdentifier);

GetRegisteredDevices(Integer)

Retrieves all registered devices for an associate

Declaration
NSPocketDeviceInfo[] GetRegisteredDevices(Integer associateId)
Parameters
Type Name Description
Integer associateId
Returns
Type Description
NSPocketDeviceInfo[]
Examples
NSPocketAgent agent;
agent.callMethod(arg1, arg2);

RegisterDeviceForPushNotification(NSPocketDeviceInfo)

Registers a device that should receive push notifications when notable events occur

Declaration
Void RegisterDeviceForPushNotification(NSPocketDeviceInfo deviceInfo)
Parameters
Type Name Description
NSPocketDeviceInfo deviceInfo
Returns
Type Description
Void
Examples
NSPocketAgent agent;
agent.callMethod(arg1, arg2);

RunAppointmentAlarmBroker()

Executes the AppointmentAlarmBroker once

Declaration
Void RunAppointmentAlarmBroker()
Returns
Type Description
Void
Examples
NSPocketAgent agent;
agent.callMethod(arg1, arg2);

SendPushNotification(Integer[],PocketNotificationMessage)

Sends a push notification to one or more associates

Declaration
Void SendPushNotification(Integer[] associateIds, PocketNotificationMessage message)
Parameters
Type Name Description
Integer[] associateIds
message
Returns
Type Description
Void
Examples
NSPocketAgent agent;
agent.callMethod(arg1, arg2);

SetPushNotificationTagsForDevice(String,String)

Agent with Pocket specific functionality.

Declaration
Void SetPushNotificationTagsForDevice(String deviceIdentifier, String tags)
Parameters
Type Name Description
String deviceIdentifier
String tags

The notification events a device should receive push notifications for.

Returns
Type Description
Void
Examples
NSPocketAgent agent;
agent.callMethod(arg1, arg2);

SetPushNotificationTagsForUser(Integer,String)

Agent with Pocket specific functionality.

Declaration
Void SetPushNotificationTagsForUser(Integer associateId, String tags)
Parameters
Type Name Description
Integer associateId
String tags

The notification events a user should receive push notifications for.

Returns
Type Description
Void
Remarks

This will update all registered devices for this user.

Examples
NSPocketAgent agent;
agent.callMethod(arg1, arg2);
In This Article
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top