Tag Archives: salesforce apex class

Wedid: Automated Energy Savings Certificate (ESC) Calculations

Challenges

The IPART has a specific formula for the Energy Savings Scheme (ESS) to calculate Energy Savings Certificates (ESC). The company needs to capture the baseline lighting system (current) and compare it with the upgraded lighting system (proposed). The current calculation is done using excel and it poses some challenges:

  • the calculation is not accurate because not all scenarios are considered
  • not extensible
  • difficult to track the itemised calculations

Solution:

  • Capture current and new lighting system in Salesforce
  • Calculate saved MWH and ESC
  • Calculate the estimated ESC money value and prepare a ROI report to end customer in quote

Related Objects Opportunity, Quote, Custom Object
Components Apex Class, Apex Trigger, Visualforce Page, Data Model Design
Complexity Complex

Wedid: Automate Installation Job from Closed Opportunity

Challenges

The business organisation runs an electrical appliance shop. The typical sales cycle for this business includes:

  • sales to convert leads to account/opportunities
  • sales to close won successful opportunities
  • coordinator to receive a notification from sales
  • coordinator to manually create an installation record (custom object) and link to the closed won opp to track on the status
  • coordinator to manually update the installation status back to opportunity upon completion

Some additional challenges,

  • the coordinator must not see all data related to the sales figures for the opportunity
  • the coordinator only has Force.com App Subscription license (no access to Opportunity object)

Solution:

  • Create separate data model for job installation
  • Automate the job to create the installation record via a button ‘Create Installation Job’
  • Provide validation to ensure only one installation record is created per Opportunity

Related Objects Opportunity, Custom Object
Components Apex Trigger, Apex Class, Visualforce Page, Custom Button
Complexity Medium

Wedid: Storing Information from Customised e-Form

Challenges

This company needs to interview their customer using iPad. Due to the complexity in the data model, they will need to create records in 8 different objects and links them together. This process is very time consuming and too many clicks are involved. It became a user adoption issue.

To solve this issue, we have implemented mobile optimised form in Salesforce. Upon saving the record, all the data will be saved in separate object and linkage will be built automatically.

Solution:

To replace manual form insertion and enhance the process on how information is being captured in Salesforce using iPad/iPhone.

Related Objects Account, Opportunity, Other Custom Objects
Components Visualforce Page, Apex Class
Complexity Moderate

Wedid: Allow Tracking/Converting Multiple Contacts Per Lead

Challenges

In the business world of marketing it’s only natural that you will be communicating with different user roles such as the marketers, publishers, strategist and the list goes on. Our customer faces a problem when they try to track these users going into a prospective lead. SF currently converts one contact per lead and it poses the following issues for our customer:

  • unable to track multiple contacts within a lead
  • will have to create multiple leads and manually attach to existing account which takes too much time
  • manual creation of the contacts only after the lead is converted

Solution:

To allow tracking and converting multiple contacts per lead

Related Objects Lead, Account, Contact
Components Apex Class, Apex Trigger
Complexity Medium

Wedid: Invoice Pro-rata Calculation

Challenges

In a subscription business model, its important that the monthly invoice/bill amount is presented correctly to their customer and the following scenarios are the common challenges in managing the monthly bill amount:

A simple full month scenario is as explained here. However, there may be situation where the subscription starts in the middle of the month, for example:
The Subscription for Product A for the customer has the following details:
Subscription Start Date: 10th Mar 2013
Subscription period: 6 months
Subscription End Date; 10th Sep 2013
Total Subscription Price: $6,000
 
In this case, the following billing items will automatically be created:
Billing #1 = Period: 10th Mar – 31st Mar 2013; Bill Date: 1st Apr 2013; Amount: $709.68
Billing #2 = Period: 1st Apr – 30th Apr 2013; Bill Date: 1st May 2013; Amount: $1,000
Billing #3 = Period: 1st May – 31st May 2013; Bill Date: 1st Jun 2013; Amount: $1,000
Billing #4 = Period: 1st Jun – 30th Jun 2013; Bill Date: 1st Jul 2013; Amount: $1,000
Billing #5 = Period: 1st Jul – 31st Jul 2013; Bill Date: 1st Aug 2013; Amount: $1,000
Billing #6 = Period: 1st Aug – 31st Aug 2013; Bill Date: 1st Sep 2013; Amount: $1,000
Billing #7 = Period: 1st Sep – 10th Sep 2013; Bill Date: 1st Oct 2013; Amount: $290.32
The customer is looking for a solution which includes the handling of the full subscription as well as the pro-rata subscription scenario.

Solution:

  • Automatically calculate, for example the bill amount of a subscription (i.e. a subscription deal)
  • Ensure that the bill amount is reflected correctly in the subscription (i.e. including a non-full month subscription which requires pro-rata calculation)

Related Objects Standard/Custom object
Components Apex Class & Apex Trigger
Complexity Complex

Wedid: Synchronise Saasu Payment to Salesforce

Challenges

In Saasu when the Invoice is paid, the payment amount will update the associated Salesforce record automatically. As such, salesperson will get the payment status and amount from Saasu to Salesforce.

Solution:

Sync Saasu(purchase order and sales order type) payment automatically into Salesforce

Related Objects Opportunity(Standard Object) & Expenses(Custom Object)
Components Apex Class
Complexity Intermediate

Wedid: Billing Schedule

Challenges

In a subscription business model, invoices are billed by schedule (i.e. monthly). One of our client purchased Salesforce and would like to implement their subscription business model via the CRM system particularly on monthly billing.

A simple scenario:-
Opportunity has Closed Won.
Product A:-
Subscription Start Date: 1st Jan 2013
Subscription period: 6 months
Subscription End Date; 30th Jun 2013
Total Subscription Price: $6,000
In this case, the following billing items will be created:
Billing #1 = Period: 1st Jan – 31st Jan 2013; Bill Date: 1st Feb 2013; Amount: $1,000
Billing #2 = Period: 1st Feb – 28th Feb 2013; Bill Date: 1st Mar 2013; Amount: $1,000
Billing #3 = Period: 1st Mar – 31st Mar 2013; Bill Date: 1st Apr 2013; Amount: $1,000
Billing #4 = Period: 1st Apr – 30th Apr 2013; Bill Date: 1st May 2013; Amount: $1,000
Billing #5 = Period: 1st May – 31st May 2013; Bill Date: 1st Jun 2013; Amount: $1,000
Billing #6 = Period: 1st Jun – 30th Jun 2013; Bill Date: 1st Jul 2013; Amount: $1,000

Solution:

  • Automatically calculate monthly subscription amount
  • Automatically create billing schedule records to accomodate/record the monthly billing items and information

Related Objects Standard/Custom object
Components Apex Class & Apex Trigger
Complexity Complex

Wedid: Dynamic Auto Number

Challenges

The customer plans and implements programs/services for their clients.

They keep track on opportunities using ascending/unique auto numbers. These job numbers will only be assigned to opportunities that hits certain stage.

For this scenario, we have ruled out the Salesforce standard auto-number field as the unique numbers are assigned to all opportunity records.

Sample:

Opportunity Stage Auto Number
Opportunity 1 Closed Won 001
Opportunity 2 Prospecting
Opportunity 3 Negotiating
Opportunity 4 Closed Won 002

Solution:

Dynamically assigned auto number to opportunities at certain stage.

Related Objects Opportunity, Custom Settings
Components Apex Trigger and Apex Class
Complexity Moderate

Wedid: Mass Email Users On Event Meeting Updates

Challenges

The customer runs through a lot of meetings with their clients to discuss through the requirements. However, not all team members within the project are able to attend the meeting. However, they will still want to be informed of the meeting details so that they aware of the meeting results.


At the end of the day, the event meeting organiser will update the event with notes taken during the event. Upon the status completion, emails will be sent out to selective users with the meeting details.  

Solution:

Mass email users with event meeting updates

Related Objects Event
Components Apex Class, Apex Trigger
Complexity Simple

Wedid: Implementing Page Wizard

Challenges

The business organisation runs a Gym service centre. Customers have to pre-book their gym activity in advance so that the classes can be arranged. It uses Salesforce to track the following details:

  • customer health status in a custom object
  • type of classes with health hazard identifier in a custom object
  • schedules for the classes in a custom object that links to the classes

To enroll a member to the class, the Salesperson needs a page view wizard. This page wizard allows one glance view to all the related (parent-child) information needed for enrollment. Without the wizard, it proves difficult for the Salesperson as he needs to switch between object displays to get complete information. And these steps need to be repeated as it involves enrolling a member in many different classes.

Solution:

  • Page wizard to display all information in a one glance view
  • Saves time for the Salesperson and efficiently enroll members

Related Objects Contact, Custom Object
Components Visualforce Page, Apex Class, Custom Button
Complexity Medium