Accessing Member Custom Fields, Metadata & JSON

Article author
Memberstack Team

Aside from updating a Member’s email & password, there are 3 types of member data that you have access to. They are; Custom Fields, Metadata, and JSON.

You can update JSON and Custom Fields using the frontend & backend API, with forms & data attributes in Webflow, and through the dashboard. Metadata can only be updated from the backend

Custom Fields

Custom fields are global key-value pairs that you want to store across all members. Meaning, that when you create a custom field property - that property becomes available to ALL members. You can have as many custom fields as you want. 

EXAMPLE → You can use custom fields to store data I want every member to have like name, username, etc.

Learn more about custom fields

Screenshot__26_.png

Metadata

Can be used to store information on a Member like custom fields. There are a few key differences though... 

  • Metadata is read-only via the frontend
  • Metadata can only be updated via the backend.
  • Metadata comes in key-value pairs.
  • Metadata is unique to each member, which means each member can have different sets of key-value pairs in their metadata. 
  • Metadata is limited to 500 characters per member

EXAMPLE → You can use metadata to store info that might look different across members - like a set of external IDs you collected from having them connect with 3rd party integrations:
Member 1 might have GitHub ID, Intercom ID, Active Campaign ID, etc
While member 2 might have Instagram ID, Facebook ID, and Slack ID

ARTICLE PENDING - leave a comment if you need this 🙏

Screenshot__25_.png

Member JSON

You can use the member JSON feature if you need to store more complex data on a Member. JSON objects can be nested, whereas custom fields and metadata only accept boolean types (true/false), strings and integers, as valid values.

EXAMPLE → You can use JSON to achieve something similar that you'd want to do with a database. Like

  • storing a list of tweets that a user published
  •  an array of member IDs that the user added as friends
  • JSON is limited to 5,000 characters per member

ARTICLE PENDING - leave a comment if you need this 🙏

Screenshot__24_.png

To get the logged-in member JSON data use the following from our DOM package

window.$memberstackDom.getMemberJSON();

Was this article helpful?

Comments

5 comments

  • Comment author
    Daniel Valencia

    Please make an article on how to get the JSON of a member using the front-end JavaScript API. Thank you.

    5
  • Comment author
    Fredi Fdez

    It'd be awesome to have an article on how to access and update the User's Json via Webflow's script in the front-end. Thanks Team! 

    3
  • Comment author
    Hugh Laverty

    In dire need of a guidance article here, specifically for accessing the JSON from a Webflow front-end. Thanks in advance 🙂

    2
  • Comment author
    Josh Lopez

    Just updated the article. To get JSON data use: 

    window.$memberstackDom.getMemberJSON();

    You can read more in our DOM package docs

     

    1
  • Comment author
    Jan Horubała

    Are you going to lift up limit for Member JSON? 5,000 characters is okey at the begging, but I'd like to keep more user data at memberstack side ;)

    1

Please sign in to leave a comment.