Start an Interview with Pre-Populated Data

URL parameters can be used to set the value of global and entity-level data attributes when an interview is started. (Specifying the attributes to seed from URL parameters is done in the Edit Attribute dialog in Policy Modeling. For more information, see Allow Interview Data to Be Seeded From a URL.)

Note that this is not a secure mechanism for seeding sensitive data into an interview, and should only be used to influence interview behavior. URL parameters can appear in logs. It is therefore recommended for security purposes that interviews are started using a POST request to /web-determinations/startsession rather than a GET request if any sensitive data needs to be passed as parameters for the policy model or its data connection.

The parameter formats that are supported on the startsession URL to set attribute values are given below.

  • When setting a single attribute only, you can use:
    • seedData=<encoded assignment expression>, or
    • seedData=<encoded JSON snippet>
  • When setting one or more attributes, you must use:
    • seedData=<encoded JSON snippet>

For further information on URL encoding, see HTML URL Encoding Reference. You can use a URL encoder to generate the encoded text.

Note that:

  • JSON requires that:
    • object literals are surrounded by curly braces {}

    • keys and values are separated by a colon

    • each key/value pair is separated by a comma

    • all string values (including date, time and datetime values) must be in quotation marks.

    For further information on JSON strings, see JSON Object Literals.

  • Datetime values must be in the format shown in Attribute Values. Datetime values that are provided must either omit the timezone or use the timezone chosen for the project. Z is also permitted as a timezone marker for Coordinated Universal Time (UTC).

The seedData parameter can be used to provide values for one or more global attributes when an interview is launched. The attribute name is used to identify which global attributes to set. For more information, see Examples: Start an Interview with Global Data.

The seedData parameter can also be used to provide values for attributes in one or more entity instances when an interview is launched. This can be used to pre-populate some or all the data for the entities that will be collected, or used for reference data that can change between interview sessions (for example, exchange rates). You can seed different attributes for different entity instances. You can also set values on inferred entities if the identifying attribute is provided. Be aware that URLs are limited by the maximum URL length. For more information, see Examples: Start an Interview with Entity Level Data.