Skip to main content
Version: Flutter SDK

Start a message programmatically

In most cases, you should let the Screeb targeting engine start messages. You can also display a specific message from your app.

tip

You can find the MESSAGE_ID in the message editor URL, after the /messages/ part.

PluginScreeb.startMessage("<message-id>");

Prevent multiple displaysโ€‹

If the current user already saw or replied to your message and you do not want to display it again, set allowMultipleResponses to false:

PluginScreeb.startMessage("<message-id>", allowMultipleResponses: false);

Respect message statusโ€‹

By default, manual message start ignores the message status. To respect the message status, set ignoreMessageStatus to false:

PluginScreeb.startMessage("<message-id>", ignoreMessageStatus: false);

Contextualize the responseโ€‹

The startMessage command accepts hidden fields. Values passed as parameters will be listed alongside the response in Screeb.

PluginScreeb.startMessage("<message-id>", properties: <String, dynamic>{
'source': 'checkout',
'plan': 'team',
});

Force languageโ€‹

You can force the message language with the language parameter:

PluginScreeb.startMessage("<message-id>", language: "en");