The redirect object is used to define the URL to visit when interacting with
the notification. This property can be omitted in place of an
onNotificationClickhandler implemented in
the <Inbox /> component.
The target attribute specifies where the new window or tab will be opened.
This property is optional and defaults to _blank. The supported values
are: _self, _blank, _parent, _top, _unfencedTop.
The redirect object is used to define the URL to visit when interacting
with the notification action buttons. This property can be omitted in
place of an onPrimaryActionClickhandler
implemented in the <Inbox /> component.
The target attribute specifies where the new window or tab will be
opened. This property is optional and defaults to _blank. The
supported values are: _self, _blank, _parent, _top, _unfencedTop.
The redirect object is used to define the URL to visit when interacting
with the notification action buttons. This property can be omitted in
place of an onSecondaryActionClickhandler
implemented in the <Inbox /> component.
The target attribute specifies where the new window or tab will be
opened. This property is optional and defaults to _blank. The
supported values are: _self, _blank, _parent, _top, _unfencedTop.
A flag indicating if the notification has been seen. This property is useful
when conditionally delivering notifications in subsequent steps via the skip
function. A notification is marked as seen when the user views the
notification.
The date the notification was last seen. This corresponds to the date the
seen property was set to true, or null if the notification has not been
seen.
The date the notification was last read. This corresponds to the date the
read property was set to true, or null if the notification has not been
read.
Was this page helpful?
await step.inApp('inbox',async()=>{return{ subject:'Welcome to Acme!', body:'We are excited to have you on board.', avatar:'https://acme.com/avatar.png', redirect:{ url:'https://acme.com/welcome', target:'_blank',}, primaryAction:{ label:'Get Started', redirect:{ url:'https://acme.com/get-started', target:'_self',}}, secondaryAction:{ label:'Learn More', redirect:{ url:'https://acme.com/learn-more', target:'_self',}}, data:{ customData:'customValue', text: payload.text,},};});