Customize the schema

Every attribute in the SCV schema is customizable. This means while you can add and modify attributes, certain system attributes are always present to ensure the integrity and functionality of the schema.

For example, attributes such as

  • firstName;

  • lastName;

  • countryCode;

  • gpa;

  • interests;

  • profileImageURL; and

  • hasRequestedFinancialAid

(as shown in the sample schema) can be modified or extended with additional attributes.

Supported attribute types

The schema supports the following data types to help store information about customers:

String

Textual data.

Number

Numeric data, including floating-point numbers.

Integer

Whole numbers.

Boolean

True/false values.

Array

A list of values, where each value can be of the types listed.

System default property x-scv-source

The system default properties are predefined attributes integral to the SCV schema. Other custom attributes in the schema can reference them to share the same value. The following default properties are available:

x-scv-source

The source identifier for an attribute.

$customerid

The unique identifier for a customer.

$createDatetime

The timestamp when the customer record was created.

$updatedDatetime

The timestamp when the customer record was last updated.

$verifiedEmail

The verified email of the customer.

$username

A username of the customer.

$tertiaryid

Any tertiary ID for the customer, such as a student ID or staff ID.

Example 1. x-scv-source

By assigning the x-scv-source value to customer.$customerid, a user-defined customerid is mapped to the value from the system property $customerid

"customerid": {
  "title": "Customer ID",
  "description": "The SCV customer id for the data, this value can not be set by the user.",
  "x-scv-source": "customer.$customerid"
}

Searchable property

Assign the x-scv-searchable property in the attribute definition to make an attribute searchable.

Example 2. x-scv-searchable
"firstName": {
  "title": "First name",
  "description": "The first name of the user.",
  "type": "string",
  "example": "Bilbo",
  "x-scv-searchable": "firstName"
}

Customers can be searched by attributes $customerid, $verifiedEmail, $username, and $tertiaryid by default. In the case of searching by a customer’s name, this is the only time we need to be explicitly told in the schema which attribute represents a first name and last name to make those attributes searchable.

The attribute that represents a customer’s first name should be marked with x-scv-searchable: firstName`, and the attribute that represents a customer’s last name should be marked with x-scv-searchable: lastName.

Deploying schema changes

To deploy schema changes, use the DXP CLI. Read the DXP CLI documentation for detailed instructions on the deploy command.