Account


Earned badges

Achievement: Latest Unlocked

Topic Started

Topics

For this form, we are seeing an unusual behavior.  Prior to signing, the values in a label field are appearing in a different format than after signature.  The line breaks are not being recognized

Is it possible to download the signed document and evidence summary PDF as a single PDF with the apex SDK?  Right now we get each file separately.  

We noticed this morning that when a packageID contains _x something in the Apex SDK is removing it from the string.  We are passing in:

Could I get someone to look at this package and help me understand why the signer got "Unauthorized Access: Failed to validate token"?

I am trying to submit a merged document and consistently getting this error.  The document is passing Adobe Acrobat Preflight.  Is there any additional insight into probable causes of this: error.v

Replies Created

Reply to:

0 votes

I am asking because I am having trouble getting passed an error that says "error.validation.sendPackage.noApprovals".  This occurs after I updated your code to create a draft package and then update to send - like this:

 

OneSpanSDK sdk = new OneSpanSDK();
            //Create package
            OneSpanAPIObjects.Package_x pkg = new OneSpanAPIObjects.Package_x();
            pkg.name = 'Test Postiion Extraction - ' + Datetime.now().format();
            pkg.status = OneSpanAPIObjects.PackageStatus.DRAFT;
      //Send package One Step
            String packageId = sdk.createPackage(pkg);

            System.debug('PackageId: ' + packageId);

            //Create Roles
            String roleId1 = 'Signer1';
            OneSpanAPIObjects.Role role1 = new OneSpanAPIObjects.Role();
            role1.signers = sdk.createRolesSigner('xxxxxx', 'xxxx', '[email protected]', 'CEO', 'ABC Bank');
            role1.id = roleId1;
            role1.name = roleId1;
            pkg.roles = new List<OneSpanAPIObjects.Role>{role1};    //add role
                
            //Prepare Documents Blob   
            String document1Name = 'Document1';   
            StaticResource sr = [SELECT Id, Body FROM StaticResource WHERE Name = 'Agreement' LIMIT 1];   
            Map<String,Blob> documentBlobMap = new Map<String,Blob>();   
            documentBlobMap.put(document1Name, sr.Body);   
        
            //Create Document Metadata   
            OneSpanAPIObjects.Document document1 = new OneSpanAPIObjects.Document();   
            document1.name = document1Name;   
            document1.id = document1Name;   
            document1.extract = true;     //document level extraction:true   
            OneSpanAPIObjects.Approval approval1 = new OneSpanAPIObjects.Approval();   
            approval1.role = roleId1;   
            approval1.name = 'Approval1';   
            //signature
            OneSpanAPIObjects.Field field1 = new OneSpanAPIObjects.Field();   
            field1.extract = true;   
            field1.name = 'clientPrinted1';   //matches the form field name in PDF
            field1.type = 'SIGNATURE';   
            field1.subtype = 'FULLNAME';   
            
            //label field
            OneSpanAPIObjects.Field field2 = new OneSpanAPIObjects.Field();   
            field2.extract = true;   
            field2.name = 'SignerName1';   //matches the form field name in PDF
            field2.type = 'INPUT';   
            field2.subtype = 'LABEL';   
            field2.value= 'some value here';         //display value

            
            //Link field to approval, approval to document, document to package
            approval1.fields = new List<OneSpanAPIObjects.Field>{field1,field2};   
            document1.approvals = new List<OneSpanAPIObjects.Approval>{approval1};   
            pkg.documents = new List<OneSpanAPIObjects.Document>{document1};  
  
            
           //Send package
           pkg.status = OneSpanAPIObjects.PackageStatus.SENT;
         
           sdk.updatePackage(pkg, packageId); 


Reply to:

0 votes

That was exactly the problem.  Thank you! I outputted the URL properly and it works great.

We like the option of using this method to input the URL into an email that Salesforce will send out because we can have it send as the Salesforce user rather than a generic system email from our company or from OneSpan.  However, we realize we are committed to managing the signing ceremony via Salesforce.  Which means we'll need to implement the event listener and then build logic to send our emails to the other signers in order and also the final email (plus reminders, a dashboard to track progress, custom objects for our transactions etc).  Is this a pattern you are seeing other Salesforce clients use?  Are there other implementation patterns we should consider?


Subscriptions

Topics Replies Freshness Views Users

Good afternoon, we are beginning to become familiar with and use the designer.  In our pattern, we are adding the signer recipients prior to rendering the designer.  Is it possible to remove the OS

1 10 months 3 weeks ago 22
Profile picture for user Duo_Liang

For this form, we are seeing an unusual behavior.  Prior to signing, the values in a label field are appearing in a different format than after signature.  The line breaks are not being recognized

3 1 year ago 53
Profile picture for user Duo_Liang

Is it possible to download the signed document and evidence summary PDF as a single PDF with the apex SDK?  Right now we get each file separately.  

1 1 year ago 58
Profile picture for user Duo_Liang

We noticed this morning that when a packageID contains _x something in the Apex SDK is removing it from the string.  We are passing in:

7 5 months 2 weeks ago 91
Profile picture for user Duo_Liang

Could I get someone to look at this package and help me understand why the signer got "Unauthorized Access: Failed to validate token"?

5 1 year 8 months ago 248
Profile picture for user Duo_Liang

Code Share

This user has not submitted any code shares.

Subscriptions Release Notes

This user is not subscribed to any release notes.