Aptiv Live External Object

Aptiv Live or Notifications are available as an external salesforce object once the main package is installed. It provides a way to build custom pages or dashboards from AptivIO notifications.

Supported Calls

query()

Special Access Rules

User need to have an associated TeamUser with a valid Token.

Fields

Field Label

API Name

Data Type

Description

ActionsJson

APTIVN__ActionsJson__c

Long Text Area(131072)

List of available actions in json format.

[

       {

       "title": "",

       "url": ""

       }

]

 

Age

APTIVN__Age__c

Text(255)

Age of the notification suffixed by metric mark like d for days.

For example: 12d

AlertDate

APTIVN__AlertDate__c

Text(255)

Date of the notification, in round-trip format.

AlertsJson

APTIVN__AlertsJson__c

Long Text Area(131072)

List of alerts that trigger the notification, in json format.

[

    “Alert1”,

    “Alert2”

]

Display URL

DisplayUrl

URL(1000)

URL form Aptiv.io where the notification details could be seen.

External ID

ExternalId

External Lookup

Unique identifier provided by Aptiv.io

Image

APTIVN__Image__c

URL(255)

Company logo

Important

APTIVN__Important__c

Checkbox

Define the importance of the notification.

Valid values:

·        True

·        False

IsRisk

APTIVN__IsRisk__c

Checkbox

Define the risk of the notification

Valid values:

  • True
  • False

OrgId

APTIVN__OrgId__c

Text(255)

Organization unique identifier form Aptiv.io

OrgLink

APTIVN__OrgLink__c

URL(255)

Organization website URL

OrgName

APTIVN__OrgName__c

Text(255)

Organization Name

ProbId

APTIVN__ProbId__c

Text(255)

 

Score

APTIVN__Score__c

Number(15, 0)

Notification score

Stage

APTIVN__Stage__c

Text(255)

Notification stage

Valid values:

·        EARLY

·        DEFINITE

·        ACTIVE

TeamAlertsJson

APTIVN__TeamAlertsJson__c

Long Text Area(131072)

List of team alerts in json format.

[

    “TeamAlert1”,

    “TeamAlert2”

]

Text

APTIVN__Text__c

Long Text Area(131072)

Notification description

Title

APTIVN__Title__c

Text(255)

Notification title

 

Usage

Notification external object act like any other object from Salesforce and it is available to be used in Salesforce Object Query Language (SOQL) queries.

Remarks:

Notification object because is an external object and it is part of Aptio.io Salesforce application, in queries need to pe prefixed by the namespace, APTIVN, and suffixed by x: APTIVN_Notification_x.

Queried notifications will be sorted by alert date descending.

Query all notifications

Example:

SELECT ExternalId, Id, Stage__c, Title__c, Score__c, AlertDate__c, DisplayUrl FROM APTIVN__Notification__x

 

Remarks:

In SELECT statement could be used all fields available for Notification object.

In Aptiv.io could exists hundreds or thousands of notifications, so to query all notifications without limitations is not a good practice.

Query a limited number of notifications

To limit number of notifications queried, it is used the LIMIT clause.

Example:

SELECT ExternalId, Title FROM APTIVN__Notification__x Limit 10

The query above will return latest 10 notifications.

Query notifications from latest X days

Example:

SELECT ExternalId, Title, Age__c FROM APTIVN__Notification__x WHERE Age__c <= '30d'

The query above will return all notifications from the last 30 days.

Remarks:

The only operator supported is lower and equal with (<=).

The query could be used with LIMIT clause as well.

Select count of all notifications

Example:

SELECT count() FROM APTIVN__Notification__x

Remarks:

The query could have the WHERE clause with the Age__c field.The query SELECT count() FROM APTIVN__Notification__x WHERE Age__c <= '30d will return total number of notifications from the last 30 days.

Dismiss notification

When a notification is dismissed, it will not be returned in the queries.

To dismiss a notification, it is needed to pass the external id of notification in WHERE clause for the ExternalID field followed by NOT IN operator and the external id that want to be dismissed.

Example:

SELECT ExternalId FROM APTIVN__Notification__x Where ExternalId NOT IN '5398985000137848634_2020-10-19'

Remarks:

Could be dismissed multiple notifications by one query, just passing a list of ExternalIds separated by comma (,). E.g.: SELECT ExternalId FROM APTIVN__Notification__x Where ExternalId NOT IN '5398985000137848634_2020-10-19,17546391316772908272_2020-10-20,11905597366112218533_2020-10-21'