s.shashank.v.v…

Adding multiple role for Text Extraction Tag but getting error

0 votes

Hey Team,

 

I am working with Text Tag Extraction and going through the blog i.e. https://community.onespan.com/documentation/onespan-sign/guides/feature-guides/developer/text-tag-extraction#tab-header-4

But while doing same with multiple signer role I am getting below error:

OneSpanRESTAPIHelper.OneSpanRestAPIHelperException: Error creating OneSpan package with documents: 400 - Bad Request - {"messageKey":"error.validation.createProcess.missingData","message":"Missing process definition.","code":400,"name":"Validation Error"}

I have also attached the example code which I have used and also with document I have created for your reference.

Can you please let me know it is possible or not.

 

Regards,

Shashank Verma


Reply to: Adding multiple role for Text Extraction Tag but getting error

0 votes

Hi Shashank Verma,

 

The direct cause of this 400 error is at the PDF- typically when you open a PDF in notepad, it has an extra line break at the end, however it's not case in this sample PDF. If you manually add it, it should work as expected.

On top of that, not sure why but in my APEX SDK modelling, there's no this field any more:

data_x.esl_doc_extract_type = '1';

Let me know if adding an extra line break solves the issue and I will keep looking into this.

 

Duo

 

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to:

0 votes

Hi Liang,

 

We have updated the pdf and now I am getting the signer2 signature block. But, now we are have created the field from the code itself and then try to show on the pdf.

But we are getting the error. For your reference I have attached the screenshot of the error and also attaching the example code as well as pdf file.

Can you please check the pdf file for which I have updated the First Name syntax. Can you please let us know which syntax we need to refer on the pdf to show field box?

 

Regards,

Shashank Verma


Reply to:

0 votes

Hi Duo,

 

I went through the blog but the pdf i.e. used there is not available. So, can you please let me know how to use the tag on the pdf if we use the below code:

OneSpanAPIObjects.Field fieldClient3 = new OneSpanAPIObjects.Field();

fieldClient3.extract = true;

fieldClient3.name = 'first_name'; //match pdf field property name

fieldClient3.type = 'INPUT';

fieldClient3.subtype = 'TEXTFIELD';

 

Or do I have to put the 'first_name' in the pdf where I want the field box?

 

Regards,

Shashank Verma


Reply to:

0 votes

Hi Duo,

 

Thank you for quick response!!!

What about text tags, we use earlier as {esl:signer1:textfield:size(200,50)}}. So, how we gonna set the name of this field so if we get the values back in salesforce then it is easy to extracting and also if we want to set some value in that text tag from apex, can it be possible?

 

Regards,

Shashank Verma


Reply to:

0 votes

So, how about the value setting from the apex. As you know on the text tag we just do the below code

OneSpanAPIObjects.Document document1 = new OneSpanAPIObjects.Document();
            document1.name = document1Name;
            document1.id = document1Name;
            document1.extract = true;

pkg.documents = new List<OneSpanAPIObjects.Document>{document1};

On the apex side we haven't created any field and but the textfield box will be shown on the pdf using text tag.

 

Regards,

Shashank Verma


Reply to:

0 votes

Text tags extraction is a mechanism with which you don't need to explicitly create the field with code. That's to say, you won't mix the usage of text tags and other signature placement features. If you need to specify a default value reading from Salesforce, you may want to use Position Extraction or Text Anchor features instead.

 

Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: Adding multiple role for Text Extraction Tag but getting error

0 votes

Thank You Duo for the response!

Also, in the text anchor can we use validation mechanism. So, if we want to make textfield mandatory that can be possible.

Please also confirm the parameters which we are passing while creating text anchor field.

Regards,

Shashank Verma


Reply to:

0 votes

Hey Duo,

 

Can you let me know if we can change signature type in Text Tags Extraction.

For now, we are using below tag to show the signature box but it is as Capture type

{{esl:signer1:capture:size(200,50)}}

Do we have other type of signature field in Text Tags ex: FULLNAME

 

Can you please confirm and let us know if we can implement that.

 

Regards,

Shashank Verma

 

 


Reply to:

0 votes

Hi Shashank,

 

With Text Tags, the signature type is determined by its syntax:

{{esl:signer1:signature:size(200,50)}}

{{esl:signer1:initials:size(200,50)}}

{{esl:signer1:capture:size(200,50)}}

{{esl:signer1:mobile_Capture:size(200,50)}}

 

Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off