Development Guides

Notification Webhooks

FUSE Notification Platform

See Also:
Test page (look for the fuse icon on the left): https://testapi.orionadvisor.com/api/index.html

  1. Allow Orion to register a webhook for a user. This is where Orion needs your help! We ask that you store an api endpoint (webhook) that you will send alerts/notifications to (as described in step #2). This can simply be a UI where the user can paste the webhook, but Ideally we would like an api call we can use to register it automatically within your system.
  2. Send us your Notifications! Whenever a notification or alert is generated in your system, send it to the Fuse platform. Simply use the registered webhook, no authentication required, so it is as simple as possible.

Step #1 Generate a webhook for the user.


[HTTP POST]
https://testapi.orionadvisor.com/api/v1/Fuse/Config/Integrations

[Headers]Authorization: Session <valid_orion_api_token>client_id: <clientid>
client_secret: <clientsecret>

[body]
{
 "partnerAppId":<clientid>
}

[Response]
{"id":11223,
 "userId":1234,
 "webhookGuid":"a18fa0c5-59df-46ac-98f0-0dee0ce000c3",
 "partnerAppId":9999,
 "name":"PartnerApp Name Sample",
 "active":true,
 "label":"Sample Label",
 "custom":false,
 "partnerUserName":"username@partner.com",
 "createdDate":"2017-01-29T21:06:01.3942326-06:00"
}

Webhook to use for #2: /FUSE/Users/a18fa0c5-59df-46ac-98f0-0dee0ce000c3/Notifications

Step #2 – Post notification to webhook


HEADERS:
client_id: 1234 (provided by orion)
client_secret: <guid> (provided by orion)

{
“Subject”: “My Notification”,
“Body”: “Notification Content”,
“CategoryName”: null, <optional>
“Url”: “<optional: if a contextual url makes sense, enter it here>”,
“ActionName”: “<download or null... this helps with specific coding around the Url, the only 2 options are "download" or null right now>
}

       3.  Finally, and Optionally, you can pull notifications for your own system. This will include notifications you have sent, plus any notifications from Orion, plus any notifications from any other integrated partner systems. Simply use the GET verb, on the same webhook you use to POST notifications.  I will add another article that details how you might choose to show the aggregated notifications in your system.

GET /FUSE/Users/{hookurl from step 1}/Notifications[
{
"id": 107,
"firmId": null,
"partnerUserName": "username@partner.com",
"createdDate": "2016-07-07T09:45:35.5749696-05:00",
"subject": "My Notification",
"body": "Notification Content",
"url": null,
"status": 0,
"partnerAppName": "Aviato",
"categoryName": "Uncategorized",
"integrationId": 25,
"actionName": "download"
}
]


Roadmap:
Right now, you can Poll for notifications (#3 above). Polling is what webhooks eliminates, so as soon as we are finished getting as many systems integrated as possible, we will allow you to register your endpoint (webhook) with us, so we can push you a users notifications, as they happen. We will also allow you to register for many other events, not just notifications, such as Account Creation, or Updates.

Hope you will find time to start wiring in your notifications. Please let us help.


Here are what you will need to get started
1. Obtain a client_id and client_secret from orion (If you do not already have one).  This should be passed in the headers when accessing the webhook.
2. Let us know you want to be added. We use 2 images for your notifications, a small (100×100) and a large (400×400).  This image will display in the orion system with your notifications, and will be available to other partners if they dispaly the notifications.
3. Discuss how we get the webhook to you when the user chooses to connect our platforms.