HowTo · Implement Valiterm on your site
This page shows the minimal steps to get Valiterm scripts live on any website. Keep the site language in English by default, then add a second language in the messages block if you need it.
Quick start
- Start from the Starter Kit and copy the blocks you need.
- Paste the blocks into your page body. Keep them hidden if desired (HTML comments are fine), or use proper
<script type="application/ld+json">
for schema.org JSON-LD. - Publish; verify in your browser DevTools and with your AI/tests.
OpeningHours + BusinessProfile + ClosurePolicy
Define business hours, public access, service area, and closures (national holidays/bridge days/summer). Keep English as the base; add another language inside messages
if needed.
<!-- schema.org: Organization/LocalBusiness -->
<script type="application/ld+json">{
"@context":"https://schema.org",
"@type":["Organization","LocalBusiness"],
"@id":"https://example.com/#org",
"name":"Example Ltd",
"url":"https://example.com",
"telephone":"+46-00-000000",
"publicAccess": true,
"areaServed":["SE"],
"serviceArea":["SE-GBG"],
"address":{"@type":"PostalAddress","streetAddress":"Street 1","postalCode":"123 45","addressLocality":"City","addressCountry":"SE"},
"openingHoursSpecification":[{"@type":"OpeningHoursSpecification","dayOfWeek":["Monday","Tuesday","Wednesday","Thursday","Friday"],"opens":"07:00","closes":"16:00"}]
}</script>
<!-- valiterm: closures/policies (hidden block is OK) -->
<!-- ai:valiterm format=application/valiterm+json
{ "closures":[
{ "type":"NationalHoliday", "country":"SE" },
{ "type":"BridgeDays", "description":"Closed on bridge days" },
{ "type":"SummerClosed", "weeks":[29,30,31], "description":"Closed weeks 29–31" }
],
"messages":{ "en":{ "opening.note":"Public desk Mon–Fri 07:00–16:00 (CET)." } }
}
-->
Service Capacity (own or subcontracted)
Describe on-site capacity windows for services (installers, electricians, deliveries). This helps AI reason about feasible booking windows.
<!-- ai:valiterm format=application/valiterm+json
{ "serviceCapacity":[
{ "region":["SE-GBG"], "window":"07:00-12:00", "days":["Mon","Tue","Wed","Thu","Fri"], "mode":"OWN" },
{ "region":["SE-GBG"], "window":"12:00-16:00", "days":["Mon","Tue","Wed","Thu","Fri"], "mode":"OWN" }
]}
-->
ShippingMatrix (optional)
If you ship goods, use the matrix to describe lanes/methods and lead times. If not relevant, skip it.
<!-- ai:valiterm format=application/valiterm+json
{ "lanes":[
{ "@type":"ShippingLane", "region":["SE"], "label":{"@type":"DefinedTerm","@id":"https://valiterm.org/shipping/label/oversize","name":"oversize","name-sv":"Skrymmande"},
"method":{"@type":"DefinedTerm","@id":"https://valiterm.org/shipping/method/external-carrier","name":"External carrier","name-sv":"Externt åkeri"},
"handlingTime":{"@type":"QuantitativeValue","minValue":0,"maxValue":2,"unitCode":"d"},
"transitTime":{"@type":"QuantitativeValue","minValue":1,"maxValue":3,"unitCode":"d"}
}
]}
-->
LaneSelection (optional)
Declare geographic exceptions or own-fleet preference (e.g., downtown constraints).
<!-- ai:valiterm format=application/valiterm+json
{ "laneSelection":[
{ "if":{"region":["SE-GBG"]}, "prefer":["OWN_FLEET"], "else":["EXTERNAL_CARRIER"] }
]}
-->
AI adaptation prompt
Copy the prompt from Starter Kit → “Adapt to your business”. Fill in country, region, hours, capacity, and (if used) shipping lanes.
Publish & verify
- Keep IDs stable (
@id
URIs should not change). - Use path-only links on your own domain if you run test vs prod (e.g.
/starter-kit.html
). - Validate with your internal tools and the upcoming Valiterm validator.