# Notification Bubbles for GravityFlow

**URL:** https://community.gravityforms.com/t/notification-bubbles-for-gravityflow/13959
**Category:** Get Help
**Tags:** gravity-flow, admin-notification, buddyboss
**Created:** [November 28, 2022, 6:28pm UTC](https://community.gravityforms.com/t/notification-bubbles-for-gravityflow/13959 "2022-11-28T18:28:22Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![emad2039](https://avatars.discourse-cdn.com/v4/letter/e/6a8cbe/32.png) [@emad2039](https://community.gravityforms.com/u/emad2039)
#### Post date: [November 28, 2022, 6:28pm UTC](https://community.gravityforms.com/t/notification-bubbles-for-gravityflow/13959/1 "2022-11-28T18:28:22Z")

</div>

Hi  
How can I show the number of pending inbox entries (Gravity Flow) in wordpress notifications of admin panel’s bar?

---

<div class="post-metadata">

### Author: ![JamieO](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/jamieo/32/2521_2.png) [@JamieO](https://community.gravityforms.com/u/JamieO)
#### Post date: [December 1, 2022, 5:50pm UTC](https://community.gravityforms.com/t/notification-bubbles-for-gravityflow/13959/2 "2022-12-01T17:50:21Z")

</div>

Hello,

If you want to show the pending inbox count on the admin panel bar, there is a setting under Workflow \> Settings \> Advanced to enable it.

If you want to display that same value for a specific user in a notification, a code solution would involve the Gravity\_Flow\_API::get\_inbox\_entries\_count function.

Example:  
//Replace 1 with whatever user ID your notification wants to send data for  
Gravity\_Flow\_API::get\_inbox\_entries\_count( array( ‘user\_id’ =\> ‘1’ ) );

Here is a snippet that would let you provide this as a merge tag within the notification instead of only through a filter like [gform\_notification](https://docs.gravityforms.com/gform_notification/).

```auto
add_filter( 'gform_replace_merge_tags', 'mergetag_inbox_count', 10, 7 );
function mergetag_inbox_count( $text, $form, $entry, $url_encode, $esc_html, $nl2br, $format ) {
 
	$matches = array();

	preg_match_all( '/{inbox_count(:(.*?))?}/', $text, $matches, PREG_SET_ORDER );

	if ( ! empty( $matches ) ) {

		foreach ( $matches as $match ) {
			$full_tag = $match[0];
			$options_string = isset( $match[2] ) ? $match[2] : false;
		}

		$attributes = shortcode_parse_atts( $options_string );
		if ( ! empty( $attributes ) ) {
			$replace = '';
			if ( $attributes['format'] == 'email' && isset( $attributes['user_id'] ) ) {
				$count = 0;
				$count = Gravity_Flow_API::get_inbox_entries_count( array( 'user_id' => $attributes['user_id'] ) );
				$replace = 'Current Inbox Count: ' . $count;
			}
			$text = str_replace( $full_tag, $replace, $text );
		}
	}

	return $text;
}

```

To use it, you would add something akin to  
{inbox\_count: format=“email” user\_id=“{created\_by:ID}”} for User: {created\_by:display\_name}

---

<div class="post-metadata">

### Author: ![emad2039](https://avatars.discourse-cdn.com/v4/letter/e/6a8cbe/32.png) [@emad2039](https://community.gravityforms.com/u/emad2039)
#### Post date: [December 2, 2022, 2:24pm UTC](https://community.gravityforms.com/t/notification-bubbles-for-gravityflow/13959/3 "2022-12-02T14:24:22Z")

</div>

Thank you for your reply  
I have seen the settings you mentioned.

The fact is that I also use the Buddyboss theme on my site, and if you know it, one of it’s features is the notification section, which shows the number of incoming messages or mentions or… to each user (not just the admin).

I want to be notified in this section when someone has pending entery.

Here are more details about the Notifications section in Buddy Bass:

> **[Notifications - Knowledge Base | BuddyBoss Resources](https://www.buddyboss.com/resources/docs/components/notifications/)**
>
> Learn how to configure the notifications your members receive when they receive updates inside your BuddyBoss Platform.

---

<div class="post-metadata">

### Author: ![JamieO](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/jamieo/32/2521_2.png) [@JamieO](https://community.gravityforms.com/u/JamieO)
#### Post date: [December 2, 2022, 8:18pm UTC](https://community.gravityforms.com/t/notification-bubbles-for-gravityflow/13959/4 "2022-12-02T20:18:04Z")

</div>

Ahhh, in that case, you’d want to use the [Step Framework](https://docs.gravityflow.io/article/93-step-framework) to create a custom step. So you could trigger the BuddyBoss message, mention, notification, etc. at the desired point in the workflow. Or possibly extend the email driven notification to also fire the BuddyBoss notification.

Reach out to our [Gravity Flow support](https://gravityflow.io/support/) if you need more assistance and I’m sure we can help you get exactly what you’re looking to achieve.

Regards,  
Jamie

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex020/uploads/gravityforms1/original/2X/f/fef63f0599c45e0218c30d9f5d7ca8bff9b00189.png) [@system](https://community.gravityforms.com/u/system)
#### Post date: [January 1, 2023, 8:18pm UTC](https://community.gravityforms.com/t/notification-bubbles-for-gravityflow/13959/5 "2023-01-01T20:18:07Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
