Use deep links with sandbox and production sites
If you are using both a production server and a sandbox or development server in Flowfinity, it’s helpful to use the getbaseurl() function in the place of your server URL in deep links.
The getbaseurl() function determines which server the app is currently running on, and inserts the appropriate server host name. This ensures that the deep link will work whether you are on the production server or the development server.
Without this function, if you want to test deep links on two different servers, you need to manually edit each deep link that contains your server name. Note that this is not necessary for deep links that begin with “flow://”.
Example
A work orders app emails the technician with a deep link to record his or her work at a customer site. The production version of the work orders app is hosted on https://cloud.flowfinity.com, while the development version is on https://clouddev.flowfinity.com.
- In the Form section, add a URL field.
- Click on "Abc" to the right of the Type and select "Formula Calculation".
- Type in: 'https://redirect.flowfinity.com/'+ getbaseurl()+'/#flow/WorkOrdersApp/MyWorkOrdersView/'+recordid+'/RecordWork'
This will create a deep link within the app "Work Orders App" and view "My Work Orders View" for the work order record with a unique "RecordID", and perform the operation "RecordWork". Here is a breakdown of the elements of the deep link:
This will be the resulting deep link on each server:
Production Server
https://redirect.flowfinity.com/https://cloud.flowfinity.com/#flow/WorkOrdersApp/MyWorkOrdersView/recordid/RecordWork
Development Server
https://redirect.flowfinity.com/https://clouddev.flowfinity.com/#flow/WorkOrdersApp/MyWorkOrdersView/recordid/RecordWork
- To use the deep link in an email notification, go to the Notifications section and click the "Add Notification" button.
- Under Message Configuration, select the {!} symbol to insert the deep link field in the email message.
- Go into the Operations section and edit the operation you would like to trigger the email notification for (eg. Dispatch Work Order).
- Under "Trigger email notifications", check the email notification that you just set up.
- Save and publish the application.