• Rosan mahakalkar
  • NEWBIE
  • 0 Points
  • Member since 2022

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

Hello Team,
I have successfully implemented the Email-to-Case feature within our organization. This setup allows automatic generation of client case records when a support email is received at the designated support email address.
However, I am currently faced with a specific requirement. I would like to respond to client emails using my Gmail account instead of the Salesforce org. Additionally, I aim to capture the time details for each interaction. For instance, when a client raises a ticket at 12 PM and I respond to the client at 4 PM, I want to calculate the time difference, which in this case would be 4 hours (Estimated Response Time: 4 hours). This calculated time difference needs to be stored within the Salesforce org and associated with the email message related to the corresponding case record.
Could you please guide me on how to achieve this enhanced functionality within Salesforce?
Thank you.
Best regards,

HI 
I want to intregate salesforce with qualtrics, anyone please help me how can we intregate

Actully i follow this documentation, but i am confused
https://www.qualtrics.com/support/integrations/salesforce-integration/linking-qualtrics-and-salesforce/

Please provide me a steps how can we easily intregate with qualtrics.

Thanks & regards
Roshan

HI
I am facing this issue
After clicking this button , Showing me this error , Plese provide me a steps how can i resolved it. 

Thanks & regards 
Roshan Mahakalkar
User-added image
kkUser-added image

Hi Team,
How can I assign a page layout to a specific role, specifically the "#Common Client Service Rep" role, within a profile called "Client Services Rep"? Please provide me with the necessary steps to accomplish this.

Thanks & regards
Roshan Mahakalkar

i am getting instance url and id but not  access token and also not getting report data..please resonce me as soon as possible..Thanks in advance..here is my code
public with sharing class AuthenticationDetail{
    /*End point Url to web service callout*/
    private final static String ENP_POINT_URL = 'https://login.salesforce.com/services/oauth2/token';
    //For development and production https://login.salesforce.com/services/oauth2/token
    //And for sandbox https://test.salesforce.com/services/oauth2/token
    private final static String REQUEST_BODY = 'grant_type=password&client_id={0}&client_secret={1}&username={2}&password={3}';
    private final static String USERNAME = 'anshu@kcloudtech.com';
    private final static String PASSWORD = 'xxxxxxx';
    private final static String CONSUMER_KEY = 'xxxxxx';
    private final static String CONSUMER_SECRET = 'xxxxxxxx';
    
    /*To generate Access token Method*/
    public static OAuth getAccessToken(){
        try{
            HttpRequest req = new HttpRequest();
            req.setEndpoint(ENP_POINT_URL);
            req.setMethod('POST');          
            Blob headerValue = Blob.valueOf(USERNAME + ':' + PASSWORD);
            String authorizationHeader = 'BASIC ' +
            EncodingUtil.base64Encode(headerValue);
            req.setHeader('Authorization', authorizationHeader); 
            req.setBody(String.format(REQUEST_BODY ,new string[]{CONSUMER_KEY,CONSUMER_SECRET,
                                                                 USERNAME,PASSWORD}));
            req.setTimeout(60000);
            Http http = new Http();
            HttpResponse res = http.send(req);
            system.debug('response :'+ res.getBody());
            OAuth objAuthenticationInfo = (OAuth)JSON.deserialize(res.getbody(), OAuth.class);
            system.debug('token : '+objAuthenticationInfo.access_token);
            return objAuthenticationInfo;
        }catch(CallOutException ce){
            throw ce;
        }
    }
    public static HttpResponse getReportData(){
          
        HttpRequest request = new HttpRequest();
        request.setHeader('Content-Type','application/json');
        request.setHeader('accept','application/json');
        request.setMethod('GET');
              
        String sessionId = UserInfo.getSessionId();
        system.debug('Data : '+sessionId);
        request.setHeader('Authorization', 'Bearer ' + sessionId); 
        request.setEndpoint('https://kcloudtech-f-dev-ed.develop.my.salesforce.com'+'/services/data/v34.0/analytics/reports/00O28000003FAVx');
        
        Http h2T = new Http();
        HttpResponse response = h2T.send(request);  
        if(response.getStatusCode() == 200){
            Map<String, Object> responseMap = (Map<String, Object>) JSON.deserializeUntyped(response.getBody());
            //List<object> Report = (List<object>) responseMap.get(reports);
            system.debug('responseMap : '+responseMap);
        }
        return response;
    }
    
    /*To get Access token property*/
    public static OAuth authenticationDetail{
        get{
            if(authenticationDetail == null){
                authenticationDetail = getAccessToken();
            }
            return authenticationDetail;
        }set;
    }
        
    /*To get aouthentication detail Wrapper*/
    public class OAuth{
        public String id{get;set;}
        public String issued_at{get;set;}
        public String instance_url{get;set;}
        public String signature{get;set;}
        public String access_token{get;set;}   
        
        //public  Id listviewId {get; set;}

    }   
}
Senario : my trigger senarios is if whenever Lead status is signup then create a signup campagin member or if lead status is demo then create demo schdule campagin, according to lead status create a campaign member vise versa .this trigger shold be work both insert or update candition. 
this trigger is fired when lead status is change but when lead new record is insert then after campaign member is not create inserting time ...
& also inserting time automatically call update method... please telll me where i am wrong ... please help i am new in salesforce.



Trigger
 
trigger LeadStatusCreateCampaignMem on Lead (after insert, after update) {
    if(trigger.isafter && trigger.isinsert){
        system.debug('Insert trigger fired  :---> LeadStatusCreateCampaignMem');
        LeadStatusCreateCampaignMemHandler.assignLeadstatusCamInsert(trigger.new);
    }
    else if(trigger.isafter && trigger.isupdate){
        LeadStatusCreateCampaignMemHandler.assignLeadStatusCamUpdate(trigger.new, trigger.oldMap);
    }
}

Handler

public class LeadStatusCreateCampaignMemHandler {
    public static void assignLeadstatusCamInsert(List <lead> newLeadIn){
        
        Campaign myCampaignSignUp = [SELECT Id,Name FROM Campaign WHERE Name = 'Sign Up' LIMIT 1];
        Campaign myCampaignDemoSch = [SELECT Id,Name FROM Campaign WHERE Name = 'Demo Scheduled' LIMIT 1];
        
        List<CampaignMember> campaignMembersToInsert = new List<CampaignMember>();
        
        for(lead leadin : newLeadIn){
            if(leadin.Status == 'Sign up'){
                system.debug('sign Up condition true  Line :-->  No 11');
                CampaignMember newCampaignMember = new CampaignMember();
                newCampaignMember.LeadId = leadin.Id;
                newCampaignMember.CampaignId = myCampaignSignUp.Id ;
                campaignMembersToInsert.add(newCampaignMember);
            }
            else if(leadin.Status == 'Demo'){
                system.debug('Demo condition true Line :--> No 18');
                CampaignMember newCampaignMember = new CampaignMember();
                newCampaignMember.LeadId = leadin.Id;
                newCampaignMember.CampaignId = myCampaignDemoSch.Id ;
                campaignMembersToInsert.add(newCampaignMember);
            }
        }
        
        if(campaignMembersToInsert.size() > 0){
            Insert campaignMembersToInsert;
            system.debug('campaignMembersToInsert ' + campaignMembersToInsert);
        }
        
    }
    public static void assignLeadStatusCamUpdate(List <lead> newLeadIn , Map<Id,lead> oldLeadIdIn){
        system.debug('update method fired newLeadIn ' + newLeadIn);
        
       
        Campaign myCampaignSignUp = [SELECT Id,Name FROM Campaign WHERE Name = 'Sign Up' LIMIT 1];
        Campaign myCampaignDemoSch = [SELECT Id,Name FROM Campaign WHERE Name = 'Demo Scheduled' LIMIT 1];
        Map<Id,lead> LeadIdMap = new Map<Id,lead>();
        
        
        for(lead newLead : newLeadIn ){
            if(newLead.status != null){
              LeadIdMap.put(newLead.id, newLead);
            }
        }
        List<CampaignMember> campaignMembersToDelete = new List<CampaignMember>();
        List<CampaignMember> campaignMembersToInsert = new List<CampaignMember>();
        Map<Id,Id>leadVsCampaignMap = new Map<Id, Id>(); 
        
        for(CampaignMember campaignMember : [SELECT Id, LeadId, CampaignId FROM CampaignMember WHERE LeadId = :LeadIdMap.keySet()]){
            leadVsCampaignMap.put(campaignMember.LeadId, campaignMember.CampaignId);
            campaignMembersToDelete.add(campaignMember);
        }
        
        for(lead leadin : newLeadIn){
            if(leadin.Status == 'Sign up' && oldLeadIdIn.get(leadin.Id).Status != leadin.Status){
              system.debug('if leadin inserting ' + leadin);
                
                CampaignMember newCampaignMember = new CampaignMember();
                newCampaignMember.LeadId = leadin.Id;
                newCampaignMember.CampaignId = myCampaignSignUp.Id ;
                campaignMembersToInsert.add(newCampaignMember);
                
            }
            else if (leadin.Status == 'Demo' && oldLeadIdIn.get(leadin.Id).Status != leadin.Status){
              system.debug('else leadin inserting ' + leadin);
                
                CampaignMember newCampaignMember = new CampaignMember();
                newCampaignMember.LeadId = leadin.Id;
                newCampaignMember.CampaignId = myCampaignDemoSch.Id ;
                campaignMembersToInsert.add(newCampaignMember);
            }
            
            if(campaignMembersToDelete.size() > 0){
                delete campaignMembersToDelete;
            }
            if(campaignMembersToInsert.size() > 0){
                insert campaignMembersToInsert;
            }
        } 
    }
}
Hi,
i have a senario like if supposed i send email to the client & client resposnse to that email , that email how can i received in my salesforce org...
Please help me as soon as possible.

 
Hi All, 

Please let me know how to send an email to multiple selected records from List view on click of a Custom List Button.
 
In Default List view Page. I simply want to send email to multiple records selected by clicking the checkbox in Action column.

Please provide me a solution i am new in salesforde.
  
Please let me know how can i do that. 

Thanks

HI
I am facing this issue
After clicking this button , Showing me this error , Plese provide me a steps how can i resolved it. 

Thanks & regards 
Roshan Mahakalkar
User-added image
kkUser-added image

Hi Team,
How can I assign a page layout to a specific role, specifically the "#Common Client Service Rep" role, within a profile called "Client Services Rep"? Please provide me with the necessary steps to accomplish this.

Thanks & regards
Roshan Mahakalkar