Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

  1. For Flows, an Invocable class needs to be created which needs to be invoked from the Flow.

  2. Under the Invocable class, one need to create a wrapper by setting the following attributes as per requirement:-

    public class P2ContainerRequestWrapper {
     
        
        @AuraEnabled public String sParentRecordId {get;set;}
        @AuraEnabled public String sTemplateName {get;set;}
        @AuraEnabled public String smsBody {get;set;} 
        @AuraEnabled public String emailSubject {get;set;} 
        @AuraEnabled public String emailBody {get;set;} 
        @AuraEnabled public String defaultMessage {get;set;}
        @AuraEnabled public datetime lastOnline {get;set;}
        //Add another Object to Allow Multiple Recipient
        @AuraEnabled public List<Recipient> recipients {get;set;}
        public class Recipient{
            @AuraEnabled public String firstName {get;set;} 
            @AuraEnabled public String lastName {get;set;} 
            @AuraEnabled public String email {get;set;} 
            @AuraEnabled public String phone {get;set;} 
            @AuraEnabled public List<RecipientItem> recipient_items {get; set;}
            @AuraEnabled public Boolean isTFAEnabled {get;set;}
            @AuraEnabled public String tfaMethod {get;set;}
        }
       
        @AuraEnabled public String firstName {get;set;} 
        @AuraEnabled public String lastName {get;set;} 
        @AuraEnabled public String email {get;set;} 
        @AuraEnabled public String phone {get;set;} 
        @AuraEnabled public String modeOfCommunication {get;set;}  //Email, SMS or Both
        @AuraEnabled public DateTime expirationDate {get;set;} 
        @AuraEnabled public Boolean tfaRequire {get;set;} 
        @AuraEnabled public String tfaMethod {get;set;} 
        @AuraEnabled public Boolean enableTeamFeature {get;set;}
        @AuraEnabled public Boolean bAutomation {get;set;}
        public String requesterFirstName {get;set;} 
        Public String requesterLastName {get;set;} 
        
        //Feature Status
        public String p2ContainerItemId;
        public String featureId;
        public String containerStatus {get;set;}
        //is BotDoc SMS and Email Disabled
        public Boolean p2OnlyCreateLink {get;set;}
        public Boolean sendOnlySMSviaBotDoc {get;set;}
    }
  3. Under the Wrapper, one need not to set if there is only 1 API Key in use, Last Online need not to be set.

  4. One needs to serialize and then call the GLobal Method GlobalServices.createP2Container(String sWrapper)

  • No labels