Skip to content

salesforce-misc/NZC-LLM-Bill-Ingestor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

28 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

πŸ“‹ NZC LLM Bill Ingestor

A powerful AI-powered solution for automated bill processing and energy consumption tracking in Salesforce Net Zero Cloud

Salesforce Net Zero Cloud Lightning

πŸš€ Quick Deploy

Deploy to Salesforce

One-click deployment to your Salesforce org


✨ Features

πŸ€– AI-Powered Analysis

  • Smart Bill Processing: Leverages Einstein AI to automatically extract key information from utility bills
  • Multi-Format Support: Processes various file formats including images and PDFs
  • Intelligent Data Extraction: Automatically identifies account names, consumption data, and billing periods

πŸ—οΈ Salesforce Integration

  • Net Zero Cloud Compatible: Seamlessly integrates with Salesforce Net Zero Cloud for sustainability tracking
  • Lightning Web Components: Modern, responsive UI built with Lightning Web Components
  • Flow Integration: Includes pre-built flows for automated record processing
  • Energy Use Record Creation: Automatically creates StnryAssetEnrgyUse records from analyzed data

πŸ“Š Energy Management

  • Consumption Tracking: Monitors electricity usage across multiple sites
  • Historical Data: Maintains comprehensive records of energy consumption patterns
  • Multi-Site Support: Handles bills containing data for multiple locations

πŸš€ Getting Started

πŸ“‹ Prerequisites

Before you begin, ensure you have the following:

  • βœ… Salesforce Net Zero Cloud licensed and configured
  • βœ… Git installed on your local machine
  • βœ… Salesforce CLI (latest version recommended)
  • βœ… Salesforce user with deployment permissions
  • βœ… Active Salesforce org (Sandbox or Developer Edition)
  • βœ… Einstein AI features enabled in your org

πŸ”§ Installation

Choose your preferred deployment method:

🎯 Option 1: One-Click GitHub Deploy (Recommended)

Click the "Deploy to Salesforce" button above for instant deployment to your org.

πŸ“¦ Option 2: Workbench Deployment

For environments where GitHub access is restricted:

  1. Download the pre-built deployment package: NZC-LLM-Bill-Ingestor-Deploy.zip
  2. Navigate to Salesforce Workbench
  3. Login to your target org
  4. Go to Migration β†’ Deploy
  5. Upload the zip file and deploy

πŸ› οΈ Option 3: Salesforce CLI Deployment

For developers who prefer command-line tools:

3.1 Clone the Repository
git clone https://github.com/jvillalpando_sfemu/NZC-LLM-Bill-Ingestor.git
cd NZC-LLM-Bill-Ingestor
3.2 Authorize Your Org
# For sandbox/production orgs
sfdx auth:web:login --setalias MyOrg --instanceurl https://test.salesforce.com

# For developer orgs
sfdx auth:web:login --setalias MyOrg
3.3 Deploy the Metadata
# Deploy all components
sfdx force:source:deploy -p force-app -u MyOrg

# Or use CumulusCI (if configured)
cci flow run dev_org --org dev

⚑ Post-Deployment Configuration

After deploying with any method above, ensure your org has:

  • βœ… Einstein AI Platform enabled
  • βœ… Prompt Template Builder access
  • βœ… Required Einstein credits available
  • βœ… Net Zero Cloud licensed and configured

🎯 Usage

πŸ“± Adding Components to Lightning Pages

  1. Navigate to your target Lightning Page (Home, Account, etc.)
  2. Edit the page using the Lightning App Builder
  3. Find the Image Analyzer component in the Custom Components section
  4. Drag the component to your desired location
  5. Configure component properties as needed
  6. Save and Activate the page

πŸ”„ Processing Bills

  1. Upload a bill file using the Image Analyzer component
  2. Click "Analyze with AI" to process the document
  3. Review the extracted data in the results panel
  4. Click "Create Energy Records" to automatically create StnryAssetEnrgyUse records
  5. Monitor the progress and view created record links

πŸ“Š Viewing Results

  • Energy records are automatically linked to your parent record
  • View created records by clicking the provided links
  • Track consumption patterns in Net Zero Cloud dashboards

πŸ—οΈ Architecture

graph TB
    A[Lightning Web Component] --> B[AIFileAnalysisController]
    B --> C[Einstein AI Prompt Templates]
    B --> D[MultipleJSONParser]
    B --> E[StnryAssetEnrgyUse Records]
    C --> F[AI Analysis Results]
    F --> G[JSON Parser]
    G --> E
    E --> H[Net Zero Cloud]
Loading

🧩 Key Components

Component Description
imageAnalyzer Lightning Web Component for file upload and AI analysis
AIFileAnalysisController Apex controller handling AI processing and record creation
MultipleJSONParser Utility class for parsing complex JSON structures
Process_AI_Analysis_Result Flow for additional processing workflows

🀝 Contributing

We welcome contributions to improve the NZC LLM Bill Ingestor! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“ Development Guidelines

  • Follow Salesforce coding standards
  • Include comprehensive test coverage (>75%)
  • Update documentation for new features
  • Test thoroughly in multiple org types

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE.md file for details.


πŸ†˜ Support

  • πŸ“š Documentation: Check our Wiki for detailed guides
  • πŸ› Issues: Report bugs via GitHub Issues
  • πŸ’¬ Discussions: Join the conversation in GitHub Discussions
  • πŸ“§ Contact: Reach out to the maintainers for enterprise support

Made with ❀️ for the Salesforce Community

⭐ Star this repo if you find it helpful!

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •