Ingame Mail

Hello everyone :slight_smile:
Recently we have been thinking to implement in our game an in-game mailbox which currently a lot of games on the market have it as a feature.
The ingame mail can server the purpose of:

  • Sending Game related news to the players with potential of some rewards
  • Having ability players to send to each other mails - ( This one persistent chat system beats the purpose but… Time based persistency is something of a key here )
  • Having a subscription based time premium rewards for instance:
    • You purchase a subscription which for xy days delivers you in ingame mailbox some rewards

Usually implementing this kind of the system in the past was no brainer, i went with a simple nodejs based service with monogDB and having a specific “mail” a ttl field so after that time DB would automatically delete it.
But here in Nakama i haven’t see such a feature that we could on storage set a time limit…

So i would need more of a advice on which way to approach it. Some of the ways i have been thinking:

  1. Extend storage table to support ttl and take care of it, as cockroach DB supports ttl and automatic eviction.
  2. Implement new table “mails” and take care of it there, but complication may rise in connecting with user keys, and management
  3. Use third party service and deploy smaller nodejs + mnogodb or something else and handle there everything related to mailing but have third party service communicates with nakama to sync up

Any help is greatly appreciated.
Regards Eatos.

1 Like

Hello @Eatos,

You can achieve all the functionality you require for this “mailbox system” with persistent notifications.

As for “time premium rewards” you can check how many new rewards the user is entitled to receive with an after-hook on authentication and by keeping some metadata on when the user logged in last and by checking his subscription status. You could also do some bookeeping at this stage and delete any persisted notifications that are older than a certain threshold, which would function more or less as a ttl.

Hope this helps.

Yes and No @sesposito
Persisent notification could be a way, but from custom support perspective where they would need to be dispatched all notification no matter if user is online or not. From that perspective notification ain’t that great, or would require quite a bit of work to get it to the point where we need it.

As for “time premium rewards” it could work for a single reward, but if we are adding multiple subscription time based rewards then metadata could potential grow large, as for every specific reward we would need to keep times so we can regenerate it.

Basically:

  • With ingame mail i need to have ability to send no matter if user is online/offline an message that will be visibile for specific amount of time.
  • Give options customer support from web dashboard ability to dispatch to specific, or all users those emails no matter the server status
  • Time based mails depending on user subscription status.

@Eatos

  • Give options customer support from web dashboard ability to dispatch to specific, or all users those emails no matter the server status

Can you clarify what you mean by this? If the game server is down it cannot communicate with users by definition.

And let’s just list out your requirements one more time:

  • In-game mailbox where some of the mail that comes in depends on whether or not the user has a subscription.
  • You can claim rewards from mail.
  • If the player loses their subscription, the mail or their rewards associated with the subscription go away.

Thank you for reply @lugehorsam
Basically like this:
“IDEAL CASE”:
After game receives a patch or some additional content like events, our customer support/community manager would through custom dashboard send a “changelog/patch” email to each user. If the game instance servers are down it doesn’'t matter as long community managers/customer support can access DB. Since Database is on different machine with different connection it doesn’t really matter what is happening with game instances. The mail would be valid for sometime, let say 30 days. After 30 days it is automatically evicted from DB.
All mails that would be sent to a user would have a time limit for how long it is valid,but user can delete it anytime he chooses to.

Second use beside event/content/patch promotion is as a way to restore/refund missing/lost/rollbacked rewards for a user. Like user purchases xy thing, but transaction didn’t go through well on our side because of miss config, not catching something properly, or something else.
In this case CMO finds transaction details, checks if it is not given to the user and then issues a mail with reward that user has bought but didn’t receive it.

Third use would be to give rewards through certain non game based competition such as:
Competition on discord for idk best build, best look and such…Or best video, best moment in game, and in this case CMO would send mail with reward to that user.

Forth use would be as a way for communication between users. I know here it could be imploded to use chats although i am not sure is it possible to have at the same time messages to persists but to be evicted/deleted at the request of the user or after some time.

Any idea for this or to switch to developing stand alone service?

Looks like what you are looking for is best achieved with Satori; You can create time-based content (in this case, mailbox messages) that expire after a certain period of time. You can then send messages (via email or push) to players with custom messages irrespective of whether the game server is available or not.

Let me know if you are interested and we can setup a demo to talk through it and your specific game needs. Feel free to email our support team to arrange a time support@heroiclabs.com

1 Like

After looking what Satori offers, it would be under utilized in our case and thus price becomes too steap for current feature so yeah :confused: seams like additional services + registering on it will be added.

1 Like

@sesposito can notification be modify by runtime? For example, if a player receives an attachment in an email, I want to set the email to have been marked as received.
Or I just use storage to implement the ingame mail? thanks

@hexun80149128 there are no APIs to update notifications.

1 Like