[dynamic_help_sidebar root="leads"]

How to Create a User Automation?

1. Feature Overview

With user automation, you can automatically check-in and check-out your users. You can create tasks and alerts based on their availability and even send them automated messages on special occasions. If you’re new to the automation feature, visit the automation home page.

 

2. Quick Start

You can create an automation from scratch but the quickest way to get started is to select a ready-made template.

 Template Description
Auto Check-In Users Track work hours by automatically reminding and checking-in your users according to the workday templates you define.
Auto Check-Out Users Automatically remind and checks-out your users according to the workday templates you define.
Work Anniversary Wishes Works on the basis of the ‘Joining Date’ user field. Automatically wishes users on their work anniversaries.
Birthday Wishes Works on the basis of the ‘Birthday’ user field. Automatically wishes users on their birthdays.

Note – The default auto check-in and auto check-out templates are not configured for the mobile app. You need to use webhooks to display notifications and enable auto check-in/check-out on mobile. For more information, see Auto Check-In/Check-Out for Mobile.

To select a template –

  1. From your Dashboard, navigate to Marketing>Automation and click Create Automation.
  2. On the Choose a Template pop-up, navigate to the Internal User Engagement section.
  3. Choose a template and edit it according to your needs.

Templates

 

3. Automation Basics

Like lead automation, user automation also operates on triggers, conditions and actions –

 

Any Questions?

Did you find this article helpful? Please let us know any feedback you may have in the comments section below. We’d love to hear from you and help you out!

Auto Check-In/Check-Out Guide

You can automatically check-in/check-out your users across both web and mobile platforms. If you’ve set up automated lead distribution and enabled auto check-in/check-out, leads will be seamlessly distributed to your users without any need for manual intervention.
The feature is also part of a complete attendance management solution where you can track the working hours, holidays and leaves of your users.

Note:

 

Benefits

Here are some of the major benefits of setting up auto check-in/checkout –

  • Regularize working hours through workday templates and also manage holidays and leaves.
  • Sales managers can track the location of their field sales users throughout the work day.
  • Sales users don’t have to remember to check-in or check-out. They’ll automatically be checked in and their locations will be tracked during working hours.
  • Auto check-out ensures that users aren’t tracked after working hours, even if they forget to manually check out.
  • Avoid distributing leads to users who are on leave or checked-out.
  • Managers will not only get access to user-level automation reports, but also real-time tracking and location history reports.

 

Setup

Follow these steps to setup automated check-in/check-out functionality –

  1. Enable User Check-In 
    Ensure that the Check-In/Check-Out feature is enabled for your users. You can enable it from My Acccount>Settings>Users and Permissions>User Check-In. For more information, see User Management Features: Check-In and Check-Out.
  2. Enable Location Tracking
  3. Setup Work Day Templates
    Create work day templates and assign them to teams or individual users. Users will be automatically checked-in and out at the timings you define in your work day templates*. For more information, see Work Day Templates.
    • You can also set up holiday calendars and apply it to users/teams. This allows you to prevent auto check-in on holidays. For details, see Holiday Calendar.
    • Stop auto check-in for users who’ve applied for leave with the Leave Tracker.
  • Create a User Automation
    Create a new user automation either from scratch, or use a ready-made check-in or check-out template. If you’re creating one from scratch, use the ‘Start of a Workday’ or ‘End of a Workday’ trigger and be sure to include the user check-in or check-out action. For detailed information on setting up these automations, see How to Create a User Automation.
  • Include Webhooks in the Automation for Mobile (Optional)
    If you want check-in/check-out reminders and notifications on your mobile phone, you must include webhooks in your user automation. To learn how to do it, see Auto Check-In/Check-Out for Mobile.

*Work day templates work in accordance with the time zone you select.

 

How It Works

Once you’ve followed the instructions above, you’ll have the following things in place –

  • Work day templates assigned to teams/users.
  • User automation to automatically check in your users at the start of a workday and/or check-out your users at the end of a workday.

The automation you’ve set up will pull data from the work day templates you’ve created. For instance, when the check-in automation runs, your users will be notified that their work day is about to begin (if you’ve setup notifications before the actual start time of the workday) and that they should check-in.
If they don’t check-in by the time the work day begins, they’ll be auto-checked in by the automation (this is the auto check-in action card in your automation).
Similarly, they’ll be notified and auto checked-out by the auto check-out automation you set up.

 

Reports

Here’s the list of reports relevant to the auto check-in/check-out feature –

  1. User Check-in and Check-Out History
    Shows when and where your users have checked in and out either manually or through automation.
  2. Field Sales Activity Tracker
    Shows when and where your users are checking in and out, the activities they’re posting and also their last known location.
  3. User Location History Report
    Shows the travel path your users have taken on the map.
  4. My Location History Report
    This report is available on each user’s mobile device. It shows them their own travel history on the map.

Feel free to contact us at support@leadsquared.com if you need assistance.

 

FAQs

I’ve set up work day templates and assigned them to users/teams but I haven’t set up a check-in or check-out user automation. What will happen when my users check-in to LeadSquared?
If your users have checked in on web during the working hours configured in your workday template(s), they’ll be auto checked in when they open the mobile app. Similarly, users checking out from the web application after the configured working hours will be checked out on mobile as well.

 

I checked-in on the mobile app. Will I be checked in on web as well?
Yes. However, the opposite is not true – if you check in on web, you won’t be checked in on the mobile app.

 

I disabled the check-in for a user role but the auto check-in feature is still working. Why?
The auto check-in feature works regardless of the user role settings you’ve configured.

 

I checked out from the web before the end of my workday but I didn’t get checked out from the mobile app. Why?
If you checked out early from the web, you’ll get checked out on mobile only once your work day is over. However, if you check-out from mobile before the end of the workday, you will be automatically checked out of the web application as well.

 

I applied for leave but changed my plans and decided to work anyway. Can I manually check-in/check-out?
Yes, you can manually check-in and out on holidays and leaves. However, you won’t be auto checked in or out on these days.

 

I’ve set up an auto check-in/check-out automation but I don’t see any users entering my automation. Why?
Have you set up work day templates? Your automation won’t know when to check-in/check-out your users if you haven’t set up work day templates and applied them to users/teams.
Also, automations you create on a particular day won’t trigger till the following day. Our service runs once a day (at 12 a.m. for the configured timezone) and therefore you’ll only see users enter your automation the day after you publish it.

 

I finished my workday early and checked-out from the mobile app. Will my location still be tracked?
No, we don’t track your location after you check-out.

 

The internet connection on my phone isn’t working. Can I still check-in and check-out from mobile?
No, the check-in and check-out features require an internet connection.

 

I got auto checked out at the end of my workday but I’m working late and want check-in again. What should I do?
In this case, you can manually check yourself in.

 

I checked in on mobile but lost connectivity while travelling. Will my location still be tracked?
Yes, you’ll remain checked-in in this case. Your location will still be tracked and it will reflect in your LeadSquared account as soon as you regain your connection.

 

Will the mobile app prompt me in case the location tracking settings on my device are disabled?
Yes (for Android), you’ll get a notification to turn your device’s location tracking settings on.

 

I set up work day templates with different time blocks for multiple shifts. Why am I still not being checked out and checked in between shifts?
We only consider the first check-in time and last check-out time. Time blocks and breaks are not accounted for.

 

I got a notification to check-in but it doesn’t work when I tap on it. Why?
Either the ‘Location Tracking’ settings are disabled for your device or the mobile app or your internet connection is not working.

 

I configured reminders to be delivered in my automation but my users aren’t receiving them. Why?
Ensure that notifications for the LeadSquared mobile app are enabled. Also, see if the webhooks you’ve configured have the correct ‘Request Type’.

 

I checked in by tapping the notification on my phone but it hasn’t reflected in my account. Why?
Try switching the LeadSquared mobile app from the background to the foreground of your device. If that doesn’t work, either the ‘Location Tracking’ settings are disabled for your device or the mobile app, or your internet connection is not working.

Auto Check-In/Check-Out for Mobile

Feature Overview

The default templates for auto check-in and auto check-out don’t extend to the mobile app. If you want to set up notifications/reminders and auto check-in/check-out on your LeadSquared mobile app, you have to configure webhooks as instructed in this article.

If you’re new to the auto check-in/check-out feature, see Auto Check-In/Check-Out Guide.

 

Adding Webhooks

You can create an automation from scratch, but we recommend using the ready-made templates auto-check in and check-out templates. You can edit the templates, add and remove cards and customize it to suit your requirements.

  1. Navigate to Marketing>Automation on the main menu of your LeadSquared account, then click Create Automation.
  2. Select the Auto Check-in or Auto Check-out template.
  3. Now add webhooks after every If/Else card (following the ‘Yes’ path). In this way, you can configure the webhooks to send mobile notifications (alongside the web notifications) and auto check-in/check-out users on mobile. Add a webhook by clicking the  icon below the If/Else card and then selecting Webhook, under User Actions.

Adding webhooks for mobile

The webhooks you can add are detailed below.

  • The ‘Request Type’ can be on of –
    • AutocheckInReminder
    • AutocheckIn
    • AutocheckOutReminder
    • AutocheckOut
  • The ‘Title’ and ‘SubTitle’ of the webhook are configurable. You can add any text here to customize the notification.
  • The ‘20%’ characters are used to add spacing between the text.
  • You must pass your LeadSquared access and secret keys. You can find them by navigating to My Account>Settings>API and Webhooks.

 

Reminder to check-in

https://mobile-notifications.leadsquared.com/PushMobileMessage.aspx?RequestType=AutocheckInReminder&Title=Reminder%20to%20check-in%21&SubTitle=Your%20scheduled%20time%20to%20begin%20work%20is%20nearing.%20Tap%20on%20check%20in%20now%20to%20start%20your%20work%20day%20early&accessKey=@{User:AccessKey , }&SecretKey=@{User:SecretKey , }

 

Auto check-in

https://mobile-notifications.leadsquared.com/PushMobileMessage.aspx?RequestType=AutocheckIn&Title=Checked%20in%21%20&SubTitle=Your%20work%20day%20has%20begun.%20Location%20tracking%20is%20now%20active&accessKey=@{User:AccessKey , }&SecretKey=@{User:SecretKey , }

 

Reminder to check-out

https://mobile-notifications.leadsquared.com/PushMobileMessage.aspx?RequestType=AutocheckOutReminder&Title=Reminder%20to%20check-out%21&SubTitle=Your%20scheduled%20time%20to%20end%20work%20is%20nearing.%20Tap%20on%20check%20out%20now%20to%20end%20your%20work%20day%20early&accessKey=@{User:AccessKey , }&SecretKey=@{User:SecretKey , }

 

Auto check-out

https://mobile-notifications.leadsquared.com/PushMobileMessage.aspx?RequestType=AutocheckOut&Title=Checked%20out%21%20&SubTitle=Your%20work%20day%20has%20ended.%20Location%20tracking%20is%20now%20inactive&accessKey=@{User:AccessKey , }&SecretKey=@{User:SecretKey , }

 

Notify Auto check-out

After setting up the automation for user check-out, configure the Webhook on the User Check Out card, to notify users who have been checked out. To set up the Webhook, enter the following details –

  • Name of the Webhook
  • URL Type: ‘https://’
  • Webhook URL: fieldsales-in21.leadsquared.com/api/location-feed/v1/Enter ORG ID here/events/checkout
    • The Org ID included in the URL refers to the organisation ID, which is the same as your LeadSquared Account Number. You can find this ID at the bottom of your screen. To know more, see How do I find my LeadSquared Account Number?

Once these details are entered, click Verify to validate the URL.

  • Custom Header Name: Authorization
  • Custom Header Value:
    • Go to https://fstm-in21.leadsquared.com/.
    • Navigate to Journeys>Settings>Advanced.
    • Alongside Field Sales Token for Automation, click Copy.
    • Paste the content under Custom Header Value.
  • On completing all the steps mentioned above, click Save.
  • Lastly, Publish or Republish the Automation for Check-Out with the newly added Webhook.

Leadsquared - Auto Checkout

 

Sample Automation with Webhooks

mobile check out automation preview

User Automation Actions – User Check-In

User check-in lets you automatically check-in your users at the start of a workday. It works according to the configured workday templates and allows you to track the working hours of your users.

Check in user automatically

 

Example Use Case

The best application of this feature is automatically checking-in your users at the start of a workday. To do this, the automation trigger must be “Start of a Workday”, followed by the “User Check-In” Action.

 

Procedure

check in user

Also, see Auto Check-In/Check-Out Guide for more information.

User Automation Conditions – Wait

The wait condition lets you delay an action or another condition for a specified period.

Example Use Case

If you trigger an automation to start, say, half an hour before a work day, you can send the user a notification (your work day starts soon) and then wait half an hour before auto checking in the user.

 

Setting Up the Wait Condition

Wait Condition

On clicking the Wait condition, you’ll see the Set Wait Condition pop-up appear.

Here you can specify the time period to delay the action in two different ways:

1. For a Specific Amount of Time

Allows you enter the time delay in minutes, hours, days, weeks, months and years. In addition, you can also set the exact day of the week and time of day that you want to wait before the next action. Use the highlighted checkbox to pick a day and set a time.

2. Until a Specific Date & Time

Allows you to enter the date and time till which the succeeding activity will be delayed. Click the checkbox highlighted below to use this feature.

User Automation Actions – Webhook

Use webhooks to automatically post activities to a URL of your choosing.

Note: We have ready-made webhooks available to send notifications and enable auto check-in or check-out on the LeadSquared mobile app. For more information, see Auto Check-In/Check-Out for Mobile.

Click Webhook and the Webhook Properties pop-up box will appear.

Webhook update

Attribute Description
Name Enter any name for the webhook.
URL Enter the URL you want to post the data to.
Content Type Choose the format you want the data to be posted in.
Save Response Allows you to save the response from a webhook and use it to send dynamic email content or in other automation actions.
Custom Headers For security purposes, you can choose to enter a custom name-value pair in the webhook header and then reject all webhook calls where this header isn’t present.
Notify on Failure Get notified everytime a webhook fails.
Retry Count The number of times you want to retry on failure.

Note: The latest data generated using the webhook is the data retrieved just before the execution of the action you specify in the automation.

For more information on Webhooks, see Webhooks.

How to Avoid Creating Duplicate Leads

1. Feature Overview

There are measures you can take to avoid creating duplicate leads in your LeadSquared account. If you’ve already created duplicate leads, you can merge them, sanitize the existing data and avoid creating them in future.

Fields you mark as unique will not accept duplicate values. You have the option of marking up to 3 fields as unique, including custom fields (see How to Mark Custom Fields as Unique). It is good practice to mark the phone/mobile fields unique to avoid creating duplicate leads with the same phone number through different channels (landing pages, forms, etc.).

Note: Accounts created before 13th November 2017 have only the email address field marked as unique by default. This article is only relevant for these users. Accounts created after this date have the email, phone and mobile fields marked as unique by default.

 

2. Example Use Case

If the phone and mobile fields are not marked as unique in your account and an existing lead re-inquiries through a different channel, this may create a duplicate lead.

 

3. Best Practices

These settings will help you prevent duplicate lead creation –

  1. Setting the phone and mobile fields to ‘Phone Control’
    Helps you avoid creating duplicates due to phone format mismatches
  2. Marking the phone and mobile fields as unique.
    Prevents new duplicates from being created.

 

3.1 Phone Control Settings

When you set the phone/mobile number field to display as ‘Phone Control’, it standardizes the mobile number format across all your lead add forms and landing pages. It makes the country code mandatory and lets users only enter a defined number of digits. Here’s what it looks like on theAdd New Lead form –

phone control on add new lead form

  1. Navigate to My Account>Settings>Leads>Lead Fields, search for the ‘Phone/Mobile Number’ field.
  2. Hover your cursor over the settingsSettings iconwheel alongside the phone/mobile field and click Edit.
  3. Under the Input Data Properties section, set the Show As option to Phone Control.
  4. You can set a restriction on the phone number length and enter the minimum and maximum number of digits.
  5. Click Save.

control phone format

For more information, refer to Control Phone Number Format While Capturing Leads.

3.2 Marking Uniqueness

First, check if the phone and mobile number fields are marked unique –

  1. Navigate to My Account>Settings>Leads>Lead Fields, search for the ‘Phone/Mobile Number’ field.
  2. Under the Meta Info column on the grid, check the key unique key icon.
    • If the key icon is greenunique green, it implies that the field has been marked unique.
    • If the key icon is greyunique key, the field has not been marked unique.

If the phone and mobile fields have not been marked as unique, follow this process for both fields.

  1. Hover your cursor over the settingsSettings iconwheel and click Mark Unique.
  2. On the Mark Unique pop-up,
    1. Click the Mark Unique button to proceed to step 2 of 2.
    2. Select the minimum and maximum mobile number length.
    3. Ensure the Country Code Is Mandatory checkbox is ticked. If you’ve enabled phone control as instructed (first step of best practices), this checkbox will be ticked by default. Otherwise, you can tick the checkbox and the phone control setting will automatically get enabled.
    4. The If Not Provided drop-down lets you choose between throwing an error or proceeding with a default country code if a user doesn’t provide a country code.
    5. Click Save.

marking mobile as unique

 

4. Troubleshooting Errors

If you already have duplicate values for the mobile number field when you attempt to mark it as unique, you’ll see the following error –

error with unique field

In this case, LeadSquared can’t mark the field as unique because there are already duplicate values for the field in your account. Here’s how you can address the issue –

4.1 Merge leads

There are 3 ways you can merge duplicate leads –

A) The Duplicate Leads Report
The duplicate leads report lets you filter duplicate leads based on the company, email, phone number or mobile phone fields. It also lets you merge duplicate leads by selecting the values you want to keep versus the ones you don’t.

  1. On the main menu, navigate to Reports>Reports Home and search for the List of Duplicate Leads report.
  2. Filter by the Phone/Mobile Phone field and click Show Duplicates.
  3. Beside each duplicate record, click the Merge link.
  4. Select the values you want to retain for each column and click Merge.
  5. Once the lead is merged you can choose to go to the merged lead’s details page or to the Manage Leads page.

Duplicate Leads Report

B) The Lead Merge API (Optional)
You can also merge leads programmatically using the Lead Merge API.

C) Automation
You can also use the If Lead Exists automation condition and follow it up with a Merge Leads action.

4.2 Sanitize existing data through export and re-import.

To ensure that you can mark the phone/mobile number fields unique, you must first ensure that there are no duplicate values in these fields. This requires you to export all your leads to a CSV file and then re-import that data.

1. Export Lead Data
Export your lead data from the Manage Leads page. Choose the Export Leads option under the Action column. You can choose to export all fields or selected fields. For more information, see How to Export Leads.
We recommend that you export the ‘Created On’ and ‘Modified On’ fields so you can track which lead was last created. This will help you identify leads you wish to delete (if any).

2. Identify Duplicates
Identify duplicate values in the phone/mobile fields in your CSV file. Microsoft Excel has some options that allow you to do this (for more information, see Find and Remove Duplicates in Excel). After identifying the duplicates, you could choose to remove them or you could enter different values for the duplicate mobile numbers, for example –

First Name Phone Number
John 9812345678
John 9812345678.dup1
John 9812345678.dup2

3. Standardize the format across all phone records
We recommend that you remove the country code and leave just the phone number digits. The ‘phone control’ setting will capture the country codes going forward so you won’t have to worry about format mismatches.

4. Import the data back into LeadSquared
Use the Import Leads button on the Manage Leads page to import the data back into LeadSquared (for more information, see How to Import Leads). While importing the file –

  1. Ensure that the email address is the Search Key during import (step 2 of import).
  2. Select the Overwrite duplicates option during import (Step 3).

troubleshooting duplicates

Now that all duplicates are dealt with, you’ll be able to mark the ‘Phone/Mobile Number’ fields as unique (see step 2 of Best Practices section above). You’ll now see the following success message –

success message for mark as unique

 

Any Questions?

Leave us a comment below if you have any questions.