2017-02-10 1 views
0

왜 여기에 배달 된 문서가 첫 번째 문서인지 알 수 없습니다. 문서 1의 역할은 다음과 같습니다. 구매자, 판매자, doc2에는 판매자와 변호사가 있고, doc3에는 구매자와 판매자가 있습니다. 저는 의도적으로 변호사를위한 템플릿 역할을 중단했습니다. 다음은 봉투 정의의 모양입니다.Docusign 봉투에 3 개의 문서가 있습니다. 하나만 배달됩니다.

{ 
    "documents": [ 
    { 
     "documentId": "1", 
     "name": "Here is document one of the test.docx", 
     "fileExtension": "docx", 
     "documentFields": [ 
     { 
      "name": "Doc1Info", 
      "value": "here is doc1 info" 
     } 
     ], 
     "documentBase64": [bytearray] 
    }, 
    { 
     "documentId": "2", 
     "name": "Here is document two of the test", 
     "fileExtension": "docx", 
     "documentFields": [ 
     { 
      "name": "Doc2Info", 
      "value": "here is doc2 info" 
     } 
     ], 
     "documentBase64": [bytearray] 
    }, 
    { 
     "documentId": "3", 
     "name": "Here is document three of the test", 
     "fileExtension": "docx", 
     "documentFields": [ 
     { 
      "name": "Doc3Info", 
      "value": "here is doc3 info" 
     } 
     ], 
     "documentBase64": [bytearray] 
    } 
    ], 
    "customFields": { 
    "textCustomFields": [ 
     { 
     "name": "My file id", 
     "value": "1823456" 
     } 
    ] 
    }, 
    "eventNotification": { 
    "url": "http://requestb.in/opiu2bop", 
    "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" 
    }, 
    "templateId": "xxxx-ad34-4a2e-a375-069ce2df630c", 
    "templateRoles": [ 
    { 
     "email": "[email protected]", 
     "roleName": "##Buyer1", 
     "name": "Kathy Gilbert", 
     "routingOrder": "1" 
    }, 
    { 
     "email": "[email protected]", 
     "roleName": "##Seller1", 
     "name": "Kathy Langdon", 
     "routingOrder": "2" 
    } 
    ], 
    "status": "sent", 
    "emailSubject": "Please sign the following document at 9:49 AM" 

답변

2

이것은 역할과 관련이 없습니다. 요청시 "ServerTemplate"을 몇 가지 추가 문서와 함께 지정하기 때문에 이것은 compositeTemplate로 간주됩니다.

단일 합성 템플릿에서는 하나의 문서 만 오버레이 할 수 있습니다. 요청시 여러 개의 CompositeTemplate을 사용하여 세 개의 문서를 모두 오버레이해야합니다.

다음은 서버 템플릿에서 여러 문서를 오버레이하는 작업 코드입니다. 아래 예제를 단순화했습니다 (연결 제거는 & 사용자 정의 필드 관련 정보 제거). 해당 정보를 다시 추가해도 계속 작동해야합니다.

팁 : 서버 템플릿에서 문서를 유지하려면 첫 번째 복합 템플릿 (ID : 1)에 지정된 문서 (documentId : 1)를 두 번째 CompositeTemplate (ID : 2)으로 이동할 수 있습니다. 최종 봉투에는 서버의 문서 이외에 문서가 3 개 더 있습니다. 템플릿

{ 
    "emailSubject": "Testing multiple docs", 
    "status": "sent", 
    "compositeTemplates": [ 
     { 
      "compositeTemplateId": "1", 
      "serverTemplates": [ 
       { 
        "sequence": "1", 
        "templateId": "XXXXXX-2f8a-4cfc-907b-4c84cb523426" 
       } 
      ], 
      "inlineTemplates": [ 
       { 
        "sequence": "2", 

        "recipients": { 
         "signers": [ 
          { 
           "name": "Byer One", 
           "email": "[email protected]", 
           "roleName": "##Buyer1", 
           "recipientId": "1", 
           "routingOrder": "1", 

          } 
         ] 
        } 
       } 
      ], 
      "document": { 
       "documentId": "1", 
       "name": "Here is document one of the test", 
       "fileExtension": "docx", 
       "documentBase64": "[Bytes Removed]" 
      } 
     }, 
     { 
      "compositeTemplateId": "2", 
      "inlineTemplates": [ 
       { 
        "sequence" : "3", 
        "documents": [ 
         { 
          "documentId": "2", 
          "name": "Here is document two of the test", 
          "fileExtension": "docx", 
          "documentBase64": "[Bytes Removed]" 

         }, 
         { 
          "documentId": "3", 
          "name": "Here is document three of the test", 
          "fileExtension": "docx", 
          "documentBase64": "[Bytes Removed]" 
         } 
        ] 

       } 
      ] 
     } 
    ] 
} 
+0

이 템플릿에는 복합 템플릿을 지정하지 않았습니다. 나는 단지 하나의 서버 템플릿을 사용하고있다. docusign은 서버 템플릿을 사용하고 있기 때문에 합성 템플릿이기 때문에 가정합니까? –

+0

예 serverTemplate을 사용하고 있으므로 단일 CompositeTemplate으로 간주됩니다. 따라서 compositeTemplate과 동일한 규칙이 적용됩니다. –

+0

나는 본다. 그 정보가 어디서나 그들의 문서에 있다고 생각하지 않습니다. 통찰력을 가져 주셔서 감사합니다. 나는 그것을 많이 고맙다. –

관련 문제