# Align Resources to Competencies
The functional alignment of resource data to competencies requires the following:
- A unique identifier for the resource
- An alignment between the resource and the competency
Let's look at these.
# 1. A unique identifier for the resource
This unique identifier may come from the originating system or may be generated by an intermediate system. For instance, in Moodle, a website has a URL identifier similar to:
https://www.headsetsdirect.com/headsets-101-ultimate-guide-to-understanding-headsets/
It is not strictly required that it be a URL, but it should be a URN or some other universal resource identifier.
# 2. An alignment between the resource and the competency
A resource or assessment alignment in CaSS looks like this:
{
"@type": "CreativeWork",
"educationalAlignment": [
{
"@context": "http://schema.org/",
"@type": "AlignmentObject",
"alignmentType": "teaches",
"targetUrl": "https://sandbox.credentialengineregistry.org/resources/ce-24aae5e7-868a-4cdc-a5ad-a857bf864590"
}
],
"@id": "https://dev.cassproject.org/api/data/schema.org.CreativeWork/ca22e231-0dc9-4368-85c7-4e37e96c720d/1525956177976",
"@context": "http://schema.org/",
"url": "https://www.headsetsdirect.com/headsets-101-ultimate-guide-to-understanding-headsets/"
}
and is created using the following code:
var c = new CreativeWork();
c.generateId(repo.selectedServer); // (Ensure you have a repo defined in your code)
c.url = "https://www.headsetsdirect.com/headsets-101-ultimate-guide-to-understanding-headsets/";
c.educationalAlignment = [new AlignmentObject()];
c.educationalAlignment[0].alignmentType = "teaches";
c.educationalAlignment[0].targetUrl = "https://sandbox.credentialengineregistry.org/resources/ce-24aae5e7-868a-4cdc-a5ad-a857bf864590";
EcRepository.save(c, console.log, console.error);
TIP
The CaSS Dashboard (cass-vlrc) can do this. Navigate to the competency, click Resources, and use the URL of the resource to create a new Resource.