Depending of what type of data you're working with, you might already have GUIDs built into your data that you can make use of. If not, you may have to invent your own mapping from data objects to GUIDs. In this case, you will probably find the <tt>makeGUID()</tt> function (in Utils) useful:
Cu.import("resource://serviesservices-sync/util.js");
// ...
let newGuid = Utils.makeGUID();