Skip to content
StampyWalletDocs
MCP and AI / Tools with an account / envoyer_message

envoyer_message

With accountWrites (confirm)

Sends a notification to customers' lock screens (through their Apple Wallet or Google Wallet card). Use it to announce something new, an offer, an event, or to bring customers back. The audience can be set (all, regulars, lost, close to the reward, new, reward to collect, inactive) and combined with filters (days without a visit, stamps on the card, visits, sign-up date). Text of 180 characters at most, sent as is. Only one message per day per business. Call first with confirmer=false: the preview gives the exact text, the number of recipients and how many can actually receive it, without sending anything. Only call with confirmer=true after the person's explicit approval: a message sent cannot be taken back. For automatic messages (win-back, birthday, reminders), use regler_automatismes.

Parameters

textestring, ≤ 180 charactersrequired
The exact text of the notification, 180 characters at most. It is preceded by the business name on the phone: no need to repeat it.
audienceenumoptional
Who receives the message. tous = all customers; habitues = 4 or more visits in 60 days; perdus = regulars whose absence exceeds one and a half times their usual rhythm, or the business's delay without enough history (the definition of the Customers screen); presque = only one stamp missing before the reward; nouveaux = signed up in the last 30 days (or since inscrit_depuis); recompense_prete = a reward earned, not yet collected; inactifs = any customer with no visit for inactif_depuis_jours opening days (by default the business's delay), regular or not. Any audience other than tous, or any filter, requires the "targeted notifications" feature.

Values : tous habitues perdus presque nouveaux recompense_prete inactifs

Default : "tous"

inactif_depuis_joursinteger, 1…730optional
Filter: no visit for at least N OPENING days (closed days and holidays don't count).
actif_depuis_joursinteger, 1…730optional
Filter: at least one visit in the last N opening days.
tampons_mininteger, 0…500optional
Filter: at least N stamps on the current card.
tampons_maxinteger, 0…500optional
Filter: at most N stamps on the current card.
passages_mininteger, 1…10000optional
Filter: at least N visits in total since sign-up.
inscrit_depuisstring (date)optional
Filter: signed up on or after this day (YYYY-MM-DD).
inscrit_avantstring (date)optional
Filter: signed up before this day (YYYY-MM-DD, excluded).
confirmerbooleanoptional
false (default): only returns a preview of what would be done, without changing anything. true: carries it out. Always show the preview to the person and wait for their approval before calling again with true.

Default : false

Response

A text the assistant reads (content), and the same information as structured data (structuredContent). When a call is refused (a parameter to fix, plan, role), the response has isError: true and a sentence the assistant can rephrase.

Warning : this tool writes. Called with confirmer: false (the default), it only returns a preview, without changing anything. The assistant must show it to you and wait for your approval before calling again with confirmer: true.

Updated

Was this page helpful?