# Tuple Based Question

**URL:** <https://community.auth0.com/t/tuple-based-question/186090>\
**Category:** Auth0 Fine-Grained Authorization\
**Created:** [April 29, 2025, 1:58pm UTC](https://community.auth0.com/t/tuple-based-question/186090 "2025-04-29T13:58:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![stephenbawks1](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/stephenbawks1/32/71238_2.png) [@stephenbawks1](https://community.auth0.com/u/stephenbawks1)\
**Post date:** [April 29, 2025, 1:58pm UTC](https://community.auth0.com/t/tuple-based-question/186090/1 "2025-04-29T13:58:55Z")

</div>

I see there are several examples around entitlement based examples. However I am maybe coming at this issue from a slightly different angle.

I have the concept around creating an `order` tuple object and the order could be for a normal external customer, however the `order` could also be some an internal team member.

I am wondering if it makes sense to be able to mark the order as an `internal` team member and then check to see if someone is approved to view orders that are for internal team members? Or does it make more sense to have a separate `order` type that is only for internal team members?

---

<div class="post-metadata">

**Author:** ![andres.aguiar](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/andres.aguiar/32/7718_2.png) [@andres.aguiar](https://community.auth0.com/u/andres.aguiar)\
**Post date:** [April 29, 2025, 3:14pm UTC](https://community.auth0.com/t/tuple-based-question/186090/2 "2025-04-29T15:14:21Z")

</div>

Hi @stephenbawks1

Both can work. If conceptually it’s the same “order” entity.

Do you have other use cases where you can to differentiate between an internal user and external user? If so, it would make sense to have different user types, eg:

```auto
type user
type internal_user
type order
  relations
     define viewer : [user, internal_user]

```

If this is the only scenario where you want to differentiate them, maybe having an internal-order type would help.

Does it make sense?

---

<div class="post-metadata">

**Author:** ![stephenbawks1](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/stephenbawks1/32/71238_2.png) [@stephenbawks1](https://community.auth0.com/u/stephenbawks1)\
**Post date:** [April 30, 2025, 1:18pm UTC](https://community.auth0.com/t/tuple-based-question/186090/3 "2025-04-30T13:18:36Z")

</div>

Yah that makes sense what you are suggesting, however I think i perhaps did a poor job explaining it.

There is an `order` type and today there is basically a flag on an `order` that specifies this is for an internal team member. This is basically a special type that is considered more sensitive as we do not want anyone to be able to view other team member personal information.

When an `order` is flagged as being for an internal team member, there are only a small subset of internal team members that need to be approved to service those orders.

So the second dimension to this is that a `team_member` also needs to be approved or be part of a group I suppose to even be able to service those orders.

I am wondering if it makes sense to establish a relationship between the two or if a condition is better suited for something like this.

---

<div class="post-metadata">

**Author:** ![andres.aguiar](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/andres.aguiar/32/7718_2.png) [@andres.aguiar](https://community.auth0.com/u/andres.aguiar)\
**Post date:** [May 2, 2025, 12:45pm UTC](https://community.auth0.com/t/tuple-based-question/186090/4 "2025-05-02T12:45:40Z")

</div>

Hi Stephen,

I don’t think I understand yet.

The way we usually model flags is by providing a way to relate the object with itself, e.g.

```auto
type user
type internal_user
type order
  relations
     define viewer : [team#member]
     define internal_order_viewer : [team#member]

     define viewer : viewer or internal_order_viewer from internal_order 
     define internal_order : [order]
``

Does that help? If you want to jump on a call we can try that too.
```

---

<div class="post-metadata">

**Author:** ![stephenbawks1](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/stephenbawks1/32/71238_2.png) [@stephenbawks1](https://community.auth0.com/u/stephenbawks1)\
**Post date:** [May 5, 2025, 7:52pm UTC](https://community.auth0.com/t/tuple-based-question/186090/5 "2025-05-05T19:52:39Z")

</div>

Yah I think that works. Let me see what I can do here and test this out.

Thank you.
