Have you ever wished you could allow some of your Podio users access to just part of the data in an app that they're not even members of?
Take for example, expense claims. You'd want your users to be able to submit claims and manage their own claims, but not see everyone else's claims.
Using ProcFu's Mini Apps, this is quite simple.
Since we're dealing with Podio users which don't have native access to the space or app, we need some kind of Users app with at minimum a field for their Podio email address.
Only users with an entry in this app will be able to log in and use our Mini App.
We'll keep our Expense Claims app simple for now. We have a text description, date, amount, status, and image field for receipt. Most importantly, we'll need a relationship field back to the Users app.
The Mini App
For the mini app, we will choose Podio as the authentication mechanism, using the Users app and specifically the Podio Email field in the Users app to only allow valid people to access this.
We will need a screen to allow users to enter new claims. The item mode will be "Create" and we will also pre-fill some fields.
- Status will default to "Entered" and will be hidden
- User will be the current item from the Users app. For this to work, we'll use the value "@[pf_auth_item_id]". This is a special token that will be replaced on save.
We will also need screens to show users their claims. The list screen will be a table view from "Related Items". That will give us all items from the Expense Claims app related to the logged in user.
We also will add a button to the bottom of the table to allow creating a new claim. We'll create a markdown link using the @[pf_screen:SCREENNAME] token and wrapping it in an HTML button for looks:
We'll also need a screen for details for when users click on an existing claim. For this example we'll just give them a read-only view of the item and only allow adding comments.
Now that we're dealing with more screens, it's important to go back and make sure all screens have the correct next screen set for on-click or on-submit.
Lastly, we'll set the list screen to be the initial screen in the Mini App.
When an allowed user goes to this app's URL, they will be presented with a list of current expense claims and the option to create a new one.
Clicking on the New Claim button will take them to the create screen allowing entering of visible fields. The fields we defaulted are hidden.
On a mobile device, you will also have the option to snap a photo with any image field (used for the receipt here).
Clicking on a claim from the table view brings the user to the details, only allowing adding a comment.
Note though that all actions are done in Podio as the App and not as the user (since the user is not even part of the space, they don't have any access inside Podio).
The record in Podio can now be managed by anyone in the space or actioned by automations, etc.
And that's it. You can now give all your users the ability to manage their claims without needing to add them to the space and having to worry about controlling who sees what.
Are these Mini Apps cool or what?