Documentation Release Notes - July 2024

We're back with some exciting updates! This past month, we've been listening closely to your feedback, and we've truly taken it to heart. Our team has rolled up their sleeves to bring you a slew of improvements and new features that directly address your valuable insights.

From enhancing our REST API with a new type field for better user-channel relationship management to enriching the BizOps Workspace for seamless chat monitoring, we've got plenty to show. Not to mention, Illuminate now offers even more detailed documentation and simplified data handling for your analytical needs.

We've also added new filtering options in Insights, making it easier than ever to fetch just the data you require. If you're diving into Events & Actions, the new event types are here to give you more control over message actions.

Last but not least, as we continue refining our documentation with analytics for search and our AI assistant, we aim to ensure you're always supported with the right information.

So take a peek at the detailed notes, and as always, thank you for helping us make PubNub even better. Your input is invaluable, and we’re committed to turning your feedback into features!

General πŸ› οΈβ€‹

Type field in the membership object (REST API)​

Type: New feature

We added a new, optional type field to the App Context membership object in REST API.

This change means that whenever you make direct calls to PubNub API to set channel membership metadata for a specified UUID or set the members' metadata in the specified channel, you can mark this user-channel relationship with a label, like subscription. You can later filter through this field when getting this data from the App Context API.

For example:

curl -L -X PATCH 'https://ps.pndsn.com/v2/objects/sub-c-4040e3e3-0e12-4e33-9c06-370956ca283d/uuids/user123/channels?include=type' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"set": [
{
"channel": {
"id": "my-channel"
},
"type": "subscription",
"status": "active"
}
]
}'

This field can help you manage the user-channel membership data more effectively and easily differentiate between various membership types.

Read the REST API docs for more details:

Availability

This feature is available only in the App Context API and is not yet available in the SDKs or BizOps Workspace UI in the Admin Portal.

Insights πŸ“Šβ€‹

Filters in top metrics​

Type: Enhancement

This improvement impacts all Insights Premium users who can access their apps' metrics directly through Insights API.

Until now, to get metrics on top channels or users, you had to request top metrics and then manually remove any data you didn't need.

To reduce data processing, improve accuracy, and address the received feedback, we introduced filters so that you can request just the data they need.

For example, you can fetch top metrics only for channels with names starting with "general":

{"top_1000_channels":[{"field":"channel_name","operator":"startsWith",
"value":"general"}]}

Events & Actions βš‘β€‹

Message action event types​

Type: Enhancement

Events & Actions listeners have now received a new Message Action event source that lets you listen to two new event types:

  • Message action created when an action is added to a published message.
  • Message action deleted when an action is removed from a published message.

Message action event types

With these new event types, you can have even more control over messages in your apps by monitoring delivery acknowledgments, read receipts, and reactions such as emojis.

BizOps Workspace πŸ’β€‹

Improved JSON path selection for chat messages​

Type: Improvement

Channel Monitor is a part of BizOps Workspace in the Admin Portal and lets you monitor conversations and messages in your chat app's channels. If the app you monitor is based on the JavaScript Chat SDK, messages published on your app's channels already use the correct message payload structure that Channel Monitor understands and can display correctly in the UI.

However, if you don't use Chat SDK and still want to display messages from your app in Channel Monitor, you need to explicitly tell Channel Monitor what the structure of your message payload is and where it should look for the message content in your JSON payload structure.

It's perfect if you know the path, but what if you have no idea whether it should be $.message.body, $.message.type, or anything else?

This is where the JSON path configuration kicks in.

We added a new UI option to the Channel Monitor that lets you switch between the message and raw JSON views.

JSON-message switch

It's enough if you hover over the correct line with message content in the raw JSON view of the message and Replace the path.

Hover

Confirm your choice.

Replace message content path

You'll now see the message displaying correctly in the channel preview.

Message content

Voila! This change will automatically apply to all messages on all monitored channels within the selected keyset.

Illuminate πŸ’‘β€‹

Extended info on external data sources​

Type: Improvement

PubNub Illuminate lets you analyze your product data and make real-time decisions based on how the data changes over time.

As you may already know, Illuminate lets you analyze any data regardless of whether its source is PubNub or external.

If your real-time app is not powered by PubNub or if you have additional data to send, you can use the PubNub Fire API to send it.

Following your feedback, we've extended the documentation on using external data sources to power Illuminate and sending that data back to your external system once Illuminate processes or analyzes it.

If you still have questions, learn about the details in the External data sources document or contact support.

Measures and dimensions replaced with data fields​

Type: Improvement

The data you analyze in Illuminate can be of various types. So far, you have had to decide at a very early stage of creating a Business Object whether the data you want Illuminate to process is a quantitative measure (like session duration, donation amount, or order value) or a qualitative dimension (like places, products, and people).

In an attempt to improve user experience and reduce confusion around measures and dimensions, we unified both to data fields of different types: Number (1000) or String (VIP User).

Data fields

This update means you don't have to decide if a data field you want to capture is a measure or a dimension. You can simply add any data field and assign a data type. It's as simple as that.

Other πŸŒŸβ€‹

Analytics for search and AI assistant​

Type: New feature

In May, we shared how we replaced the Algolia search in our docs with the new combined search and AI assistant experience.

This month, we went further and started to track analytics in search and AI assistant.

We aimed to see how often you use the new tools and what you are looking for most often so we can address potential documentation gaps or clarify whatever needs clarification.

With that said, we want to ensure we keep an eye on your questions and concerns and do our best to address them!

Last updated on