Public IDs and integration code

PolicyCenter creates its own unique ID for every entity in the system after it fully loads in the PolicyCenter system. However, this internal ID cannot be known to an external system while the external system prepares its data. Consequently, if you get or set PolicyCenter information, use unique public ID values to identify an entity from external systems connecting to a Guidewire application.

Your external systems can create this public ID based on its own internal unique identifier, based on an incrementing counter, or based on any system that can guarantee unique IDs. Each entity type must have unique public IDs within its class. For instance, two different Address objects cannot have the same public ID.

However, a policy and a policy revision may share the same public ID because they are different entities.

If loading two related objects, the incoming request must tell PolicyCenter that they are related. However, the web service client does not know the internal PolicyCenter IDs as it prepares its request. Creating your own public IDs guarantees the web service client can explain all relationships between objects. This is true particularly if entities have complex relationships or if some of the objects already exist in the database.

Additionally, an external system can tell PolicyCenter about changes to an object even though the external system might not know the internal ID that PolicyCenter assigned to it. For example, if the external system wants to change a contact’s phone number, the external system only needs to specify the public ID of the contact record.

PolicyCenter allows most objects associated with data to be tagged with a public ID. Specifically, all objects in the Data Dictionary that show the keyable attribute contain a public ID property. If your API client code does not need particular public IDs, let PolicyCenter generate public IDs by leaving the property blank. However, other non-API import mechanisms require you to define an explicit public ID, for instance database table record import.

If you choose not to define the public ID property explicitly during initial API import, later you can query PolicyCenter with other information. For example, you could pass a contact person’s full name or taxpayer ID if you need to find its entity programmatically.

You can specify a new public ID for an object. From Gosu, set the PublicID property.