• Jordan Bergeson
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies

Hi, I posted this question in the success community and was directed here. 

In short, I'm asking a few things: 

• Is it possible to use APEX to update converted lead records? (Scenario: Lead is converted to contact, and then at a later time an opportunity is created for the account. I'd like to automatically associate all contacts in the account with that opportunity, and eventually have the corresponding converted lead records updated to "iswon" true if the opportunity actually moves to closed won. We need to be able to report on lead - close for accounts that have multiple contacts, and show that ALL of those lead records eventually closed with a won opportunity.)

• Assuming the above is possible, can I make an adjusted apex class that will use some specific crtieria to only run once, and fix all of our old data for correct YOY reporting? 

How are other organizations handling this? I was told that some have successfully setup a process to manage this automatically via Apex classes and triggers. 

Any input is GREATLY appreciated!

Original question for more context: 

"Hello, our business has been a 1:1 lead:account relationship until recently. As we've began selling to larger accounts with multiple contacts, we've run into some reporting issues for calculating lead to closed won conversion rates.

We've successfully created a formula field on the contact object that looks for Account status value to determine if the account is a closed customer or not. It also checks for created dates to determine that the contact wasn't created after the account actually closed and became new business. 

The problem is that this information doesn't map back to the lead objects that these contacts were converted from. We have to convert leads to contacts, without an opportunity in order to group the leads by Company/Account (This is probably our biggest issue? If we could associate multiple contacts to an account without converting, or even just not using leads at all and starting straight to contacts and reporting from there?). And this formula field solution doesn't allow for proper revenue reporting because even if the contact is identified as 'closed won' we can't pull any contract value information from the opportunity object, we can only identify that it did in fact close. 

Currently sales just picks a random contact for the contact role. We can train them to adjust their method, but in an ideal world I would just like ALL contacts from that account to be associated with the opportunity. (I've seen this thread, and seems to get me close: https://developer.salesforce.com/forums/?id=906F0000000AnsmIAC but this still doesn't solve getting the "iswon" box checked for the converted lead records to report from Lead all the way to close, that accounts for all leads/contacts on an account.)  

How are other business handling this? How can we ensure that ALL leads and contacts are properly associated with a "closed won" opportunity if they are part of that same account. This influences our ability report on marketing impact, campaign data, etc because not all leads are being accounted for. 

Any input or advice is greatly appreciated!!"

Thanks!

Hi, I posted this question in the success community and was directed here. 

In short, I'm asking a few things: 

• Is it possible to use APEX to update converted lead records? (Scenario: Lead is converted to contact, and then at a later time an opportunity is created for the account. I'd like to automatically associate all contacts in the account with that opportunity, and eventually have the corresponding converted lead records updated to "iswon" true if the opportunity actually moves to closed won. We need to be able to report on lead - close for accounts that have multiple contacts, and show that ALL of those lead records eventually closed with a won opportunity.)

• Assuming the above is possible, can I make an adjusted apex class that will use some specific crtieria to only run once, and fix all of our old data for correct YOY reporting? 

How are other organizations handling this? I was told that some have successfully setup a process to manage this automatically via Apex classes and triggers. 

Any input is GREATLY appreciated!

Original question for more context: 

"Hello, our business has been a 1:1 lead:account relationship until recently. As we've began selling to larger accounts with multiple contacts, we've run into some reporting issues for calculating lead to closed won conversion rates.

We've successfully created a formula field on the contact object that looks for Account status value to determine if the account is a closed customer or not. It also checks for created dates to determine that the contact wasn't created after the account actually closed and became new business. 

The problem is that this information doesn't map back to the lead objects that these contacts were converted from. We have to convert leads to contacts, without an opportunity in order to group the leads by Company/Account (This is probably our biggest issue? If we could associate multiple contacts to an account without converting, or even just not using leads at all and starting straight to contacts and reporting from there?). And this formula field solution doesn't allow for proper revenue reporting because even if the contact is identified as 'closed won' we can't pull any contract value information from the opportunity object, we can only identify that it did in fact close. 

Currently sales just picks a random contact for the contact role. We can train them to adjust their method, but in an ideal world I would just like ALL contacts from that account to be associated with the opportunity. (I've seen this thread, and seems to get me close: https://developer.salesforce.com/forums/?id=906F0000000AnsmIAC but this still doesn't solve getting the "iswon" box checked for the converted lead records to report from Lead all the way to close, that accounts for all leads/contacts on an account.)  

How are other business handling this? How can we ensure that ALL leads and contacts are properly associated with a "closed won" opportunity if they are part of that same account. This influences our ability report on marketing impact, campaign data, etc because not all leads are being accounted for. 

Any input or advice is greatly appreciated!!"

Thanks!

I'm trying to create a field that displays to my operators how much time is remaining before a case escalates.  My plan was to have a field that calculates how many business hours have passed since the date/time the case was created and then subtract this figure from the escalation hours. 

So for example, a priority 1 case in our system has a escalate time if not closed of 0.5 (30 minutes) so subtract from that the time open calculated by my business hours field.

Here is an example of the formula I'm after but the problem is this is designed to calculate between two fields, I want to calculate between a field and the current date/time.  I thought replacing "YourEnd/RecentDateFieldHere" with NOW () would do it but the formula doesn't seem to work.  Any ideas?

 
ROUND( "NumberOfBusinessHoursWithinaDay" *( (5*FLOOR(( DATEVALUE( "YourEnd/RecentDateFieldHere" ) -DATE(1996,01,01))/7) +MIN(5, MOD(DATEVALUE( "YourEnd/RecentDateFieldHere" )-DATE(1996,01,01), 7) +MIN(1, 24/ "NumberOfBusinessHoursWithinaDay" *(MOD( "YourEnd/RecentDateFieldHere" -DATETIMEVALUE('1996-01-01 13:00:00'), 1)))))
-
(5*FLOOR((DATEVALUE( "YourStart/OldDateFieldHere" )-DATE(1996,01,01))/7) +MIN(5, MOD(DATEVALUE( "YourStart/OldDateFieldHere" )-DATE(1996,01,01), 7) +MIN(1, 24/ "NumberOfBusinessHoursWithinaDay" *(MOD( "YourStart/OldDateFieldHere" -DATETIMEVALUE('1996-01-01 13:00:00'), 1)))))), 0) / "NumberOfBusinessHoursWithinaDay"


 
  • April 09, 2015
  • Like
  • 0