Skip to content

Instantly share code, notes, and snippets.

@babakc
Created December 18, 2017 10:49
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 babakc/61c2e569fbb4c5a9b23e46bbddeece0f to your computer and use it in GitHub Desktop.
Save babakc/61c2e569fbb4c5a9b23e46bbddeece0f to your computer and use it in GitHub Desktop.
def chkUserId(slots, sessionAttributes):
if((slots['UserID'] is None) or ((slots["UserID"] is not None) and (len(slots["UserID"]) != 6))):
messageContent = "That format seems incorrect. Let's try again. What is your user id?"
return elicit_slot("PlainText", messageContent, slots, "UserID", "None")
else:
return delegate_slot(slots, "userid")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment