Hi Goutham,
To match a user-provided input with a static value using the Vapi platform, you can follow these steps:
1. **Data Handling**: Ensure that both the static and dynamic data are in the same format. For zip codes, this might mean ensuring both are strings and stripped of any extraneous characters.
2. **Prompt Setup**: In your assistant's configuration, create a prompt that verifies if the dynamic input matches the static value. For example, "Is the user input '12345' equal to the stored value?"
3. **Conditional Logic**: Implement a simple conditional check in your assistant's logic flow to compare these values:
- If the input matches, proceed to the next step in your workflow.
- If it doesn’t match, prompt the user for re-entry or provide a relevant message.
4. **Use a Reliable Model**: Given that you're using the 4o cluster, ensure your assistant is configured to handle logical checks efficiently. Review the model configuration in your assistant setup to support this kind of operation.
If you're implementing this in code, an example might look like this in JavaScript:
javascript
const staticZipCode = "12345";
function checkZipCode(userInput) {
return staticZipCode === userInput ? "Matched" : "Not matched";
}
console.log(checkZipCode("12345")); // Outputs: Matched
console.log(checkZipCode("54321")); // Outputs: Not matched
These steps should help you achieve the functionality you need for matching inputs within your Vapi assistant configuration.