Configuring a simple custom prompt

For an example of a more advanced custom prompt, see Configuring custom prompts.

To configure a simple custom prompt:

  1. Using an FTP client, connect to your clock and download a copy of the clock.xml configuration file to your local machine.
  2. Add a prompt id="TIP_PROMPT" custom prompt such as this to the uncommented code which will prompt for a tip amount with two decimal places when the user clocks out:
    
    <prompt id="TIP_PROMPT" code="TIP" type="number" decimalPlaces="2" enableKeyPad="true" 
       enableCardReader="true">
       <trigger punch="OUT" />		
       <cancel allowed="true" acceptSwipe="false" data="I" message="TIP_PROMPT_RESPONSE_REQUIRED" 
       swipeRejectedReason="TIP_PROMPT_CANCELLED"  />
       <timeout seconds="15" acceptSwipe="false" data="T" swipeRejectedReason="TIP_PROMPT_TIMEDOUT"/>		
    </prompt>

    Information about this prompt:

    • A message of TIP_PROMPT ("Tip amount") is initially displayed for the user.
    • The tip amount is captured in the EXTRADATA of the clock transaction as TIP=<amount of tip>.
    • The enableKeyPad and enableCardReader values in the XML allow you to control the input mode for the custom prompt. For example, using these values you can force the user to use the keypad when entering a tip amount.

    Additional information about this configuration if a user cancels the transaction by pressing ESC:

    • The employee is not clocked out. See acceptSwipe="false" in this part of the syntax above:
      
      cancel allowed="true" acceptSwipe="false" data="I" message="TIP_PROMPT_RESPONSE_REQUIRED" 
      swipeRejectedReason="TIP_PROMPT_CANCELLED"
    • The message TIP_PROMPT_RESPONSE_REQUIRED ("Transaction Cancelled. Punch will not be recorded") is displayed to the employee.
    • The clock will record TIP=I in the clock EXTRADATA of the clock transaction. This is determined by code="TIP" and data="I" syntax in the XML configuration above.
    • The clock journal records a rejected message of TIP_PROMPT_CANCELLED ("Declined to respond to questionnaire."). This message can be localized in the clock.properties file of your clock configuration. No message is displayed to the user.

    Additional information about this configuration if a user allows the clock to timeout:

    • The employee is not clocked out. See acceptSwipe="false" in this part of the syntax above:
      
      timeout seconds="15" acceptSwipe="false" data="T" swipeRejectedReason="TIP_PROMPT_TIMEDOUT"
      
    • The employee is returned to the badge entry screen without a message.
    • The clock will record TIP=T in the clock EXTRADATA of the clock transaction. This is determined by code="TIP" and data="T" syntax in the XML configuration above.
    • The clock journal records a rejected message of TIP_PROMPT_TIMEDOUT ("Timed out during questionnaire."). This message can be localized in the clock.properties file of your clock configuration. No message is displayed to the user.
  3. Save your changes to your local copy of the clock.xml file and ensure it is valid XML.
  4. Upload the modified clock.xml file to your clock and overwrite the existing copy on your clock.
  5. Restart the clock.

After the clock has restarted, your changes will take effect.

To apply these changes to additional clocks, the clock.xml file can be updated via the configuration update process. See Configuration Updates for the Clock.