• Helen Vico
  • NEWBIE
  • 0 Points
  • Member since 2021
  • Salesforce Developer

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 1
    Replies
Require code for a call out to software webservice to PAUSE call recording from a call agent when they press a button to enter Credit Card info. This is for Salesforce Classic.

When the Donor Team who is on the Contact Record Page takes the Credit Card (CC) information, they will press a button on Contact Record that will take them to a pending page URL to fill out CC info. When they enter the CC details, this should then drive the change on the software webservice to stop the recording. There is currently a code on the page to do this (internal call out) but it does not do it – it needs to be an external call out. Apparently, the old one does not need to be deleted as it will not interfere with a new one.
There is a single log in to Salesforce from Call Centre so how I link the Call Agent ID/Ext with the call out (when all call agents log in with one SINGLE login)


There is NO NEED to do a web call back IN again to switch recording back on again when credit card information is complete as there is already code within the Visualforce page to do this.
When they close the CC URL page, they will return to Contact Page. (This is already operating OK so no need to work on this)
This is the current Visualforce Code:

<apex:commandButton rendered="{!AND(mode<>'activity', mode<>'dd',NOT(OR(callCenterUser, callCenter)))}" value="Save and New" action="{!doSaveAndNew}"/> <apex:commandButton rendered="{!AND(OR(callCenterUser, callCenter),mode='resource')}" value="Save and New" action="{!doSaveAndNew}"/> <apex:commandButton rendered="{!AND(OR(callCenterUser, callCenter),mode='cc')}" value="Save and Add Direct Debit Details" action="{!doSaveAndDD}"/> <apex:commandButton rendered="{!AND(mode<>'activity', mode<>'dd',NOT(OR(callCenterUser, callCenter)))}" value="Save and Add Further Details" action="{!doSave}"/> <apex:commandButton rendered="{!AND(OR(callCenterUser, callCenter), mode='cc')}" value="Save and Make Credit Card Payment" action="{!doSave}"/> 'activity',mode'resource',callCenter)}" value="Save and Add Direct Debit Details" action="{!doSaveAndDD}"/> -->
**Aim:** When the values change in the Case Email Subject Line, automatic changes are to be made to the corresponding values in the picklist values of case fields 
 
The Subject line can contain up to 6 values (1 comment and 5 values). Values marked in Bold are always there. These values in the subject line are all options in the picklist of fields below. 
 
 
Example of Subject Line: RE: <to be closed>,UK,London,Application,Salesforce,P3 

**Acceptance Criteria** 
The Status Field should be changed to ‘Closed’ if criteria: 
1.  subject line contains TEXT ‘To Be Closed’ or <To Be Closed> 
2.  The case field is: Service(Category) – ‘Application Support’, ‘User Support Service’ 
 
Then the other if the values below in the subject line also change then the corresponding case fields change too.
**Further Acceptance Criteria** 
The subject line may contain ONE or MORE of the following Fields Text/Subject. 
•        Country  = Always  Choice of 18 countries 
•        Office   =   Optional Choice of 6 offices 
•        Service category – Always ONLY Application OR User Support 
•        Sub service category:  Optional Choice of 11 
•        Priority  = ‘P1’, ‘P2’, ‘P3’, P4 

This is the trigger previously set up but it does not do the job: 
 
My questions are?
1. Will the splitSubject[]; method populate the case field?? 
2. Does the following trigger ensure that the subject line values have to be in a certain order to autopopulate correctly? 
3. Any comments how to improve the code?

Thanks
         
 
AutoCloseCasesFromEmail on Case (before insert) { 
 
// <tobeclosed>,ireland,maynooth,salesforce,P3 
              
             for(Case caseToBeClosed: Trigger.new){ 
                 system.debug('caseToBeClosed.ContactEmail'+caseToBeClosed.SuppliedEmail); 
                 system.debug('caseToBeClosed.Subject'+caseToBeClosed.Subject); 
                  
                 if(caseToBeClosed.Subject != null){    //IS EMPTY 
                 if(caseToBeClosed.Subject.containsIgnoreCase('<to be closed>') 
**Should we add in  
 
if(caseToBeClosed.Service__ = ‘Application’ || ‘User Support’)) 
{**   

 
                         String caseSubject = caseToBeClosed.Subject; 
                        
          
                         List<String> splitSubject =  caseSubject.split(',');  
                         if(splitSubject.size()>1){ 
                             caseToBeClosed.Country__c = splitSubject[1]; 
                         } 
                         if(splitSubject.size()>2){ 
                             caseToBeClosed.Office__c = splitSubject[2]; 
                         }                 
                         caseToBeClosed.Category__c= 'Application Support';    
/**/Should this last not be  
//if(splitSubject.size()>3){caseToBeClosed.Service__c = splitSubject[3]; 
// and then change the below option of splitSubject.Size() to >4{ and >5 to reflect their place in the line and take out the last bit caseToBeClosed.Category__c= 'Application Support';  ** 

                          
                         if(splitSubject.size()>3){ 
                             caseToBeClosed.Sub_Category__c = splitSubject[3]; 
                         } 
                         if(splitSubject.size()>4){ 
                             caseToBeClosed.Priority = splitSubject[4]; 
                         }                 
                         caseToBeClosed.Status = 'Closed';                             
                     } 
                 }         
             }  
         } 
 
Part of the org app has yet to transition to Lightning, so this question relates to Classic and Reports. I need to get a Unique Count of  PICKLIST FIELD linked to a Parent Object 
I can't use UNIQUE COUNT ID as it's CLASSIC. I'm hoping someone can assist, Thanks!
 
Need to create a report in salesforce on Campaign Members with the report type Campaign Members with Contacts that shows a unique count on;
  • Parent Object(Campaign Members) 
  • with Field 'Status': Value = 'Volunteers' - who are both active and inactive 
  • Per quarter
Currently, the Classic report with a cross filter shows the same volunteer multiple times.

My approach was to create a Formula Field on the Campaign Member Object.

The Formula, Datatype (Number), Advanced Formula
No of Volunteers CM (Number) = ISPICKVAL(Status, "Volunteer")

I'm getting the following error message
Error: Formula result is data type (Boolean), incompatible with expected data type (Number)
 
I'd welcome your input. Thanks
Part of the org app has yet to transition to Lightning, so this question relates to Classic and Reports. I need to get a Unique Count of  PICKLIST FIELD linked to a Parent Object 
I can't use UNIQUE COUNT ID as it's CLASSIC. I'm hoping someone can assist, Thanks!
 
Need to create a report in salesforce on Campaign Members with the report type Campaign Members with Contacts that shows a unique count on;
  • Parent Object(Campaign Members) 
  • with Field 'Status': Value = 'Volunteers' - who are both active and inactive 
  • Per quarter
Currently, the Classic report with a cross filter shows the same volunteer multiple times.

My approach was to create a Formula Field on the Campaign Member Object.

The Formula, Datatype (Number), Advanced Formula
No of Volunteers CM (Number) = ISPICKVAL(Status, "Volunteer")

I'm getting the following error message
Error: Formula result is data type (Boolean), incompatible with expected data type (Number)
 
I'd welcome your input. Thanks