• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Send an agreement via a workflow with the REST API

Community Beginner ,
Mar 20, 2018 Mar 20, 2018

Copy link to clipboard

Copied

I am trying to configure a request to the REST API to send a workflow. The workflow requires a file, which can be one of several depending on the request.  When I pass the workflow library document ID of the file I want to include, in the "fileInfos" object, the API returns an error: INVALID_TRANSIENTDOCUMENT_ID

The API documentation says: Note: Only one of the four parameters in every FileInfo object must be specified even though the fileInfos object documentation only has three parameters: "name", "transientDocumentId", and "workflowLibraryDocumentId" and none of them are specified as optional.

{

  "documentCreationInfo": {

    "name": "TEST AGREEMENT NAME",

    "fileInfos": [

      {

        "name": "document1",

        "workflowLibraryDocumentId": "...ENwh1iObQMUWQEfMo9KHyf7D..."

      }

    ], 

    "recipientsListInfo": [

      {

        "name": "Signer1",

        "recipients": [

          {

            "email": "test@example.com"

          }

        ]

      }

    ]

  }

}

Am I misunderstanding? Does someone have a working snipped of JSON to get me started here? Or is this an error in the API?

Views

756

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 21, 2018 Mar 21, 2018

Copy link to clipboard

Copied

LATEST

Here are some notes that I took on what I've discovered to get workflow sending to function. These aren't described anywhere else, so hopefully these help someone besides myself.

  • MISSING_REQUIRED_TO_FIELD: the "name" in each "recipientsListInfos" object can be found by making a proper API call to get the workflow by ID, and checking the "recipientsListInfo". Each object contains a "name". (you can also check CCs this way) An incorrect name will result in the error. Note that the names are case sensitive and numerical order might be confusing. If a recipient is marked as "editable": false, I don't think you can override it with an API call, you must make it editable in the workflow designer.
  • INVALID_TRANSIENTDOCUMENT_ID: The document(s) must already be added to the workflow in the workflow designer. The document "name" required in the "fileInfos" object can be found by making a proper API call to get the workflow by ID, and checking the fileInfos for the document you want to send with the workflow. Do not specify this as a transient ID, instead as a workflowLibraryDocumentId.
  • If you do not specify a "name" you will get a FILE_INFO_NAME_MISSING error.
  • ALL files marked as required in the workflow designer or otherwise MUST BE DEFINED in the fileInfos.
  • If you specify an incorrect "fileInfos" "name", it will succeed, but you will get an error message email.
  • MISC_ERROR: in my case this was caused by a field being marked as required in the workflow designer "Sender Input Fields" tab and I did not merge a value into it with the "mergeFieldInfo" parameter (even though the field had a default value specified).
  • Also note that in the workflow designer, one can only specify 10 input fields as required, why? What if everything is required?

It seems that there is a lot of work that needs to go into to the workflow designer as well as making the actual API call, but it's not really outlined anywhere...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines