7 Replies Latest reply on Jan 7, 2013 1:34 AM by Sean Beez

    record count of customers (members)

    SmilingGoat

      My client wants to display a count of membership on his home page.

       

      Is there a way to get the record count of customers in the crm database?

        • 1. Re: record count of customers (members)
          MikeHometchko

          I'm not too sure how familiar you are with AJAX but it's possible (i think), if he were to keep an up-to-date local copy of a csv export of all his customers.  Essentially you'd want to run a script to count the number of entries (count even just do the commas) and then pass an AJAX request to the page from it.

           

          This is theoretical and I have yet to do any tricky third-party ajax integration into a live site with BC, but I would imagine the only way to do this would be a daily, weekly, or monthly manual upload of the file.  Theres probably a dozen other ways to do this but this popped into my head first and would likely be the most pain-free way to do it (which isn't saying much!)

          • 2. Re: record count of customers (members)
            SmilingGoat Level 1

            Hi Mike, Thanks for the idea - Not familiar with AJAX, so I may have to do some studying.

             

            Here is an idea, but I am not sure how the mechanics of it may work:

             

            So every member has to register.

            Is it possible to have a global variable/s, which gets updated every time someone registers as a member?

             

            I have another problem associated with getting customer/contact data and displaying as a running counter - I extended the CRM and am capturing some geographic and marketing data in the registration form, but I cannot find how to export the custom data with the customer report - for analysis.

             

            So if one could actually capture all this data (counters) at the time of registration into some other format, then maybe it won’t be necessary to dig into the CRM database to ind out how many people from a specific geographical area registered.

             

            Any ideas how the above idea could be implemented?

            Thanks

            • 3. Re: record count of customers (members)
              MikeHometchko Level 1

              Unfortunately you cant use any global variables with BC natively.  The AJAX call would be a work-around to simulate a global variable from the "counter" but, again, would require a certain degree of manual entry.

               

              As far as exporting custom fields from the database, it's not very intuitive.  You need to create a custom report bygoing to Reports->Custom Reports.  Create a new Customer Report.  You can select all of the default database fields you'd like present here and then in the "Set Filter Criteria" step you would select which CRM extension to include.  That's how you can analyze and/or use your extended data.

               

              Without proper knowledge of the BC APIs (which I admittedly havent done enough research on) you cannot automate these exports, hence the manual steps.  I do know it's possible as there are some 3rd party services like SimplaCRM that can and do have automated synchronization (at least I believe that's what they have advertized), but for your needs you'd probably like to build out an API extension yourself.

               

              I just had an interesting thought, which would not be fool-proof but could help make the process a little less painful for you.  If you were to create an extension solely for these counting purposes, say geographic location as you stated, you can export just that extension, take a count of the number of entries, and then pass that to a page.

               

              This solution doesnt eliminate your need to manually export, but its shorter in terms of required coding implementation.

               

              Honestly though if this is all being done for a counter you may look at a less complicated solution, although it may cost a few bucks depending on what you decide:

               

              On form submit you could send a packet of data to a third party server that actually has php/asp access.  Assuming you are a developer you likely have a personal server, you could setup a script there to capture any incoming requests from your BC site.  Then you could hold a global counter variable there which is incremented on each successful request.  Then just scoop that variable from your personal server to populate any counters.

               

              It's unfortunate that we need to go to such extremes for such seemingly simplistic implementations...BC is such a love/hate relationship for me!  However it keeps us thinking

              • 4. Re: record count of customers (members)
                MikeHometchko Level 1

                Alternatively, you could go with the simplest approach and tell your client it's not possible (or at least not feasible) and just gauge how important a little counter is to them

                • 5. Re: record count of customers (members)
                  SmilingGoat Level 1

                  Much appreciated.

                  Yes BC is a love/hate relationship.

                   

                  I think there is much more BC could offer around accessing the backend data via tags or modules or whatever method - a simple SQL query would have been so easy!

                   

                  Will check out the exporting of data as an alternative (I can see a lot of manual work coming up)

                   

                  Cheers

                  • 6. Re: record count of customers (members)
                    MikeHometchko Level 1

                    Take a look into Liquid Markup here: http://liquidmarkup.org/

                     

                    It's currently in alpha testing for portions of BC's modular functionality and should be coming out (at least in a usable beta format) within a year hopefully.  I cannot wait for this!

                     

                    Good luck with your issue!

                    • 7. Re: record count of customers (members)
                      Sean Beez Level 1

                      Any resolution to the counter? JS code?