Sometimes, you will need to collect information from people who are not Onit users. In this event, Onit allows you to email an anonymous portal launch link to collect data and create a Record. The anonymous portal launch link allows users to fill in information without logging into Onit. When creating such a link, you can also pre-populate certain fields.
In this tutorial, we will create an anonymous portal launch link to collect information about a company lunch (which is held once a month). We want our lunch guests to specify their names, if they will be attending, and if they have any food restrictions. We have created a stand-alone App (named Company Lunch) to collect the responses.
Create Action
We will first create a new Send Notification Action to generate an anonymous portal launch page link. This Action will send an email that contains the HTML link.
- Navigate to the Actions node in your App.
- Create a new Send Notification named Anon Portal Launch.
- The Body property is where you will compose your message and build your anonymous portal launch link. To build the link, you’ll use Liquid, similar to the following:
{% create_launch_url link_url %}{% app 'Company Lunch' %}{% param month = now | date: "%B" %}{% param event_name = 'Monthly Roadrunner Watch Picnic' %}{% endcreate_launch_url %}{{ link_url }}
There are a few important parts of this Liquid to review:
-
The Liquid must begin with the control flow statement
{% create_launch_url variable_name %}
.Varaiable_name
will be the variable name for your portal launch URL. The{{ variable_name }}
at the end of the Liquid statement will evaluate the portal launch link displayed to the recipient. -
The next Liquid value must be
{% app 'App Name' %}
with App Name being your App's exact case sensitive name. The parameter block (i.e., all defined parameters) will follow your App name declaration.
Remember that, in all situations, records cannot be created in any App unless a name
, requester_name
, and requester_email
Field value is defined. In the example above, none of these fields are pre-populated because these Fields have default values defined in the App’s wizard. If that’s not the case for your App, pre-populate those fields using the example Liquid expression shown above.
-
You can set any type of Field within the parameter block, including hidden and read-only Fields. In the example above we are pre-populating the
month
andevent_name
fields.
Test It
Test to ensure your Anon Portal Launch Action is working by sending the anonymous portal launch link to a test email. We have set up a Generate Launch Page Button for this tutorial to fire our Anon Portal Launch Action.
To review how to create an Action button see this tutorial.
- Click the Generate Launch Page Button on a Record to send the email.
- An email like the one below with the generated link will be sent to the specified recipient.
- Once the user clicks the link, they can fill in the anonymous portal launch form. In addition, the month and event_name fields should be pre-populated upon page load.
When you click the anonymous link in the email, your default browser should launch to the appropriate URL. Before clicking the link, ensure you’re logged out of the Onit environment to test your action adequately. This will ensure you can see, populate, and submit the form without logging into Onit.
- Upon completing the form, the user will see a thank you message and be prompted to close the window.
- Back in Onit, you should see a new Record in your App.