Copy & Paste AI Code for 138 HR Processes

John Macy
17 min readAug 24, 2023

The potential of Artificial Intelligence (AI) to elevate a company’s competitive edge is widely acknowledged. However, rather than merely extolling the virtues of AI, this article aims to delve into the pragmatic aspects of building and deploying AI within every company in a cost-effective manner. AI need not remain shrouded in mystery like a secret “black box” — its mechanisms are accessible and comprehensible. Empowering everyone to construct AI applications is a focal point of this article.

AI is a transformative game changer poised to elevate the HR Technology domain into an unparalleled realm of comprehensive AI integration within a company’s enterprise architecture. This article unveils a visionary approach, detailing how the utilization of Copy and Paste AI Code can seamlessly merge with a dynamic Code Library, seamlessly intertwine with a low code application framework, and be meticulously tailored to cater to unique user process requirements.

The rising significance of AI in the Human Resources (HR) technology industry is palpable, as evidenced by the diverse array of products poised for showcase at this year’s HR Technology Conference in Las Vegas this October. Over recent years, AI’s popularity has surged, with numerous articles exploring its potential to revolutionize HR processes. Motivated by this trend, I enlisted the expertise of ChatGPT to meticulously scrutinize the offerings of 380 products exhibiting at the HR Technology conference. Through this partnership, ChatGPT conducted an in-depth analysis of these products, shedding light on existing AI features and uncovering the possibilities for further advancements based on its keen assessment of their functionalities.

138 Artificial Intelligence Features

Following a meticulous analysis, I honed in on 138 distinct AI product features, delving deeper to explore the intricacies of their code composition. The aim was to determine the feasibility of organizations’ HR tech units to custom build their integrated HRMS/AI solutions. The findings proved not only feasible but also remarkably strategic — forging a path to immediate benefits and future-proofing against the ongoing shift from Web2 to Web3. This endeavour, however, hinges on a seamless partnership between HR professionals and IT units within the company.

An ideal scenario emerges wherein a pre-built low code platform serves as a plug-in framework, meticulously specified and maintained by the business unit. Concurrently, plug-in AI components are sourced and managed collaboratively with the IT department. To facilitate this, an external code library becomes a crucial asset, providing a repository for sourcing components while ensuring code reusability and interchangeability.

To empower the assembly of AI components, the creation of a custom HR application on the Salesforce platform emerges as a strategic move. This application serves as a launchpad for AI components, seamlessly integrating them into HR processes by harnessing the robust capabilities of Salesforce. The ensuing table delineates the HR-DPS defined Salesforce custom objects nestled within the HR application framework — a blueprint to embed and launch AI components effectively.

Extract from the HR Data Platform Standard identifying function/process categories impacted by AI

About an AI Application Plug-In Framework

An HR application framework, developed on a Salesforce platform, can serve as a valuable asset in an integrated AI architecture. Here’s how:

  1. Custom HR Processes: With Salesforce, you can design and automate custom HR processes using objects, workflows, triggers, and custom fields. This allows a company to define the specific steps and logic for various HR activities such as recruitment, onboarding, performance reviews, and more.
  2. Integration of AI Components: A company can integrate AI components into their HR processes by creating custom Apex code, triggers, or Lightning components. These components can interact with AI models, perform data analysis, provide recommendations, and enhance decision-making within HR workflows.
  3. Object-Level Design: Designing processes at the object level enables companies to tailor AI functionalities to specific HR objects, such as candidates, employees, positions, etc. For instance, a company can integrate AI-driven resume screening for candidates or AI-powered performance analysis for employees.
  4. Data-Driven Insights: AI components can analyse HR data to provide insights and predictions. For example, predicting employee attrition, identifying training needs, or suggesting suitable candidates for specific roles.
  5. Unified Platform: Salesforce provides a unified platform that brings together HR data, processes, and AI components. This integration eliminates the need to switch between different tools and systems.
  6. Customization and Flexibility: Salesforce’s low-code capabilities enable developers to create custom AI functionalities that align with a company’s unique HR requirements. This flexibility ensures that the AI components are tailored to the company’s specific needs.
  7. Valuable Asset in AI Architecture: The HR application framework built on Salesforce becomes a valuable asset in an integrated AI architecture. It acts as a foundation for launching AI components, streamlining workflows, and optimizing HR processes.
  8. Enhanced User Experience: Integrated AI functionalities can provide HR professionals with insights and recommendations directly within the familiar Salesforce interface, enhancing user experience and productivity.
  9. Scalability and Upgradability: As a company’s HR needs evolve, the Salesforce platform and the custom HR application can be easily scaled and upgraded to accommodate new AI capabilities and features.

By integrating AI components into a custom HR application on the Salesforce platform, a company can create a unified and efficient ecosystem that empowers HR professionals with data-driven insights, streamlines processes, and improves decision-making. It’s important to work closely with experienced developers, AI experts, and HR stakeholders to ensure that the integration meets the organization’s specific HR goals and requirements.Top of Form

About the HR Microservices Code Library

Below is a sample of the 138 AI components that could be part of the integrated solution, with links to CET’s HR Microservices Code Library:

Screenshot of a Code Library component description PDF document

I asked ChatGPT to generate Apex code (code used by Salesforce) that would likely be embedded in an HR application custom built on a Salesforce platform. Salesforce have an AI product called Einstein, but I wanted to look at what Apex code could be embedded into the standard salesforce custom development platform without the need to purchase Einstein. The reason for that approach is to make the code structure and algorithms visible to custom developers so that changes to business requirements can be quickly added to the code: Plus, visibility of algorithm programmed logic can be examined for possible bias. The screenshot example shown below illustrates an AI component from the Code Library content with a section of code that would be copied and pasted to the company’s HR application:

Screenshot of an HR Microservices Code Library product listing

Note at the bottom of the diagram a function is calling on a “Method to perform automated candidate screening” and that is where a library of micro-AI components comes into play and a Methods Framework is described further on in this article.

It is important to state the ChatGPT code used in the CET HR Microservices Code Library is not infringing upon software companies’ Intellectual Property: The code examples provided by ChatGPT are not from a proprietary AI application, nor are they directly from any specific company’s proprietary codebase. The code examples generated by ChatGPT are a result of training on a mixture of licensed data, data created by human trainers, and publicly available information. They are not drawn directly from proprietary codebases, specific companies, or their applications.

It’s important to note that while ChatGPT strives to provide accurate and helpful code examples, it does not have direct access to proprietary, confidential, or unpublished code from any company. The generated code is intended to be illustrative, educational, and informative rather than being specific to any particular organization or application.

We know that early versions of AI were process oriented and formed part of automated steps to support an HR process and were launched or triggered following a specific event occurring during a process. For that reason, AI code should be embedded in an integrated application framework that is structured according to processes within HR functions and contain custom code that can be accessed to add new fields or whole objects, rather than be launched as a 3rd party standalone application.

Competitive Edge Technology (CET) developed a working HR model on the Salesforce HR platform over a decade ago and the structure is still perfect for custom developers to copy and paste AI code. The CET developed platform was designed for citizen developers as a downloadable unmanaged package and only used native Salesforce features. In that way developers did not need coding knowledge, but now embedding Apex code will require collaboration with professional internal or external developers.

Benefits of Reusable Code Libraries for Custom Built AI Components

In the rapidly evolving landscape of AI, the development of custom-built AI components has become a cornerstone of innovation for companies across diverse industries. As organizations strive to leverage AI technologies to enhance their products and services, the role of reusable code libraries has emerged as a crucial enabler. These libraries offer a plethora of benefits that not only expedite development processes but also foster consistency, reliability, and scalability in creating AI-powered solutions. Some advantages are described as follows:

1. Accelerated Development and Reduced Time-to-Market: One of the primary advantages of using reusable code libraries for custom-built AI components is the significant reduction in development time. These libraries provide pre-implemented algorithms, functions, and modules that encapsulate complex AI techniques and methodologies. By integrating these components into their projects, developers can bypass the need to reinvent the wheel, thereby accelerating the development cycle and enabling faster time-to-market for AI-powered applications.

2. Consistency and Standardization: Reusable code libraries promote consistency and standardization in AI development. By adhering to established libraries, developers ensure uniformity in the implementation of AI techniques across different projects. This consistency not only enhances the maintainability of code but also facilitates collaboration among teams, as developers familiar with the library’s conventions can seamlessly contribute to various projects.

3. Robustness and Reliability: Code libraries undergo rigorous testing and validation by a community of developers, leading to increased robustness and reliability. Leveraging battle-tested components reduces the likelihood of bugs, errors, and vulnerabilities in AI applications. This, in turn, enhances the overall quality of the final product and contributes to a more seamless user experience.

4. Scalability and Future-Proofing: As AI technologies evolve, maintaining and updating AI components can become challenging. Reusable code libraries are often designed with scalability in mind, allowing organizations to seamlessly incorporate newer techniques and advancements without substantial rework. This future-proofing capability ensures that AI applications remain relevant and adaptable to changing requirements.

5. Knowledge Sharing and Learning: Code libraries serve as invaluable resources for knowledge sharing and learning within development teams. Developers can explore and dissect the implementations of various AI techniques, gaining insights into best practices and innovative approaches. This collaborative learning environment fosters skill development and encourages continuous improvement among team members.

About Artificial Intelligence Types

The expectation is that all AI will elevate HR services within organizations. However, it’s important to maintain a realistic perspective on different AI’s capabilities. Various AI types exist, each interacting with HR in distinct ways. Two subsets of Artificial Intelligence, AI and Generative AI, exemplify this diversity and application. Here’s a breakdown of their differences:

a) AI (Artificial Intelligence): AI broadly refers to machines or computer systems capable of executing tasks typically requiring human intelligence. These systems analyse data, discern patterns, and make decisions or take actions based on the analysis.

b) Generative AI: A distinct form of AI, Generative AI involves autonomously creating new content, data, or creative outputs. Unlike traditional AI geared toward specific tasks, Generative AI models craft fresh and original content using patterns and acquired knowledge from existing data. These models often employ deep learning techniques, like Generative Adversarial Networks (GANs) or Variational Autoencoders (VAEs). Generative AI finds use in generating images, crafting narratives, composing music, or even generating synthetic data for AI model training.

The HR field predominantly employs AI to streamline processes, effectively treating AI as a component that complements HR operations, triggered by specific events. These conventional AI components are woven into structured data, with algorithms designed to yield outcomes faster than human operators. This approach focuses on automating and customizing business logic for efficiency gains.

Nevertheless, the newer extension of AI ventures into less regulated territory, necessitating novel management practices to ensure data and information integrity. AI has transcended its previous role of chatbots and process automation to embrace new features such as sentiment analysis from survey data, event insights, and predictive capabilities. This expansion highlights AI’s evolving role and addresses biases within AI while acknowledging potential inaccuracies in AI-reported information. While the origin of AI’s information might not always be discernible, its construction remains comprehensible.

Custom Code Development Improves AI Transparency

It is possible to expose custom AI code developed on the Salesforce Apex platform to offer transparency for algorithms to end users, enable scrutiny, and potentially identify instances of bias within the code. Transparency and accountability in AI algorithms are important aspects, and providing visibility into the code can help achieve these goals. Here’s how you might approach it:

  1. Documentation and Explanations: Provide detailed documentation that explains how your AI algorithms work, including the logic, data inputs, processing steps, and decision-making processes. This documentation can be made accessible to end users, developers, and stakeholders to understand the inner workings of the AI.
  2. Commenting and Code Structure: Ensure that your Apex code is well-commented and follows clear code structures. Use comments to explain the purpose of different sections of code, the role of variables, and the steps taken by the algorithm. This makes it easier for others to understand the code’s functioning.
  3. Visualizations: Consider using visualizations, flowcharts, or diagrams to represent the algorithm’s flow and decision points. Visual aids can help users grasp complex processes more easily.
  4. Bias Detection and Mitigation: Implement mechanisms within your AI code to detect and mitigate biases. This could involve analyzing training data, identifying potential bias patterns, and applying techniques to reduce bias. Several products on the 138 list specialise in bias detection.
  5. Testing and Validation: Rigorously test and validate your AI algorithms to ensure they perform as intended. Document the testing procedures and results, and make them accessible to stakeholders.
  6. User-Friendly Interfaces: If appropriate, build user interfaces that allow end users to interact with the AI and see the decision-making process. This could involve displaying relevant data inputs and explaining why certain decisions were made.
  7. Collaboration and Feedback: Encourage collaboration and feedback from diverse teams, including non-technical stakeholders. This can help identify potential biases and areas for improvement.
  8. Continuous Improvement: AI algorithms are iterative. Continuously refine and improve your code based on user feedback, changing data patterns, and emerging best practices.

Remember that while transparency is important, you might need to strike a balance between exposing intricate technical details and presenting information in a way that’s understandable to a broader audience. Also, be mindful of any proprietary or sensitive information in the code that should not be exposed.

By offering transparency and insights into your AI code, you not only promote accountability and trust but also empower stakeholders to understand and contribute to the ethical development and deployment of AI systems.

Using Code Examples from the HR Microservices Code Library

Developers can use the AI Apex code examples provided by ChatGPT as a starting point to build a basic structure for their own applications. The code examples can serve as a foundation, helping developers understand the structure, syntax, and logic required to implement certain functionalities. Here’s how developers can make the most of these examples:

  1. Understanding Concepts: The code examples can help developers grasp key concepts, algorithms, and techniques related to AI and Apex programming.
  2. Syntax and Structure: Developers can examine the examples to understand how to structure code, define functions, use variables, and perform operations.
  3. Algorithm Implementation: Examples can showcase how to implement specific algorithms or logic, such as data processing, calculations, predictions, or other AI-related tasks.
  4. Customization: While the examples may not perfectly fit every use case, developers can customize the code to match their specific requirements, data, and business logic.
  5. Modular Approach: Code examples often break down complex tasks into smaller, manageable modules. Developers can learn how to modularize their code for better organization.
  6. Best Practices: By studying examples, developers can learn about coding best practices, error handling, comments, and other coding standards.
  7. Accelerated Development: Starting with existing code can save time and effort compared to building everything from scratch.

However, it’s important to keep a few considerations in mind:

  • Understanding: Developers should aim to understand the code they’re using. Copy-pasting without comprehension can lead to issues later on.
  • Customization: While starting with examples is helpful, the copied code should be adapted and extended to meet the specific needs of the application.
  • Testing: Any reused code should be thoroughly tested in the context of the new application to ensure it works as intended.
  • Security and Privacy: If the code involves sensitive data or security considerations, ensure that any modifications account for these factors.
  • Licensing: Be aware of licensing terms associated with the original code examples. Some examples may come with specific usage restrictions.

In summary, AI Apex code examples from ChatGPT can be a valuable resource for developers looking to jumpstart their projects. However, it’s essential to use them as a learning tool and a foundation for building well-structured and customized solutions that meet the specific requirements of the application.

Developing Custom AI Components on Standard Salesforce Platforms

Developers often build AI components using low-code platforms like Salesforce.com. While Salesforce offers the Einstein AI platform with advanced AI capabilities, basic AI features and APIs are accessible to all users, irrespective of Einstein purchase.

Within the standard Salesforce platform, users leverage several AI capabilities, such as:

  1. Apex Triggers and Processes: Apex code crafts triggers and processes automating and personalizing business logic based on specific conditions or events. This facilitates intelligent workflows and task automation.
  2. Apex REST and SOAP APIs: Salesforce supplies APIs enabling interaction with external AI services or platforms. This integration couples third-party AI solutions with Salesforce apps through custom Apex code.
  3. Apex Email Services: Users devise custom email services in Apex, processing incoming emails to trigger actions, which may include interaction with external AI services for email analysis or response generation.
  4. Apex Web Services Callouts: Apex facilitates callouts to external AI APIs and manages response processing within Salesforce.

It is essential to note that while these capabilities facilitate AI utilization, they may not replicate the advanced AI functions found in Salesforce’s Einstein product. Einstein encompasses predictive analytics, natural language processing, and image recognition, absent in the standard Salesforce platform.

About Apex Code and a Methods Framework

Apex code designed for AI can be seen as part of a broader methods framework deployed for implementing AI functionalities. Apex AI code encompasses methods, functions, and classes encapsulating logic and operations needed for AI tasks. This code integrates AI functionalities within Apex-based applications, deploying AI libraries, APIs, and external services. Apex AI code encompasses operations like data preprocessing, model training, inference, and AI service interaction.

For instance, consider implementing sentiment analysis in a Salesforce custom application using AI. This entails methods for data preprocessing, sentiment analysis, AI service interaction, and integration with Salesforce objects to store analysed sentiments.

While AI code within Apex isn’t an exhaustive methods framework, it constitutes a subset of the larger AI framework in a specific programming language or platform (like Apex in Salesforce). Organizing these methods within classes fosters modularity.

Code Modularization Design for Reusable Components

Modular AI code can be packaged as components and plugged into other AI applications under development, provided that they are designed to be reusable and modular in nature. This approach is known as code modularization or creating reusable components. Here’s how it can be done:

  1. Identify Modular Components: Review the AI code examples and identify sections or functionalities that can be separated into reusable components. These could be algorithms, data processing functions, predictive models, or any other self-contained units of functionality.
  2. Modularize the Code: Refactor the code to package each identified component as a standalone module. This involves isolating the code for each component, ensuring that it has clear inputs, outputs, and logic.
  3. Create Interfaces: For each component, create well-defined interfaces that specify how other parts of the application can interact with and use the component. This helps in encapsulating the functionality and abstracting the implementation details.
  4. Packaging and Distribution: Package each modular component as a separate module or library that can be easily imported into other projects. This could involve creating Apex classes, libraries, or packages.
  5. Documentation: Provide clear documentation for each component, including information about how to use the component, its inputs, outputs, and any configuration settings.
  6. Version Control: If you plan to distribute the components for use in multiple applications, consider using version control to track changes and updates.
  7. Testing: Ensure that each component is thoroughly tested in isolation before integrating it into other applications. This helps ensure its functionality and reliability.
  8. Integration: Integrate the packaged components into your AI applications by importing and using them as needed. Use the provided interfaces to interact with the components.

Benefits of this approach include:

· Reusability: Components can be reused across multiple projects, saving development time and effort.

· Consistency: Using standardized components ensures consistent functionality and behaviour across different applications.

· Modularity: Components can be developed, tested, and maintained independently, making the overall application more manageable.

· Collaboration: Different teams can work on different components simultaneously, promoting collaboration.

· Updates and Maintenance: Updates to a specific component can be applied across multiple projects by updating the packaged component.

However, keep in mind that the suitability of this approach depends on the nature of the AI components, the architecture of your applications, and the flexibility of the programming language (in this case, Apex) you are using. Additionally, proper design and planning are essential to create well-structured, reusable, and maintainable components.

Comparing Savings Achieved Through an Extensive List of AI Components

The savings achieved through an extensive list of AI components that a company can pick and choose from are multifaceted and extend beyond mere cost reduction. By assembling a diverse catalogue of reusable AI components, companies can reap significant benefits:

1. Cost Efficiency: Utilizing reusable AI components eliminates the need to allocate resources for building and testing complex algorithms from scratch. This translates into direct cost savings by reducing development time, staffing requirements, and associated overhead.

2. Rapid Prototyping: The availability of a wide range of AI components enables rapid prototyping and experimentation. Companies can quickly assemble and test different combinations of components to explore multiple AI-driven solutions, refining their ideas before committing to full-scale development.

3. Flexibility and Customization: An extensive list of AI components empowers companies to tailor their solutions to specific needs. By selecting and integrating components that align with their objectives, companies can create highly customized AI applications without compromising on quality or efficiency.

4. Risk Mitigation: Reusing well-established AI components mitigates the risks associated with untested or unproven algorithms. Companies can leverage the collective expertise of the development community to ensure the reliability and performance of their AI solutions.

5. Focus on Innovation: With the foundational elements of AI development readily available, companies can channel their resources and talent toward higher-level innovation. This allows them to differentiate their offerings, explore novel applications, and stay ahead of market trends.

AI’s Role in Web3 Transition

Simultaneously, it’s pivotal to ascertain AI’s position within a transition strategy as leading companies shift from monolithic HR legacy systems to component-based architecture on the Web3 platform. As Distributed Ledger Technology (DLT) and trusted peer-to-peer networks manage confidential employee data, AI will continue to perform the same role in the new environment and manage company owned data.

Recognizing that no single software provider can fulfill all HR community AI and functional requirements, companies are advised to prototype their DLT product needs on a low-code platform. Custom-building AI features using the same low-code platform proves both feasible and cost-effective.

Conclusion

In conclusion, the adoption of reusable code libraries for custom-built AI components offers a spectrum of advantages, ranging from streamlined development processes to enhanced reliability and scalability. The extensive list of AI components available for selection amplifies these benefits by driving cost efficiencies, promoting flexibility, and enabling a sharper focus on innovation. As the AI landscape continues to evolve, harnessing the power of reusable code libraries emerges as a strategic imperative for companies seeking to harness the potential of artificial intelligence.

--

--

John Macy

John Macy is a visionary and thought leader in HR technology, Holochain, Metaverse, Web3, etc. & has written books & consulted to HR clients worldwide