Blog

  • AI Pattern Reference

    As an Architect, I love patterns. Patterns, Patterns and more Patterns. As artificial intelligence continues to evolve, it’s vitally important to adopt structured approaches to design, deployment, and governance of AI systems. AI patterns provide a proven framework for building scalable, efficient, and responsible AI solutions. These patterns encapsulate best practices across data processing, model training, deployment, integration, and governance, helping navigate the complexities of AI development.

    Selecting the right pattern can enhance performance, security, and interpretability, ensuring AI models operate optimally in real-world applications and use cases. For example, Edge AI enables real-time processing on devices, while Federated Learning ensures privacy by keeping data decentralized. Governance patterns like Explainable AI (XAI) and Bias Mitigation help build trust by making AI decisions more transparent and fair.

    By using AI patterns, you can streamline AI adoption, reduce risks, and stay ahead of emerging trends – the AI space is changing on a daily basis! 

    The table below provides a structured overview of essential AI patterns, offering a practical guide for developers, architects, and decision-makers looking to build responsible and high-performing AI systems.

    CategoryPatternDescription
    Data PatternsData Ingestion & ProcessingETL (Extract, Transform, Load) pipelines that collect, clean, and standardize data from multiple sources before storage or analysis.
    Feature EngineeringTransforming raw data into meaningful features that improve ML model performance, including normalization, encoding, and extraction.
    Data AugmentationExpanding datasets using synthetic data, transformations (e.g., rotation, cropping for images), or noise addition to improve generalization.
    Model Training & Deployment PatternsSupervised LearningTraining models on labeled datasets where inputs are mapped to known outputs, commonly used in classification and regression tasks (e.g., fraud detection, sentiment analysis).
    Unsupervised LearningIdentifying patterns and relationships in unlabeled data, often used for clustering and anomaly detection (e.g., customer segmentation).
    Reinforcement LearningTraining models through rewards and penalties to optimize decision-making in dynamic environments (e.g., self-driving cars, gaming AI).
    Transfer LearningLeveraging pre-trained models on related tasks to reduce training time and resource requirements (e.g., fine-tuning BERT for NLP tasks).
    Federated LearningDecentralized model training across multiple devices while preserving data privacy, reducing the need for centralized data collection.
    AI Deployment & Serving PatternsBatch InferenceRunning AI models on large datasets at scheduled intervals, suitable for tasks like fraud detection and batch analytics.
    Real-Time InferenceDeploying AI models as APIs to generate instant predictions in response to user queries (e.g., chatbot responses, recommendation engines).
    Edge AIRunning AI models directly on edge devices instead of in the cloud, reducing latency and bandwidth usage (e.g., IoT sensors, autonomous vehicles).
    Hybrid AI (Cloud & Edge)Combining cloud-based AI for heavy computation with edge processing for faster responses and efficiency (e.g., real-time video analytics).
    AI Integration PatternsRetrieval-Augmented Generation (RAG)Enhancing large language models (LLMs) with real-time retrieval of external data to provide more accurate and up-to-date responses.
    Agentic AIAI models acting autonomously by planning and executing complex tasks without human intervention (e.g., AI-driven automation systems).
    AI OrchestrationManaging multiple AI models within workflows to optimize decision-making (e.g., ML pipelines, multi-agent systems for automation).
    Human-in-the-Loop (HITL)Combining AI automation with human oversight for decision validation and correction, ensuring reliability in high-stakes scenarios (e.g., medical diagnosis, legal AI review).
    AI Governance & Ethical PatternsExplainable AI (XAI)Techniques that make AI decisions interpretable and transparent, such as SHAP values and LIME for model explainability.
    Bias MitigationIdentifying and reducing biases in AI models to ensure fairness, including re-sampling data, fairness constraints, and adversarial debiasing.
    Adversarial DefenseProtecting AI models from attacks designed to manipulate predictions, such as adversarial examples in image recognition.
    Privacy-Preserving AIEnsuring AI models comply with data privacy regulations (GDPR, CCPA) using techniques like differential privacy and federated learning.

  • Find a Salesforce Object type from a Salesforce Record ID

    If you’ve got a Salesforce record Id, need to quickly find out what object type the record is, then you can use the following snippet via execute anonymous in your Salesforce org. You just replace the myRecordId value with the Record ID that you’re working with.

    Id myRecordId = '003Qy000008ZanCIAS'; 
    System.debug('sObjectType is: '+ myRecordId.getsobjecttype());

  • EE Smart Hub Plus – Technical Specifications

    I’ve recently been trying to understand how I can upgrade my home network. I’ve currently got a 1.6Gbps fibre connection coming into my home, I am using the ISP provided (EE Smart Hub Plus) router – which is working fine, however via various network diagnostics I’m struggling to get the best performance possible – both speed and range.

    I’ve been struggling to get the actual technical specifications of the EE Smart Hub Plus to be able to factually compare it with the likes of Amazon’s Eero, Ubuqiti’s UniFi Express, TP-Link Deco range and other SoHo Mesh Wifi setups.

    Here is a table of the technical specifications that I was able to find – I thought I’d create this blog post to hopefully help others find this information easily!

    EE Smart Hub Plus

    A picture of the EE Smart Hub Plus
    EE Smart Hub Plus
    Wi-Fi StandardWi-Fi 6 (802.11ax)
    BandsDual-band (2.4GHz, 5GHz)
    2.4GHz Configuration3×3 MIMO
    5GHz Configuration4×4 MIMO
    6GHz ConfigurationNot supported
    Maximum Connected DevicesUp to 190 devices
    WAN Port1 × 2.5 Gigabit Ethernet
    LAN Ports4 × 1 Gigabit Ethernet
    USB Port1 × USB 3.0
    DSL SupportADSL2+, VDSL, FTTC, FTTP
    Hybrid BackupSupports 4G backup via Smart Hybrid Connect
    Smart Home IntegrationNone
    Wi-Fi FeaturesSmart wireless, parental controls via EE app
    Material95% recycled plastic
    Status IndicatorsLED with various colors
    Maximum SpeedUp to 1.6 Gbps
    SecurityBuilt-in firewall and advanced web protection
    Dimensions~28 cm × 18 cm × 4 cm
  • A Simplified Guide to Salesforce Einstein Features

    I love nothing more than pure simplicity. Although I appreciate visual design and information presentation, sometimes I just crave a really simply formatted document. In my quest to learn about all things Salesforce Einstein, I felt overwhelmed with all the glossy marketing material, and wanted to create a simple list of Einstein features, including what the business use of the capability is, so I’ve created the list below – sharing here so others can take advantage!

    These Einstein products are from across the multiple Salesforce clouds (Sales, Service, Marketing, etc.) and provide a range of functions aimed at enhancing productivity, insights, and customer engagement.

    1. Einstein Lead Scoring
    • Capability: Analyzes historical data to score leads based on their likelihood to convert.
    • Business Use: Helps sales teams prioritize leads, focusing on those most likely to turn into opportunities.

    2. Einstein Opportunity Scoring

    • Capability: Provides scores for opportunities by predicting the likelihood of closing.
    • Business Use: Assists sales reps in focusing on high-potential deals, optimizing the sales pipeline.

    3. Einstein Activity Capture

    • Capability: Syncs emails and calendar events to Salesforce automatically.
    • Business Use: Reduces manual data entry, improves data consistency, and provides insights into client engagement.

    4. Einstein Account Insights

    • Capability: Analyzes news and trends to provide insights into accounts.
    • Business Use: Enables sales reps to stay informed about client activities, enhancing relationship-building.

    5. Einstein Email Insights

    • Capability: Suggests follow-up actions based on email content.
    • Business Use: Boosts sales efficiency by surfacing key tasks and recommendations for engaging clients.

    6. Einstein Forecasting

    • Capability: Utilizes AI to forecast sales numbers with high accuracy.
    • Business Use: Helps sales teams plan and allocate resources effectively, improving revenue predictability.

    7. Einstein for Service Cloud (Einstein Case Classification & Routing)

    • Capability: Auto-classifies and routes cases based on historical patterns.
    • Business Use: Enhances service response times and case resolution by sending cases to the best-fit agents.

    8. Einstein Bots

    • Capability: AI-powered chatbots that handle routine customer service inquiries.
    • Business Use: Frees up agents by automating simple requests, improving response times, and enhancing customer satisfaction.

    9. Einstein Vision and Language

    • Capability: Recognizes objects, scans images, and processes language inputs for advanced analytics.
    • Business Use: Helps companies add visual search, brand detection, and sentiment analysis capabilities to their products.

    10. Einstein Next Best Action

    • Capability: Provides real-time recommendations based on historical data and current context.
    • Business Use: Improves customer experience by suggesting optimal actions to service agents and sales reps.

    11. Einstein Analytics (Tableau CRM)

    • Capability: Delivers advanced analytics, customizable dashboards, and data visualization.
    • Business Use: Enables data-driven decision-making across various departments with insights from customer and business data.

    12. Einstein Prediction Builder

    • Capability: Allows users to create custom AI models for predicting business outcomes without needing programming skills.
    • Business Use: Provides tailored predictions (e.g., churn likelihood, purchase behavior) specific to an organization’s needs.

    13. Einstein Discovery

    • Capability: Analyzes data to uncover insights, trends, and correlations automatically.
    • Business Use: Helps business leaders make informed decisions, identify risk factors, and find new growth opportunities.

    14. Einstein Automated Case Wrap-Up

    • Capability: Suggests case summaries and automatically fills wrap-up details.
    • Business Use: Reduces agent workload, speeds up case closure, and maintains data consistency.

    15. Einstein Article Recommendations

    • Capability: Recommends relevant knowledge base articles for cases.
    • Business Use: Improves customer service response times by quickly providing agents with helpful resources.

    16. Einstein Object Detection

    • Capability: Detects and classifies objects within images.
    • Business Use: Useful for retail and manufacturing, where identifying and categorizing products visually can improve inventory and sales processes.

    17. Einstein Recommendation Builder

    • Capability: Custom AI-based recommendations tailored to each user or customer.
    • Business Use: Drives personalization in sales, e-commerce, and service, offering relevant product or service recommendations.

    18. Einstein Email and Social Media Sentiment Analysis

    • Capability: Analyzes email and social content to assess customer sentiment.
    • Business Use: Provides valuable insights into customer feelings, enabling brands to adapt messaging for better engagement.

    19. Salesforce Data Cloud (previously known as Customer 360 Audiences)

    • Capability: Unified customer profile based on data from various channels.
    • Business Use: Offers a single view of the customer, facilitating more personalized interactions across touchpoints.

    20. Einstein GPT (Newer Addition)

    • Capability: Combines generative AI with Salesforce’s Einstein to produce text, code, or other responses on-demand.
    • Business Use: Enhances productivity across customer service, sales, and marketing, automating tasks like content creation, responses, and sales outreach.
  • Why everyone should know about the Salesforce IdeaExchange

    Introduction

    Alan Kay, one of the pioneer’s of computer science, once famously said “The best way to predict the future is to create it.” As Salesforce users, and professionals – whether that be architects, administrators, business analysts, user interface designers, developers or any of the plethora of roles, we all have ideas for the Salesforce platform; with many of these ideas are influenced by our stakeholders and their user requirements.

    What if there was a place for us to share those ideas, to create the future, with other likeminded people? What if others have already had the same idea and you can accelerate your idea? Or even what if other businesses in your industry or sector have the same common requirement?

    The IdeaExchange is a key component in the Salesforce ecosystem, it’s a place where Salesforce professionals can come together – where not only can great ideas can be shared within the ecosystem, but Salesforce themselves can both see what the community wants, and share some details of their product roadmap.

    Ideas

    Ideas on the IdeaExchange are just normal Ideas! Anyone with a Trailhead or Salesforce Account can login and post an Idea. You can think of Ideas as product feature requests – something within the Salesforce Platform (or even Salesforce Ecosystem, e.g Trailhead) that you think could be improved.

    Ideas are publicly visible to other users of the IdeaExchange to upvote and comment on (and even downvote). Ideas are also visible to the Salesforce product teams. Similar Ideas can be linked together and even merged.

    Prioritisation

    The IdeaExchange has existed for well over a decade and has captured more than 85,000 ideas. However, they can’t all become product features. So how do product managers decide which ones to develop?

    Since the IdeaExchange was created, product managers have been monitoring ideas to see which ones gain popularity and which ones naturally align with the strategic direction of Salesforce products. That hasn’t changed. Ideas that may not have yet risen to the top are still spotted by product managers and incorporated into product roadmaps.

    But now there’s another way for ideas to make it on to the roadmap. Three times a year, IdeaExchange Prioritization occurs, which bridges the always-on idea posting and voting with the product release process. Introduced in late 2018, Prioritization is a process by which product managers review top ideas for their categories, identify ideas to put on the prioritization list, and then ask the community to indicate which ideas on the list are most important.

    Known Issues

    We all make mistakes, and we’ve all had the experience of finding bugs in software and systems – every organisation no matter how large or small, and no matter an infinite investment in testing, there are always pesky bugs, glitches or edge cases that slip through and make their way to end users. The Known Issues section on the IdeaExchange is where Salesforce transparently share the status of product defects – similar to Ideas, you can follow these for updates and see the up-to-date status of the defect being rectified. It’s always useful to check the Known Issues site when you spot anything out of the box, that’s not working as expected, before you contact Salesforce Support, as the defect might already be known to Salesforce and a fix on the way – likewise when you raise something with Salesforce and it’s not already a Known Issue, the support representative will likely create a Known Issue and share back the link for you to use to track.

  • Using Select All in Salesforce SOQL Queries

    Until recent years, Salesforce did not allow you to do a Select All fields type statement. As a new lazy developer transitioning to the Salesforce platform I cursed the number of times I had to go to away and get the API name for a set of fields that I wanted to include in a query — when writing code this was fine, but when wanting to debug Production issues, this was a real pain! Overtime I come to appreciate the fact that it made me a better developer, when writing code I only queried the fields I needed, taking advantage of small performance gains by not retrieving hundreds of fields for simple object database operations.

    Anyhow, Salesforce has come a long way, and now there is the ability too quickly and easily select all, all custom or all standard fields for an object by using a simple statement in your SOQL queries.

    • FIELDS(ALL) — to select all the fields of an object.
    • FIELDS(CUSTOM) — to select all the custom fields of an object.
    • FIELDS(STANDARD) — to select all the standard fields of an object.

    In each case, FIELDS() respects field-level security so it only shows the fields that you have permission to access.

    Examples

    Return all fields for an object

    SELECT FIELDS(ALL) FROM Contact WHERE FirstName = 'Connor' LIMIT 250

    Return only custom fields for an object

    SELECT FIELDS(CUSTOM) FROM Custom_Object__c WHERE Custom_Field__c != NULL LIMIT 250

    Nested Query Example

    SELECT Opportunity.Name, (SELECT FIELDS(ALL) FROM Opportunity.Quotes LIMIT 200) FROM Opportunity

    Remember, if performance is key, and to respect the Salesforce Governor Limits you’ll get better performance by specifying them explicitly rather than using FIELDS() and retrieving more fields than you need.

  • Simple .gitignore Template for Salesforce Projects

    If you need a simple .gitignore template, to prevent unwanted files appearing in your Git repositories for your Salesforce projects, then the below sample works great when you are working with SFDX and GitHub.

    .DS_Store
    .sfdx
    .project
    .salesforce
    .settings
    node_modules
    .idea