Rich Objects
Rich Objects are in early access
Rich Objects are only available on web during early access. Rich Object support in FUB's iOS and Android mobile applications is coming soon.
Rich Objects enable integration partners to include rich and interactive content to Inbox App messages.
Including Rich Objects with a message
To include a Rich Object with your message, include the richObjects
array in your add message request with the fully qualified URL where the Rich Object can be accessed. Follow Up Boss will download and verify the Rich Object before accepting your request, and then may re-fetch it again many times in the future according to the caching TTL you specify.
Verifying requests
Follow Up Boss includes FUB-Signature-Timestamp
and FUB-Signature
headers each time we fetch a Rich Object from your systems, which you can use to verify the request is authentic and originates from FUB.
To verify a signature, concatenate the FUB-Signature-Timestamp
and the fully qualified URL of the Rich Object with a colon then Base64 the resulting string and compare it against a SHA246 hash encoded using your System Key.
function isGenuineRequest(
string $richObjectUrl,
string $fubSignatureTimestamp,
string $fubSignature
): bool {
$encoded = base64_encode("{$fubSignatureTimestamp}:{$richObjectUrl}");
$calculatedHash = hash_hmac('sha256', $encoded, 'YOUR-X-SYSTEM-KEY');
return $calculatedHash === $fubSignature;
}
Transport wrapper
All Rich Objects are required to be wrapped in a "transport wrapper" which defines specific attributes about the Rich Object such as how long Follow Up Boss should cache it for, what Title and URL we should use as a fallback if the cache expires and we are unable to refetch it, etc.
{
"url": "https://example.com/richObject/a-b-c",
"ttl": 300,
"fallbackTitle": "123 Main Street",
"fallbackUrl": "https://example.com/properties/123-main-street",
"data": {}
}
Property | Type | Required | Description |
---|---|---|---|
url | string | Yes | URL where FUB can fetch the Rich Object. |
ttl | integer | Yes | Duration in seconds that FUB can cache the Rich Object data. Can be set to -1 to allow FUB to cache it forever. |
fallbackTitle | string | Yes | Fallback title FUB should use to display the Rich Object if the cache has expired and we are unable to re-fetch it. |
fallbackUrl | string | Yes | Fallback URL FUB should link the user to if the cache has expired and we are unable to re-fetch it. |
data | object | Yes | Rich Object data (see below.) |
Rich Object Types
Link
Link Rich Objects are generic and highly flexible objects that can be used for many types of information.
{
"type": "link",
"url": "https://example.com/portal/baa",
"title": "Buyer Agency Agreement",
"description": "Signed Buyer Agency Agreement from Beth Buyer.",
"image": "https://example.com/images/baa.png"
}
Property | Type | Required | Description |
---|---|---|---|
type | string | Yes | Always link . |
url | string | Yes | URL to link the user to when they tap the Rich Object. |
title | string | Yes | Title to display on the Rich Object. |
description | string | No | Description to show on the Rich Object. |
image | string | No | Preview image to show on the Rich Object. |
Property
Property Rich Objects are used for representing a listing from an IDX.
{
"type": "property",
"url": "https://example.com/properties/123-main-street",
"image": "https://example.com/images/123-main-street.png",
"price": 399000,
"street": "123 Main Street",
"city": "Anyville",
"state": "CA",
"code": "90001",
"bedrooms": "3",
"bathrooms": "2.5",
"area": "1700",
"propertyType": "Home for Sale",
"mlsAttribution": {
"mlsId": 12345678,
"mlsLogo": "https://example.com/images/foobarmls.png",
"mlsAttributionString": "Example Realty of California MLS ID #12-34567"
}
}
Property | Type | Required | Description |
---|---|---|---|
type | string | Yes | Always property . |
url | string | Yes | URL to link the user to when they tap the Rich Object. |
image | string | No | Preview image to show on the Rich Object. |
price | integer | Yes | Property price. |
street | string | Yes | Property street address. |
city | string | Yes | Property city. |
state | string | Yes | Property state abbreviation. |
code | string | Yes | Property postal code. |
bedrooms | string | Yes | Property bedrooms. |
bathrooms | string | Yes | Property bathrooms. |
area | string | Yes | Property area (square footage.) |
propertyType | string | Yes | Property type. |
mlsAttribution | object | No | MLS Attribution |
MLS Attribution
Property | Type | Required | Description |
---|---|---|---|
mlsId | integer | No | MLS ID of the property. |
mlsLogo | string | No | MLS logo. |
mlsAttributionString | string | No | Other MLS attribution. |
Updated about 1 month ago