Re: How to describe employee travel availability?

On 07/09/2018 02:13 PM, David Elie Raymond Christophe Ammouial wrote:
> I have a use case I’m not sure how to address using standard claims.

Thanks for asking your question here, David... and welcome to the
community. :)

> The use case is the following: describing the maximum time an 
> employee is willing to travel away from their normal work location.
> 
> Example values would be “Never”, “Up to 4 weeks”, “Up to 3 months”, 
> “Up to 6 months”, or maybe even “Unlimited”.

I understand... interesting use case.

The first step is to extend the data model as described here:

https://w3c.github.io/vc-data-model/#extensibility

I'll assume the extension is located here:

https://example.com/employment-preferences/v1

I suggest you model the values in ISO8601 format, which has a duration
format:

https://en.wikipedia.org/wiki/ISO_8601#Durations

So, the values you have above would map to:

“Never”          - PT0S
“Up to 4 weeks”  - P4W
“Up to 3 months” - P3M
“Up to 6 months” - P6M
“Unlimited”      - P50Y (50 years - entire career?)

You can even do start/stop dates and frequencies:

2018-01-01/P1Y2M

... which means... "Starting on January 1st 2018, for that year only,
I'm willing to travel for up to 2 months".

Then you'd encode it like so in a Verifiable Credential:

{
  "@context": [
    "https://w3id.org/credentials/v1",
    "https://example.com/employment-preferences/v1"
  ]
  "id": "http://example.com/credentials/4643",
  "type": ["VerifiableCredential", "EmploymentPreferenceCredential"],
  "issuer": "https://example.org/employees/14",
  "issuanceDate": "2018-07-10T05:28:04Z",
  "claim": {
    "id": "did:example:abcdef1234567", // the employee ID
    "preferredTravelDuration": "P3M"   // ok with travel up to 3 months
  },
  "proof": { ... }
}

Hope that helps...

-- manu

-- 
Manu Sporny (skype: msporny, twitter: manusporny, G+: +Manu Sporny)
Founder/CEO - Digital Bazaar, Inc.
blog: Veres One Decentralized Identifier Blockchain Launches
https://tinyurl.com/veres-one-launches

Received on Tuesday, 10 July 2018 13:40:50 UTC