General Discussion

Tech Talk: Product - Launching a Workflow with a QR Code

  • 1.  Tech Talk: Product - Launching a Workflow with a QR Code

    Posted 06-26-2024 12:48
    Edited by Huberto Garza 06-26-2024 13:13

     

    Launching a workflow by scanning a QR code has clear and tangible benefits since it makes it easier and faster for field personnel to start a workflow. I'd like to share a simple example of how to set this up.

     

    Imagine a service or inspection needed at a customer's location. When onsite, field technicians can start the workflow by simply pointing their mobile device's camera at a QR code fixed to the asset or a nearby location. Scanning the QR code should prompt the technician with an on-screen shortcut that will launch the TrueContext app, open the relevant form, and automatically populate it with the asset's, or location's, information.

    Point your camera to a QR Code. The TrueContext app opens the relevant form and automatically populate it with the asset's or location's information
    These are the steps I followed to build a Building Inspection form that uses this approach:
     
    1. Create a Data Source with your locations. Include a column called LocationId with location numbers like 101, 102, 103, etc.

    2. Create a form called Building Inspection, add a Dropdown Question for the location, and set that Question's parameters to:
     
      General
    • Question Text = Location ID
    • Unique Identifier for Question = LocationId
      Options
    • Option Type = Use Data Source for Options
    • Select Data Source = the data source you set up in step 1
    • Column value displayed on device = LocationId. 
    • Select Populate questions in the main form and set up the Dropdown to push values to other questions in the form. Mine pushes Location Name, Address and City.
     
    3. Test your form. When you select a location ID from the dropdown, the other answers should populate.

      


     
    4. Generate a QR code. There are a bunch of websites where you can do this. My go-to is https://www.the-qrcode-generator.com/ . Since I'm creating a QR code specific to each location being inspected, I created a QR code for LocationId 101.
     
    5. Configure the QR code for Plain Text, and paste the following into the add text field:
     

    truecontext://x-callback-url/open?name=Building%20Inspection&LocationId=101

     
    The address above is an app-to-app request which launches the TrueContext app in your device, opens the Building Inspection form, and plugs '101' into the Location dropdown. Note: The %20 in the app-to-app request is an encoded version of the space in the form's name. You wouldn't need that if your form's name was a single word. 

    Preview of the QR code generating website. The one you use may look different
    6. Exit the form in your TrueContext app and go to the app's main screen.
     
    7. Switch to your device's camera and point it to the on-screen QR Code. Your camera app should show a button to launch TrueContext. 
     
    If all goes well, your TrueContext app opens, launching the Building Inspection form and selecting the value '101' in the Location ID Dropdown Question, as shown on the animation at the top of the page.
     
    I hope this article sparks ideas on how to leverage some of the features demonstrated here. I'd love to hear your thoughts!
     



    ------------------------------
    Huberto Garza
    Product Manager
    TrueContext
    ------------------------------



Reminder: Content posted to our Community is public content.  Please be careful not to post Intellectual Property that you do not have permission to share.  For more information please refer to our Terms Of Use