Feature: Ability to store Organization Metadata in JSON format like app_metadata or ability to store key-value pairs beyond the current limitations.
Description: Organization Metadata has currently three limitations listed below.
- Support only a key-value format
- Maximum of 255 characters for KEY and VALUE
- Maximum of 10 metadata pairs
Because of these limitations, there is a risk adopting Organization Metadata while recognizing its convenience.
Use-case:
Actions can be written simply without using if statement. The source code below is an example. Of course, it can be achieved in the current situation, but we recognize that there is a risk in using Organization Metadata and hesitate to use it because of the limitations especially maximum of 10 metadata pairs.
// before
const org_name = event.organization?.name
let sender_name
if (org_name == "org1") {
sender_name = "org1 company"
} else if (org_name == "org2") {
sender_name = "org2 company"
} else {
...
}
// after
const sender_name = event.organization.metadata.sender_name