Create a Data Definition

  • 릴리스 버전: Australia
  • 업데이트 날짜 2026년 03월 12일
  • 소요 시간: 5분
  • Use data definitions to collect and use pieces of information later in a playbook.

    시작하기 전에

    중요사항:
    As of the 26.1 release, the Collect user data activity is no longer available in the activity picker. The activity will continue to function wherever it is used, but for new activities use the Questionnaire activity instead. The Questionnaire activity does not require you to create a data definition. To learn more about the Questionnaire activity, see Questionnaire activity.

    Role required: admin, flow_designer

    You will be working in the ServiceNow AI Platform to complete this task.

    이 태스크 정보

    A data definition is the information that you want an agent or fulfiller to collect during a playbook run, and is the key input of the Collect user data activity. Playbook authors define the data they want an agent or fulfiller to collect in the sys_flow_data_definition table. When an agent or fulfiller collects the information, the information is stored in the sys_flow_data table for use later during the playbook run, instead of in the record table.

    Only use a data definition if:
    • The data is only needed downstream during a single playbook run. It's collected, used, and never needed again.
    • You don't need to run any reports on the collected data. If you need any metrics or reports on the collected data, create a table and use the User Form activity instead.

    For example, you may have multiple teams that perform activities. One team enters the inputs for a created data definition when they perform a Collect user data activity, and then a second team uses the collected inputs to complete the playbook, and the information is not needed afterwards.

    프로시저

    1. Navigate to All > Process Automation > Process Automation Administration > Data Definitions.
    2. Select New to create a new data definition.
    3. Give your new data definition a name.
      주:
      Data definitions have the same scope as other metadata tables, by default.
    4. Right-click in the record header to Save.
      If you select the Submit button, you are taken back to the Data Definitions list and will need to select your new data definition to re-open it.
    5. Add fields for information that you want an agent to collect.
      1. In the Flow Data Variables table, select New.
      2. Enter the required fields.
      옵션설명
      Type The type of input the agent is collecting for a field. For example, string, reference, integer, etc.
      Label The label of the field in the UI, during the playbook run. The label can consist of any text.
      Column name The name of the input being collected. Spaces cannot be used to delimit words.
      Max Length The maximum length a string value can be entered for a string type of field. The variable can store longer strings than it can display.
      Application The application scope for the data variable. It is always set to Global, and cannot be changed.
    Optional configurations
    1. 옵션: Under the Default Value tab, specify the value used when a playbook does not provide a value.
    2. Right-click in the record header to Save.

    결과

    The data definition can now be used when configuring activities in Playbooks in Workflow Studio.

    During a playbook run, you can use data definitions to potentially:
    • Collect a shipping address, then reference the address when generating a shipping label.
    • Ask the user "yes" or "no" questions, and determine subsequent activities based on the user's responses.

    다음에 수행할 작업

    Configure a Collect user data activity in Workflow Studio Playbooks to use your new data definition.