Have a relation between Users collection & the Client inventory collection Answered

Hey Memberstack fam!

I'm currently in the process of building a dashboard template for my B2C customers which houses all of their client inventory score breakdowns. I'm running into problems figuring out how to structure the CMS in webflow so that the dashboard utilizes a single template, but the customer only sees results that are linked to their user ID.

For example, customer 1's user ID is 13301 and she needs to see the score breakdowns of Client A, Client B, and Client C, which I'm assuming would all be separate CMS items.

Customer 2's user ID is 12303 and he needs to see score breakdowns of Client D, E, and F only.

How am I structuring these client results within the CMS and gating them appropriately? Would each user ID need to be a separate CMS collection entirely?

I'm sorry if this question is confusing but my brain is tied in a knot at the moment.

Comments

3 comments

  • Comment author
    A J

    Hey Saoirse McGovern, you do not need to have each user ID in separate CMS collection entirely, as it would not be ideal practice and will be difficult for you to scale in future.

    You can make use of reference fields in existing CMS collection to have a relation between Users collection and the Client inventory collection (assuming there are 2 different collections), once you have that setup, you can use client inventory collection list in the dashboard page and have a condition which checks if the user have access to this, if then show, or else filter it out.

    Hope, this helps

    0
  • Comment author
    Saoirse McGovern

    Hi A J - this makes a lot more sense than what I was trying to accomplish, thank you!

    Now I think the only hurdle would be automatically creating CMS items and making them live inside of each reference list, which I'm pretty sure is something I can accomplish in zapier as that's what I'm already doing to pull the scoring and results in via airtable.

    0
  • Comment author
    A J

    Saoirse McGovern, yup exactly. Welcome.

    0

Please sign in to leave a comment.