Finish the Interview

Your host application must provide an endpoint to process the answer data returned when a user finishes an interview.

Finish Interview Overview

To process the answer data sent on completing an interview, the Process Interview endpoint in your host application typically performs some or all of the following steps:

  • Receive answers posted from the interview (i.e. the endpoint must accept the POST verb).
  • Assemble a completed document using Cloud Services.
  • Save the assembled document.
  • Save the interview answers.

To process answer data sent when finishing an interview

1. Retrieve the answers sent from the interview

The answer data from the interview is sent to the Process Interview endpoint. Use the following code (C#) to retrieve the answer data from the request form:

string[] hdInfoValues = Request.Form.GetValues("HDInfo");
string ansStr = "";
if (hdInfoValues != null && hdInfoValues.Length > 0)
{
     ansStr = string.Join(string.Empty, hdInfoValues);
}

2. Assemble the Document

You generate the completed document by making an Assemble Document request to Cloud Services, using the same Template Package used to generate the interview and the answer data sent from the interview. The Assemble Document request returns a completed document in the specified format.

3. Save the Assembled Document

Host applications typically perform one or more of the following actions to save assembled documents:

  • Save assembled documents to disk.
  • Save assembled documents to a database.
  • Pass assembled documents to another process.

4. Save the Answer data

Host applications typically perform one or more of the following actions to save answer data:

  • Generate and save a HotDocs Answer XML file to disk.
  • Generate and save HotDocs Answer XML to a database.
  • Generate and pass HotDocs Answer XML to another process.

Generate HotDocs Answer XML

You generate HotDocs Answer XML by making an Assemble Document request to Cloud Services, using the same Template Package used to generate the interview and the answer string returned from the interview. The request must use the Answers Assembly Format. The Assemble Document request returns a HotDocs Answer XML (.anx) file.

5. Configure Get Interview to use the Process Interview Endpoint

Set the formActionUrl parameter for the Get Interview request to the URL for the Process Interview endpoint.