# system.util.sendMessage to Perspective session

**URL:** <https://forum.inductiveautomation.com/t/system-util-sendmessage-to-perspective-session/58322>\
**Category:** Ignition\
**Created:** [April 11, 2022, 7:48pm UTC](https://forum.inductiveautomation.com/t/system-util-sendmessage-to-perspective-session/58322 "2022-04-11T19:48:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![calimero100582](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/calimero100582/32/18630_2.png) [@calimero100582](https://forum.inductiveautomation.com/u/calimero100582)\
**Post date:** [April 11, 2022, 7:48pm UTC](https://forum.inductiveautomation.com/t/system-util-sendmessage-to-perspective-session/58322/1 "2022-04-11T19:48:13Z")

</div>

I’m trying to figure out how to send a message from an async method from the Gateway, to a Perspective session

right now, I am trying to use  
`system.util.sendMessage("myProject", "refresh-production-data", scope="S")`

In my table in Perspective I have the following

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/3/e3f8e39fac5a6a2344a1ce3a7f0ffe13195b9b0f.png)

I know the message is sent, as when I use different scope in the sendMessage, I have errors in Ignition logs

Is it how it is supposed to work?

---

<div class="post-metadata">

**Author:** ![calimero100582](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/calimero100582/32/18630_2.png) [@calimero100582](https://forum.inductiveautomation.com/u/calimero100582)\
**Post date:** [April 11, 2022, 8:02pm UTC](https://forum.inductiveautomation.com/t/system-util-sendmessage-to-perspective-session/58322/2 "2022-04-11T20:02:14Z")

</div>

Found out I need an intermediary Perspective Session Events to forward the message to the page

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/3/03546356dcebd80302c563a8e60d73821f89531c.png)

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [April 11, 2022, 8:30pm UTC](https://forum.inductiveautomation.com/t/system-util-sendmessage-to-perspective-session/58322/3 "2022-04-11T20:30:44Z")

</div>

Correct. Perspective _component_-level handlers are listening for messages broadcast _by the session_ at the level you specify, but `system.util.sendMessage` is being broadcast by the Gateway. The Session itself needs to have an intermediary listener to allow for the session to hear the message broadcast by the Gateway, where this _session_-level listener can in turn broadcast and be heard by components.
