FreshdeskField: {
    choices?: string[] | Record<string, number | string[] | Record<string, string[]>>;
    created_at: string;
    customers_can_edit: boolean;
    default: boolean;
    description: null | string;
    displayed_to_customers: boolean;
    id: number;
    label: string;
    label_for_customers: string;
    level?: number;
    name: string;
    nested_ticket_fields?: FreshdeskField[];
    options?: FreshdeskFieldOption[];
    portal_cc?: boolean;
    portal_cc_to?: string;
    position: number;
    required_for_agents: boolean;
    required_for_closure: boolean;
    required_for_customers: boolean;
    type:
        | "custom_number"
        | "custom_decimal"
        | "custom_date"
        | "custom_text"
        | "custom_paragraph"
        | "custom_checkbox"
        | "custom_dropdown"
        | "default_company"
        | "default_source"
        | "default_status"
        | "default_priority"
        | "default_agent"
        | "default_group"
        | "default_ticket_type"
        | "default_requester"
        | "default_subject"
        | "default_description"
        | "nested_field";
    updated_at: string;
}

Type declaration

  • Optionalchoices?: string[] | Record<string, number | string[] | Record<string, string[]>>

    String[]: label and value are the same

    [
    "Customer",
    "CivicPlus",
    "OneBlink",
    "AWS",
    "Other"
    ]

    Record<string, number>: label is key (string), value is the number

    {
    "Email": 1,
    "Portal": 2,
    "Phone": 3,
    "Forum": 4
    }

    Record<string, string[]>: label is the last string in the array, value is the key (parsed as an integer)

    {
    "2": ["Open", "Being Processed"],
    "3": ["Pending", "Awaiting your Reply"],
    "4": ["Resolved", "This ticket has been Resolved"],
    "5": ["Closed", "This ticket has been Closed"]
    }

    Record<string, Record<string, string[]>>: Options are nested, value and label are the same for each option

    {
    "Australia": {
    "NSW": ["Gosford", "Springfield"],
    "QLD": ["Brisbane", "Gold Coast"]
    },
    "US": {
    "Texas": ["Dalis", "Cinco Ranch"],
    "Virginia": ["Arlington", "Short Pump"]
    }
    }
  • created_at: string

    ISO timestamp string

  • customers_can_edit: boolean

    This will determine the type of mapping in the submission event config if true, show form element dropdown in submission event config if false, show free text entry in submission event config

  • default: boolean

    This is just true if its a default field (i.e. cannot be deleted), not really useful

  • description: null | string

    Description in fresh desk, we should prob display this in submission event config screen

  • displayed_to_customers: boolean

    I think we can ignore this

  • id: number

    Not sure if this is useful for us

  • label: string

    Label in fresh desk, we should prob display this in submission event config screen

  • label_for_customers: string

    I think we can ignore this

  • Optionallevel?: number
  • name: string

    I think this is what we will use to reference fields values when submitting tickets

  • Optionalnested_ticket_fields?: FreshdeskField[]

    If the type is "nested_field" this will be an array containing the two sub categories

  • Optionaloptions?: FreshdeskFieldOption[]
  • Optionalportal_cc?: boolean

    I think we can ignore this

  • Optionalportal_cc_to?: string

    I think we can ignore this

  • position: number

    Order of fields on form to submit issue, we should respect this

  • required_for_agents: boolean

    This will determine if the mapping is required or not along with "required_for_customers"

  • required_for_closure: boolean

    We can ignore this as its used by agents after tickets are created

  • required_for_customers: boolean

    This will determine if the mapping is required or not along with "required_for_agents"

  • type:
        | "custom_number"
        | "custom_decimal"
        | "custom_date"
        | "custom_text"
        | "custom_paragraph"
        | "custom_checkbox"
        | "custom_dropdown"
        | "default_company"
        | "default_source"
        | "default_status"
        | "default_priority"
        | "default_agent"
        | "default_group"
        | "default_ticket_type"
        | "default_requester"
        | "default_subject"
        | "default_description"
        | "nested_field"

    There are only a specific number of types Freshdesk support

  • updated_at: string

    ISO timestamp string