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": {}
}
PropertyTypeRequiredDescription
urlstringYesURL where FUB can fetch the Rich Object.
ttlintegerYesDuration in seconds that FUB can cache the Rich Object data. Can be set to -1 to allow FUB to cache it forever.
fallbackTitlestringYesFallback title FUB should use to display the Rich Object if the cache has expired and we are unable to re-fetch it.
fallbackUrlstringYesFallback URL FUB should link the user to if the cache has expired and we are unable to re-fetch it.
dataobjectYesRich 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"
}
PropertyTypeRequiredDescription
typestringYesAlways link.
urlstringYesURL to link the user to when they tap the Rich Object.
titlestringYesTitle to display on the Rich Object.
descriptionstringNoDescription to show on the Rich Object.
imagestringNoPreview 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"
    }
}
PropertyTypeRequiredDescription
typestringYesAlways property.
urlstringYesURL to link the user to when they tap the Rich Object.
imagestringNoPreview image to show on the Rich Object.
priceintegerYesProperty price.
streetstringYesProperty street address.
citystringYesProperty city.
statestringYesProperty state abbreviation.
codestringYesProperty postal code.
bedroomsstringYesProperty bedrooms.
bathroomsstringYesProperty bathrooms.
areastringYesProperty area (square footage.)
propertyTypestringYesProperty type.
mlsAttributionobjectNoMLS Attribution

MLS Attribution

PropertyTypeRequiredDescription
mlsIdintegerNoMLS ID of the property.
mlsLogostringNoMLS logo.
mlsAttributionStringstringNoOther MLS attribution.