Would the ID (GUID) of a Policy object ever change?

Discussions related to order tracking development with the ProForm module.

Moderator: Phil Barton

Post Reply
joe.mag
Posts: 109
Joined: Thu Aug 04, 2011 3:11 pm

Would the ID (GUID) of a Policy object ever change?

Post by joe.mag » Tue Oct 30, 2012 4:42 pm

I wasn't sure how to search for any past questions related to this topic since "Policy ID" brings back all kinds of stuff so I apologize for any duplication!

Here's my question: For a Policy object that has been created and been assigned a GUID as its ID field value in the database, is there anything that would ever cause that Policy to get a new ID assigned? Or, does SPS, under the covers, ever transfer the attributes of one Policy to a new one and suppress the old one? In other words, to code looking in via the API would that order's Policy object suddenly seem to have a new ID?

Background
-------------

Here's the deal: We are managing the assignment of virtual jacket numbers to policies with an external system that uses SPS integration to communicate, via a custom package, the underwriter, details of the policy type, all the needed particulars to our external "Virtual Jacket Manager." The VJM then records in its database that an association between a virtual jacket number (taken from a range provided to us by each Underwriter we work with) has been associated with the SPS Policy object with ID {GUID} and conveys to SPS the jacket number which is then used to populate the Policy Number field. The VJM is smart enough that if someone deletes a policy it detects the deletion (by periodically looking to see if the Policy with that GUID is still around) and returns the gently used jacket number back to the pool from whence it initially came. That way some new Policy can fetch it anew. This usually works quite well.

However, we sometimes see where a Policy is losing it's jacket but the Policy is still present--in other words the linkage between the VJM's association record which is via the ID field is saying the ID of the Policy object changed. All the details of the Policy are unchanged but it's as if the GUID got regnerated or that SPS made a clone of the Policy and slipped it in place of the original without anyone knowing.

john.morton
Posts: 89
Joined: Wed Nov 16, 2011 11:51 am

Re: Would the ID (GUID) of a Policy object ever change?

Post by john.morton » Fri Nov 09, 2012 10:08 am

Unfortunately, as you observed, it seems that the ID can change for a Policy, so it's not a great key to base things on. The down side is that from a user's perspective, everything can be duplicated for a given policy, so there's no good alternate key to give you. I was badgering one of our QAs about this, and she was saying that what makes a Policy unique is generally different for each customer. So, your best bet might be to ask your customer what you can use to uniquely identify a Policy, and start using that as an alternate key instead of our dumb keys (ID).

joe.mag
Posts: 109
Joined: Thu Aug 04, 2011 3:11 pm

Re: Would the ID (GUID) of a Policy object ever change?

Post by joe.mag » Fri Nov 09, 2012 12:08 pm

John, I cannot thank you enough for your candid answer! It's much better than a candy-coated but misleading reply. I think this is happening so infrequently that we can address it by having humans intervene when the problem arises--we have a report that catches this situation when it occurs so it's not as if they're going to slip past--we just need to use human wits to resolve the potential ambiguity.

That said, it sure would be nice if the code could be changed to address this issue--the average developer is certainly going to assume that a GUID ID field isn't going to magically change so it's bound to lead to trouble for more than just me and potentially in a more catastrophic manifestation!

Thanks again!

john.morton
Posts: 89
Joined: Wed Nov 16, 2011 11:51 am

Re: Would the ID (GUID) of a Policy object ever change?

Post by john.morton » Fri Nov 09, 2012 12:51 pm

the average developer is certainly going to assume that a GUID ID field isn't going to magically change so it's bound to lead to trouble for more than just me and potentially in a more catastrophic manifestation!
Well, it's a matter of opinion I guess. When dealing with a foreign system, I wouldn't ever trust a "dumb key" like our GUID ID fields. I would put much more trust into an alternate / logical key of some kind that I could use to identify the item. Again though, with Policy specifically, you don't have that either.

Post Reply