2017-02-10 11 views
0

ここで配信される唯一のドキュメントが最初のものである理由を理解できません。 doc1の役割は、バイヤー、売り手、doc2には売り手と弁護士、doc3には買い手と売り手があります。私は故意に弁護士のためのテンプレートの役割をやめました。エンベロープの定義は次のようになります。Docusignエンベロープの3つのドキュメント、1つだけが配信されます

{ 
    "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].com", 
     "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と見なされます。

1つのコンポジットテンプレートでは、1つのドキュメントのみをオーバーレイできます。 3つのドキュメントをすべてオーバーレイするには、リクエストに複数のCompositeTemplateを使用する必要があります。

ここには、サーバーテンプレート上に複数のドキュメントをオーバーレイする作業コードがあります。私は以下のあなたの例を簡略化しました(削除された接続&カスタムフィールド関連情報)。あなたがその情報を元に戻すなら、それはまだ機能するはずです。

ヒント:サーバーテンプレートでドキュメントを保持する場合は、最初のコンポジットテンプレート(ID:1)で指定されたドキュメント(documentId:1)を2番目のコンポジットテンプレート(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

私はこのための複合テンプレートを指定しませんでした。私はちょうど1つのサーバーテンプレートを使用しています。 docusignは、サーバーテンプレートを使用しているので、コンポジットテンプレートであると仮定していますか? –

+0

はい、あなたはserverTemplateを使用しているので、単一のCompositeTemplateと見なされます。したがって、compositeTemplateの同じルールが適用されます。 –

+0

私は参照してください。私はその情報がドキュメントのどこにでもあるとは思わない。洞察をいただきありがとうございます。私はそれを多く感謝します。 –

関連する問題