Topic: Unique line ID

I'm looking to create a unique line ID for use in time-tracking application, but I'm scratching my head as to how I would go about this.

So far, I've tried reserving a variable and then just incrementing it by one with each entry and saving the new value, but that doesn't work because the variable is reset as soon as the call is gone. This would also work if I could pick the value back up again by querying the table where it was stored, but I don't know how I'd do this dynamically (since more than 1 employee would be logging in).

Next, I tried a cobination of creating a seperate table of entry IDs and then queried the table for "entryID > " (leaving the operand blank, in hopes that it would just find the largest number) and then getting the stack properties for the entry ID table, incrementing by one, and then putting the new value back in, but this only appears to work up to entry ID 10. So it must be grabbing all 10.

In a nutshell, I'm not sure how to specify tblEntryID so that I can grab the stack properties and count the rows. If I just use stack properties alone, there's no way to specify which stack it's looking at...right?

I'm sure there's gotta be some sort of creative solution out there, but my brain is numb at the moment and it's time to go home.

Any helpful input would be much appreciated.

Cheers,
Tim G.

Re: Unique line ID

Hi Tim,

It sounds like you're using Simple Database with your applications. We don't recommend using Simple DB for production applications because there's no guarantee your data will be saved. We also don't recommend using the Simple DB related modules in production applications:  Query Database, Insert Into Database, Update Database, and Delete Rows.

It's fine to use them during development and QA, but please switch to your own databases when you are ready for production.

When using your own database, it's easy enough to set your tblEntryID column to auto-increment.

In the meantime, you could use a Unix timestamp as a unique identifier for each entry.

Regards,
The QuickFuse Team

Re: Unique line ID

Thanks for the input and the heads up about the unreliability of Simple DB. As you eluded to, use of the simple db is only during the initial development/testing phase, and if all goes well, we'll be implementing a web service to connect it to our databases. I'll try the unix timestamp and see if that can get us by until we connect the app to our own db.

Thanks again for the suggestion.

-Tim G.

Re: Unique line ID

Could you please elaborate on how we would go about writing directly to our db instead of to the simple db? As far as I can tell, you still need simple db as the intermediary with a data shuttle scooping up information and transferring it back to our database, but if there's a way we could write directly to our databases, that would be even better.

Re: Unique line ID

Hi Tim,

You'll need to write your own REST or SOAP webservice that will interact with your database. For more information, please take a look at our docs: http://quickfuseapps.com/docs/tutorial/ … webservice

The QuickFuse Team

Re: Unique line ID

Thank you for the link. May I take a look at the code for rest.php, which is referenced in the tutorial? It would help understand what's on the receiving end of the REST commands that are detailed in the latter part of the tutorial.

Re: Unique line ID

Hi Tim,

We've included a copy of the REST code in our tutorials. You can check it out here: http://quickfuseapps.com/docs/tutorial/ … webservice

Regards,
The QuickFuse Team

Re: Unique line ID

This tutorial is very helpful, but it doesn't show how to actually save information to a company's own database. It would be a great resource if this were available. Is it possible to update the tutorial with an example of how you would go about doing this?

Re: Unique line ID

Hi Tim,

Saving information to a database can vary depending on what kind of database you are using, what programming language you are using, etc. Unfortunately, we cannot support all databases and programming languages. We suggest looking up tutorials online.

Regards,
The QuickFuse Team

Re: Unique line ID

I'm simply trying to retrieve each row of data after it has been saved on your end and add it to our database.  I might be over-simplifying this but it is all we need.  I'm not looking for you to explain how to write the code to save to our databases.  I'm trying to figure out how to work with your architecture.  One of your posts reads "You'll need to write your own REST or SOAP webservice that will interact with your database".  Help me understand this please...  Does the IVR data ever reside on a db on your servers?  Or do we need to create the webservices to push the data directly to our db's?  If so, do we need to push each response to our db's or is it possible to wait until the end of the transaction? 

I guess I confused b/c every other service provide that I have worked with will provide a webservice URL for us to connect to and pull data as needed.


Thanks for the help!

Re: Unique line ID

Hi Tim,

We never save any of the IVR data to our databases, so yes, you will need to create your own webservice to push the IVR data directly to your own databases. As for when you push that data, that's entirely up to you.

You can push each piece of data as you get it with multiple REST/SOAP webservice modules, or you can wait until the very end of your call and set up a post-call processing SOAP webservice. You can find that under Configure > Settings.  Or any combination of the two depending on your needs.

Regards,
The QuickFuse Team