Use this method to find the first and last touch responses on Opportunities in the same way the applications determine first and last touch. First touch is the oldest response associated to an Opportunity and last touch is the latest response associated to an Opportunity. Both will be earlier or equal to the Opportunity's Created Date. The association between an Opportunity and responses is defined by the Opportunity to Campaign Members mapping set in the allResponsesByOpp parameter.
void MethodName(String param1, Integer param2)
- allResponsesByOpp - A map from Opportunity Id (key) to a Map of Campaign Members by their Id.
- opportunities - A list of Opportunities objects whose Id is a key in allResponsesByOpp. If called in a model run by Response Management, make sure the following fields can be referenced from the opportunities: FCR_First_Campaign_Touch__c, FCR_Last_Campaign_Touch__c.
A two element list of maps of Campaign Members by Opportunity Id. The first element is a map from Opportunity Id to the first response. The second element is a map from Opportunity Id to the last response. If no first and last touch responses are found, the two elements in the list will contain empty maps.