Logical Identifiers

This topic provides an overview of logical identifiers.

This topic contains the following sections.

About Logical Identifiers

Historically, CampusNexus CRM iServices was programmed to call APIs that passed the Property ID as the parameter to perform all business operations (for example, update property data). The limitation of this solution was observed when administrators attempted to port object properties from one environment to another using iServices.

In a scenario where a large number of property values had to be updated, users had to search through database tables to find the correct Property ID and then use the same to perform the update operation. This was not only time consuming, but a very difficult process as it was difficult to locate and retrieve the required IDs from the tables.

Typically, Property IDs in one environment are different for corresponding properties in another environment, which resulted in porting becoming a complicated and manually-intensive process.

This feature addresses this problem by introducing a unique logical name called “Logical Identifier” that is assigned to each property name or ID.

The following iService methods use these logical identifiers instead of property IDs while porting properties to other environments:

  • GetPropertyIds

  • GetPropertyLogicalIdentifierNames

  • GetTabIdsByName

  • GetTabNames

  • GetObjectIds

  • GetObjectNames

With this enhancement, when users update property information or port specific properties, they no longer have to manually look for the required IDs. With the logical identifiers being unique, the new methods help retrieve the required IDs with ease, even when the property IDs themselves are not necessarily unique.

Example

Consider a scenario where you are required to update the following property values in the Property tab of a Lead object item:

  • Name

  • Campus

  • Team

  • Email

  • SMS

  • Phone

Previous User Experience

Prior to this enhancement, if you wanted to update these property values, you had to manually find the corresponding Property IDs from the appropriate database tables, create the required property data structure with the correct property IDs and their corresponding (new) values, and then call the API that would be executed to update the values.

Extend this scenario further, where you are required to port these property values on to a different CampusNexus CRM environment. The user experience in terms of the complexity increases manifold, because the Property IDs for these six properties may not be the same in the new environment where you want to port them.

You are required to search for the corresponding Property IDs in the new environment before attempting to port the customized solution. Users also had to include the effort required to retest the customized solution after these changes.

This task becomes significantly harder to achieve when the number of properties you want to update or port increases.

User Experience With Logical Identifiers

Let us consider the same scenario where the user attempts to accomplish this update operation using Logical Identifiers:

  1. The user first initiates a PropertyIdRequestMessage for the previously mentioned six properties:

    //Initialising the propertyIdRequestMessage
                           PropertyIdRequestMessage inMessage = new PropertyIdRequestMessage();
                           inMessage.ObjectName = "Lead";
                        string[] logicalIdentifierNames = new string[] { "Name", "Campus", "Team", "Email", "SSN", "Phone" };
                           inMessage.LogicalIdentifiers = logicalIdentifierNames;
                        string errorDescription = "";
  2. Next, the user calls the GetPropertyId API to fetch the Property IDs for these properties by passing the “Logical Identifiers” as the input:

    //Fetch Property IDs based on the corresponding Logical Identifiers.
                           PropertyResponseMessage propertyResponseMsg = utilService.GetPropertyIds(inMessage);
    
                        if(propertyResponseMsg.ErrorCode != 0)
                           {
                           errorDescription = propertyResponseMsg.ErrorDescription;
                           }
                        List<long xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5"> propertyIDs = new List</long>();
                        foreach (PropInformation propInfo in propertyResponseMsg.PropertyInformations )
                        {
                        propertyIDs.Add(propInfo.Id);
                        }
    
                        long objectType = propertyResponseMsg.ObjectInfo.ObjectType;  
                        //The Lead Object ID                                  
                        long leadObjectId = 1; 
                        // ID of the lead object item for which you want to update values in the Property Tab of the custom object.
                            string error = ""; // Error description obtained on method completion.
                        long result = 0; //Setting the return value as Success, to ensure the  correct value is reflected when the method call is completed.
  3. The user creates a data structure from the collection of six values that is fetched for the corresponding Property IDs:

                //Initializing the PropertyInfo list with the required information.
                COFWebReference.PropertyInfo[] propertyData = new COFWebReference.PropertyInfo[6]; // 6 properties are passed for creating a Lead item.
    
                //Setting the PropertyInfo class values for the Name property in the Lead Object.            
                COFWebReference.PropertyInfo propName = new COFWebReference.PropertyInfo();
                propName.propertyID = propertyIDs[0]; // The Name property ID in the Lead object.
                propName.propValue = "John Peter"; //Value of the Name property in the Lead Object.
    
                propertyData[0] = propName;
    
                //Setting the PropertyInfo class values for the Campus property in the Lead object.            
    COFWebReference.PropertyInfo propCampus = new COFWebReference.PropertyInfo();
                propCampus.propertyID = propertyIDs[1]; 
                propCampus.propValue = "52"; 
                propertyData[1] = propCampus;
    
                //Setting the PropertyInfo class values for the Team property in the Lead object.            
                COFWebReference.PropertyInfo propTeam = new COFWebReference.PropertyInfo();
                propTeam.propertyID = propertyIDs[2]; 
                propTeam.propValue = "52";
                propertyData[2] = propTeam;
    
                //Setting the PropertyInfo class values for the Email property in the Lead object.            
    COFWebReference.PropertyInfo propEmail = new COFWebReference.PropertyInfo();
                propEmail.propertyID = propertyIDs[3]; 
                propEmail.propValue = "john@gmail.com";
                propertyData[3] = propEmail;
    
                //Setting the PropertyInfo class values for the SSN property in the Lead object.            
                COFWebReference.PropertyInfo propSSN = new COFWebReference.PropertyInfo();
                propSSN.propertyID = propertyIDs[4]; 
                propSSN.propValue = "323-54-9867";
                propertyData[4] = propSSN;
    
                //Setting the PropertyInfo class values for the Phone property in the Lead object.            
    COFWebReference.PropertyInfo propPhone = new COFWebReference.PropertyInfo();
                propPhone.propertyID = propertyIDs[5]; 
                propPhone.propValue = "566-523-4352";
    propertyData[5] = propPhone;
  4. Finally, the user executes the command to update the Property tab with these new property values:

    //This method updates the property values available in the Property Tab of a custom object item in CampusNexus CRM.
    result = cofService.UpdatePropertyTab(objectType, leadObjectId, propertyData, out error);
    
           if(result != 0)
           {
               //handle error
           }