- 08 Jul 2022
- 3 Minutes to read
- Print
- DarkLight
Zapier – Trigger – User Access Info
- Updated on 08 Jul 2022
- 3 Minutes to read
- Print
- DarkLight
We offer a Zapier trigger that will poll our database in order to return a list of active users and their sign in activity. This trigger is useful to take actions based on last access date/time. An example of use, would be to tag in your CRM of choice, all users that have not signed in to LSVT in the past 7 days.
Get Started
Trigger Setup
Click here to access your Zapier Zaps.
Create a Zap
On the resulting screen, choose to create a trigger and search for LightSpeed VT app. Then select the app.
After choosing LightSpeed VT app, select Access Info as the trigger event and click continue.
Choose your LightSpeed VT Zapier account from your list of connected account.
If you never connected your account previously, please refer to this article.
Next, you will be presented with query parameters that will allow you to filter out data. All are optional.
- System Id: If your API account gives you access to multiple systems, you should narrow down your search by specifying a system id
- Location Id: Results would be for the specified location id
- User Id: Would return only 1 record for the specified user
- Starting Access Date: Returns records for users that accessed LSVT after specified date
- Ending Access Date: Returns records for users that accessed LSVT before specified date
The final trigger step is to test the trigger.
The test will retrieve sample data that will provide several fields and their corresponding values: id, userid, firstName, lastName, jobPosition, team, accessDate, accessIP, locationId and email.
Date Formatting Part 1
Before you set up an Action, you will need to format the date/time sent in the response from the trigger you just created, to match Zapier format and timezone.
Click on Format to add a formatting step.
Then choose Date / Time from the Action Event menu choices and continue.
On the next step, choose to transform using Format.
For Input value, look for the Last Access Date/Time in the list of sample data.
The next options are:
- To Format, choose MM/DD/YY (01/22/06)
- To Timezone, choose UTC
- From Format, do not specify anything
- From Timezone, choose US/Pacific
You can then test the action.
You should rename this step to avoid confusion and allow you to distinguish the various steps later on.
Date Formatting Part 2
You will need to add another formatter action before finalizing your zap. Click the + icon below the formatting step you just created to add a new step.
You will follow almost the same instructions as before, by choosing “Format” for action again.
Then choose Date / Time from the Action Event menu choices and continue.
On the next step, choose to transform using Format.
This time, for Input value, you will need to type in: {{zap_meta_human_now}}
. This code will retrieve the date/time when the Zap runs, which will be used later on to compare the time difference between the last access and the Zap.
As soon as you enter {{zap_meta_human_now}}
into the field, it will transform to show as in screenshot below (Zap Meta Human Now: No data)
The next options are:
- To Format, choose MM/DD/YY (01/22/06)
- To Timezone, choose UTC
- From Format, do not specify anything
- From Timezone, set to the timezone configured for your Zapier account
Test the action and continue.
You should rename this step to avoid confusion and allow you to distinguish the various steps later on.
Optional Filter
Depending on your needs, you may want to add a filter to your Zap to only process Zaps that are matching your criteria. For example, only send Zaps with users that did not sign in the past 7 days and send them an email or add a tag to their customer record in your CRM.
To create a filter, click the + icon below your last step action and choose Filter.
Configure your desired settings by first choosing the data that will be used for comparison.
For this article, we will first select the formatted date we created in step 1.
Then (Date/time) Before for condition
and finally choose the Zapier formatted date you created in the second formatting step.
Then type a space and add -7d and click continue.
This filter would only send a Zap for any users with a last LSVT access that is 7 days before time of polling from Zapier.
Final Action
Click on the + icon at bottom to create the final action to be taken. You can choose any Apps and follow the same principles from any other Zaps to send data to your app.
Example below is for sending data to a Google Sheet
Turn on your Zap. Data will be retrieved everyday shortly after midnight in your timezone.