waha icon indicating copy to clipboard operation
waha copied to clipboard

[Feature Request] - add "metadata" key=value pairs when creating session

Open devlikepro opened this issue 1 year ago • 1 comments

For integration purpose with application it can be useful to give a way to add additional "application related" data in session. After that, we'll send

  1. metadata back to the system in webhook event, so the app can easily match records in their database
  2. Show it on Dashboard so you can quickly search the desired session by using application and user data

For instance

{
  "name": "default",
  "metadata": {
    "user.id": 123,
    "user.email": "[email protected]"
  }
}

would give session.status event

{
    "event": "session.status",
    "session": "default",
    "me": {
        "id": "[email protected]",
        "pushName": "~"
    },
     "metadata": {
      "user.id": 123,
      "user.email": "[email protected]"
    }
    "payload": {
        "status": "WORKING"
    },
    "engine": "WEBJS",
    "environment": {
        "version": "2023.10.12",
        "engine": "WEBJS",
        "tier": "PLUS"
    }
}

patron:PRO

devlikepro avatar Jul 18 '24 06:07 devlikepro

Ideally we should add it before after this one, so app doesn't have to put metadata over and over https://github.com/devlikeapro/waha/issues/435

patron:PRO

devlikepro avatar Jul 18 '24 06:07 devlikepro

Will be in 2024.9.1, metadata when you create or update a session, which will be availble in Dashboard, Webhooks and API responses.

patron:PRO

devlikepro avatar Aug 15 '24 03:08 devlikepro

https://waha.devlike.pro/docs/how-to/sessions/#metadata

patron:PRO

devlikepro avatar Aug 27 '24 11:08 devlikepro