Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
  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:-

    Code Block
    public class P2ContainerRequestWrapper {
     
        @AuraEnabled public String sApiKeyName {get;set;}
        @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;}
        }
        public class RecipientItem{
            @AuraEnabled public String interface_class {get; set;}
            @AuraEnabled
    public String value {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;} 
        //P2 Feature
        @AuraEnabled public String featureType {get;set;} 
        @AuraEnabled public String featureTemplateName {get;set;}
        @AuraEnabled public Integer containerId {get;set;} 
        @AuraEnabled public String containerRecordId {get;set;} 
        @AuraEnabled public String sTitle {get;set;} 
        @AuraEnabled public String sDescription {get;set;} 
        @AuraEnabled public String sTags {get;set;}  //semi colon
    seperated     @AuraEnabled public String sPushFiles {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)