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.
import { startMessage } from "@screeb/react-native";
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:
startMessage("<message-id>", false);
Respect message statusโ
By default, manual message start ignores the message status. To respect the message status, set ignoreMessageStatus to false:
startMessage("<message-id>", null, null, false);
Contextualize the responseโ
The startMessage command accepts hidden fields. Values passed as parameters will be listed alongside the response in Screeb.
startMessage("<message-id>", true, {
source: "checkout",
plan: "team",
});
Force languageโ
You can force the message language with the language parameter:
startMessage("<message-id>", null, null, false, undefined, "en");