Inbound

This is the process by which a lead is looked up by phone number in the system. This is used both with the search feature as well as automated CRM Pop searches from Asterisk / TLDSIP or Zoiper.

The phone lookup’s sole purpose is to find or create the lead. It then reloads the page instantly to the contact function which drives the lead based off of Lead ID.

  1. System Checks for an Inbound Prefix in the Phone Number
    • If a Prefix is Found
      • System Checks for Inbound Prefix in the Vendor Meta (Settings)
        • If a Vendor ID is Found by Prefix in Vendor Meta (Settings)
          • System then searches for Leads by phone number with status of 2 (Converted) with that Vendor ID
            • If Lead is Found
              • Go To 4.
            • If No Lead is Found
              • System then Checks for Leads in that Vendor with any status except for 0 (Trash) with that Vendor ID.
                • If Lead is Found
                  • Go to 4.
                • If No Lead Is found
                  • System then checks for the existence of the Vendor and that it is active based on the Vendor ID.
                  • System then checks if there is a Load Delay set for the Vendor in Vendor Meta.
                  • System gets Load Delay Attempts from Vendor Meta
                    • If No Load Delay is Set
                      • System Creates The Lead with the Vendor ID found.
                      • Go to 4.
                    • If Load Delay
                      • System Sets #Attempt, waits Load Delay seconds and Reloads Page back to 1. with phone, prefix and attempt parameters until it finds a lead or runs out of attempts.
                        • If Last attempt and No Lead is Found
                          • System Creates The Lead with the Vendor ID found.
                          • Go to 4
    • If No Prefix is Found or we don’t have a lead.
      • System will look up a lead by phone number and status 2.
        • If Lead is Found
          • Go to 4.
      • System will look up by phone number and any status except 0 (trash)
        • If Lead is Found
          • Go to 4
      • System will look up lead by lead_id
        • If Lead is Found
          • Go to 4
  2. If we found a lead from above processes.
    • Goto 4.
  3. If No Lead Found
    • System checks for lead by phone number as lead ID
      • If Lead ID is Found
        • Go to 4
    • System sets lead ID and shortcode URL to blank but passes phone number to blank form.
      • Go to 4
  4. System Redirects to the leads shortcode URL (ID) or blank page if no ID.