Creating a script

To create a new script:

  1. Click + Add in the Scripts section of a custom or extension object.
  2. Specify this information:
    Name

    This name is used to identify the script and is displayed as a tile in the scripts section on the Object page. The script name is mandatory, must be unique. and cannot exceed 50 characters.

    Type
    The type of script defines what type of data is extracted. Type is mandatory, and you can select one of these values:
    • attributes
    • events
    • combined
    SQL query
    The SQL query must be provided in the script editor. The query is mandatory, and the mandatory columns must be included for each type of script.
  3. Click Save as draft or Save as final to save the script. The newly added script is displayed as the first item on the list in the Scripts section of the Object page.
    Save as draft
    Draft scripts are not used to extract and load the data to populate insights. You can save any script as a draft, even if it is incorrect.
    Save as final
    Final scripts are used to extract and load the data to populate insights. A script can be saved as final only if it is correct. The application validates the script by test-running and allow only to save scripts that pass the validation.
    To edit a script, you can open the same dialog box by clicking More Actions in the top right corner of the script and then select Edit from the drop-down menu.
Note: Name and column names (except for the mandatory ones) must be unique between the parent object and all its related extension objects.