2017-03-02 2 views
1

3 개의 다른 문서에 대해 동일한 서버 템플릿을 사용하려고합니다. 3 가지 복합 템플릿을 사용하여이 작업을 수행 할 수 있다고 가정했습니다. 대신, 내가보고있는 것은 첫 번째 문서가 봉투에서 3 번 반복된다는 것입니다. 다음 요청이다Docusign 복합 템플릿이 올바른 문서를 보내지 않음

{ 
    "customFields": { 
    "textCustomFields": [ 
     { 
     "name": "Cartus file id", 
     "value": "1823456" 
     } 
    ] 
    }, 
    "eventNotification": { 
    "url": "http://requestb.in/p2qfvfp2", 
    "loggingEnabled": "true", 
    "requireAcknowledgment": "true", 
    "envelopeEvents": [ 
     { 
     "envelopeEventStatusCode": "Delivered" 
     }, 
     { 
     "envelopeEventStatusCode": "Completed" 
     }, 
     { 
     "envelopeEventStatusCode": "Declined" 
     }, 
     { 
     "envelopeEventStatusCode": "Voided" 
     }, 
     { 
     "envelopeEventStatusCode": "Sent" 
     } 
    ], 
    "useSoapInterface": "false", 
    "includeCertificateWithSoap": "false", 
    "signMessageWithX509Cert": "false", 
    "includeDocuments": "false", 
    "includeEnvelopeVoidReason": "false", 
    "includeTimeZone": "true", 
    "includeSenderAccountAsCustomField": "true", 
    "includeDocumentFields": "true", 
    "includeCertificateOfCompletion": "false" 
    }, 
    "compositeTemplates": [ 
    { 
     "compositeTemplateId": "1", 
     "serverTemplates": [ 
     { 
      "sequence": "1", 
      "templateId": "4e2f0e2d-9888-xxxx-8da3-bbf70163233f" 
     } 
     ], 
     "inlineTemplates": [ 
     { 
      "sequence": "2", 
      "recipients": { 
      "signers": [ 
       { 
       "name": "Kathy Gilbert", 
       "email": "[email protected]", 
       "recipientId": "1", 
       "customFields": [ 
        "this is the buyer" 
       ], 
       "routingOrder": "1", 
       "roleName": "##Buyer1" 
       }, 
       { 
       "name": "Kathy Langdon", 
       "email": "[email protected]", 
       "recipientId": "2", 
       "customFields": [ 
        "this is the seller" 
       ], 
       "routingOrder": "2", 
       "roleName": "##Seller1" 
       } 
      ], 
      "certifiedDeliveries": [ 
       { 
       "name": "Kathy Lori", 
       "email": "[email protected]", 
       "recipientId": "3", 
       "accessCode": "12345", 
       "routingOrder": "3", 
       "roleName": "##OtherPerson" 
       } 
      ] 
      } 
     } 
     ], 
     "document": { 
     "documentId": "1", 
     "name": "Here is document one of the test.docx", 
     "fileExtension": "docx", 
     "documentFields": [ 
      { 
      "name": "Doc1Info", 
      "value": "here is doc1 info" 
      } 
     ] 
     } 
    }, 
    { 
     "compositeTemplateId": "2", 
     "serverTemplates": [ 
     { 
      "sequence": "1", 
      "templateId": "4e2f0e2d-9888-xxxx-8da3-bbf70163233f" 
     } 
     ], 
     "inlineTemplates": [ 
     { 
      "sequence": "3", 
      "recipients": { 
      "signers": [ 
       { 
       "name": "Kathy Gilbert", 
       "email": "[email protected]", 
       "recipientId": "1", 
       "customFields": [ 
        "this is the buyer" 
       ], 
       "routingOrder": "1", 
       "roleName": "##Buyer1" 
       } 
      ], 
      "certifiedDeliveries": [ 
       { 
       "name": "Kathy Lori", 
       "email": "[email protected]", 
       "recipientId": "3", 
       "accessCode": "12345", 
       "routingOrder": "3", 
       "roleName": "##OtherPerson" 
       } 
      ] 
      } 
     } 
     ], 
     "document": { 
     "documentId": "2", 
     "name": "Here is document two of the test", 
     "fileExtension": "docx", 
     "documentFields": [ 
      { 
      "name": "Doc2Info", 
      "value": "here is doc2 info" 
      } 
     ] 
     } 
    }, 
    { 
     "compositeTemplateId": "3", 
     "serverTemplates": [ 
     { 
      "sequence": "1", 
      "templateId": "4e2f0e2d-9888-xxxx-8da3-bbf70163233f" 
     } 
     ], 
     "inlineTemplates": [ 
     { 
      "sequence": "2", 
      "recipients": { 
      "signers": [ 
       { 
       "name": "Kathy Gilbert", 
       "email": "[email protected]", 
       "recipientId": "1", 
       "customFields": [ 
        "this is the buyer" 
       ], 
       "routingOrder": "1", 
       "roleName": "##Buyer1" 
       }, 
       { 
       "name": "Kathy Langdon", 
       "email": "[email protected]", 
       "recipientId": "2", 
       "customFields": [ 
        "this is the seller" 
       ], 
       "routingOrder": "2", 
       "roleName": "##Seller1" 
       } 
      ], 
      "certifiedDeliveries": [ 
       { 
       "name": "Kathy Lori", 
       "email": "[email protected]", 
       "recipientId": "3", 
       "accessCode": "12345", 
       "routingOrder": "3", 
       "roleName": "##OtherPerson" 
       } 
      ] 
      } 
     } 
     ], 
     "document": { 
     "documentId": "3", 
     "name": "Here is document three of the test", 
     "fileExtension": "docx", 
     "documentFields": [ 
      { 
      "name": "Doc3Info", 
      "value": "here is doc3 info" 
      } 
     ] 
     } 
    } 
    ], 
    "status": "sent", 
    "emailSubject": "Please sign the following document at 9:26 AM" 
} 

말했듯이 document1.docx (이들 문헌은 단지 한 페이지 각각) 봉투에 3 회 반복 하였다.

답변

1

복합기 템플릿에 문서 바이트를 지정하지 않았습니다.

문서 바이트가 복합체 템플리트에 포함되어 있지 않으므로 서버 템플리트 문서를 사용하여 봉투를 작성합니다. 그것이 서버 템플릿에서 동일한 문서가 세 번 반복되는 것을 보는 이유입니다.

각 복합 템플릿의 속성을 다음과 같이 변경하십시오 (). documentBase64 속성을 추가했습니다.

"document": { 
    "documentId": "1", 
    "name": "Here is document one of the test.docx", 
    "fileExtension": "docx", 
    "documentFields": [ 
     { 
     "name": "Doc1Info", 
     "value": "here is doc1 info" 
     } 
    ], 
    "documentBase64" : "[Include the base64 of the .docx file here]" 
    } 
+1

나는 무슨 일이 있었는지 말해 줄 것이다. 테스트 할 때 json 객체를 인쇄 할 때 전체 배열을 인쇄하지 않기 때문에 Base64 바이트 배열에 [JsonIgnore] 특성을 갖도록 문서 객체를 수정했습니다. 나는 그 속성을 주석 처리하지 않았고 3 개의 문서는 예상대로 통과했다. 너는 나에게 큰 도움이되었다. –

관련 문제