Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Message schema

Updated on July 20, 2021

Learn about the standard formats for messages to be sent between the Messaging Service and a browser.

Subscribe format

Apply this format when you want to subscribe to WebSockets.

Format
{ 
   "filter":{ 
      "matcher":"string: unique name to define subject eq., pulse, interaction, chat", 
      "criteria":{ 
         "custom props..":"custom values.." 
      } 
   }, 
   "subscribe":{ 
      "id":"string: client id" 
   } 
}
Usage example
{ 
      "filter":{ 
         "matcher":"PULSE", 
         "criteria":{ 
            "user":"alex", 
            "workId":"EPIC-2021" 
         } 
      }, 
    "subscribe":{ 
      "id":"1214455234_1" 
   }  
}

Unsubscribe format

Apply this format when you want to unsubscribe from WebSockets.

Format
{ 
    "unsubscribe":{ 
      "id":"string: client id" 
   } 
}
Usage example
{ 
    "unsubscribe":{ 
      "id":"1214455234_1" 
   }  
}

Message delivery format

Apply this format when you want to send the message to a subscriber matching the specified criteria. If the subscription criteria does not match the criteria of the sent message, the message is discarded.

Format
{ 
      "filter":{ 
         "matcher":"string: unique name to define subject eq., pulse, interaction", 
         "criteria":{ 
            "custom props..":"custom values.." 
         } 
      }, 
      "message":"object : message json" 
}
Usage example
{ 
      "filter":{ 
         "matcher":"PULSE", 
         "criteria ":{ 
            "user":"alex", 
            "workId":"EPIC-2021" 
         } 
      }, 
      "message":{ 
         "updateById":"[email protected]", 
         "messageId":"Pulse P-1021" 
      } 
}

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us