From 865fa53fcf8a3751bd348dd62518b6014ba4c483 Mon Sep 17 00:00:00 2001 From: Tejas Mahajan <141305477+mahajantejas@users.noreply.github.com> Date: Tue, 15 Apr 2025 14:34:37 +0530 Subject: [PATCH] Update Custom Certificates.md updated with a screenshot on how to properly use "split by condition" to validate if the contact variables contains a value before sending the certificate --- docs/3. Product Features/Custom Certificates.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/3. Product Features/Custom Certificates.md b/docs/3. Product Features/Custom Certificates.md index e736183d2..1e4d6753a 100644 --- a/docs/3. Product Features/Custom Certificates.md +++ b/docs/3. Product Features/Custom Certificates.md @@ -135,7 +135,11 @@ To change the page dimensions for a google slide #### 1. Use the following validation before the `create_certificate` webhook call to ensure that the certificates are not generated for contacts for whom the placeholder parameters value is not present - a. Use the below expression to check if the variables being sent in the webhook indeed have a value for the given contact and do not end up printing a certificate like error 1 shared above. -`<%= ["@contact.name", "@contact.abcd"] |> Enum.any?(&String.starts_with?(&1, "@")) %>` +``` +<%= ["@contact.name", "@contact.abcd"] |> Enum.any?(&String.starts_with?(&1, "@")) %> +``` + + - b. For more than 2 variables, add further commas in the first list and add the variable names in double quotes. - c. For just one variable, use split by custom expression and plainly enter the name of the variable and check for the condition “has only the phrase” and the variable name as shown in the screenshot.