Skip to content

Instantly share code, notes, and snippets.

@mfurtak
Last active December 19, 2016 00:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mfurtak/473ed2b0d6a5c1b3596d937851bba011 to your computer and use it in GitHub Desktop.
Save mfurtak/473ed2b0d6a5c1b3596d937851bba011 to your computer and use it in GitHub Desktop.
Literal Alexa custom slot type value handling
switch (metric) {
case "status":
return buildStatusResponse();
case "stability":
return buildStabilityResponse();
case "growth":
return buildGrowthResponse();
case "retention":
return buildRetentionResponse();
default:
// Too bad about those near misses!
// Return an error response.
return buildUnknownMetricResponse(metric)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment