Activities

You can also use NSContactAgent to check what’s going on.

GetMyActiveContacts

Here we get all activities that happened the last week for companies tied to the currently signed-in user.

You can filter by category and action type.

🛈 Tip
Set the start time to a future date to get all activities since the last sign-in.
NSContactAgent contactAgent;

DateTime start;
Integer[] categories; // ignore filter

NSContactActivity[] activities = contactAgent.GetMyActiveContacts(start.addDay(-7), categories, 63);

for (Integer i = 0; i < activities.length(); i++) {
  NSContactActivity a = activities[i];
  printLine("At " + a.GetActionTime().toString() + ", " + a.GetActivityPersonName() + " did something to " + a.GetName());
}

NSContactSummary GetContactSummary(Integer contactId, Integer limit)

Get a summary of a company’s recent activity.

Integer contactId = 2;
NSContactAgent agent;

NSContactSummary summary = agent.GetContactSummary(contactId, -1);

NSActivitySummaryItem[] followups = summary.GetFollowups();

for (Integer i = 0; i < followups.length(); i++) {
  printLine(followups[i].GetDate().toString());
}
🛈 Tip
You can explore other collections in the activity summary too.

Action types

ValueDescription
1created
2updated
4new activity
8activity completed
16person added
32person updated
🛈 Tip
To request more than one action type, summarize the values. 63 means include all.