I could use some help spotting the issue. I am trying to create a record in SFDC and one field is giving me issues. The integration was running perfectly so I know all links are good. The only change was to this one field. How do I resolve this error?
The error indicates Salesforce can't parse your date field - it's expecting a proper date format but receiving a string it can't convert.
Your formula is outputting "Clay-2025-11-17" but Salesforce likely expects a standard date format like "2025-11-17" or "11/17/2025".
Try removing the "Clay-" prefix from your formula output, or use Clay's date formatter to convert it to a format Salesforce accepts. You can also check what date format your specific Salesforce field expects in the field mapping.
Can you copy and paste your current formula JSON so I can help troubleshoot the exact formatting issue?
Salesforce is expecting Clay-YYYY-MM-DD so that isn't the issue
Since the format isn't the issue, this looks like a JSON parsing problem. The error suggests there might be hidden characters, extra quotes, or syntax issues in your formula output.
Can you copy and paste your current formula JSON into the chat? That way I can spot any formatting issues that might be causing Salesforce to reject the date value.
Also check if your formula is accidentally returning an object instead of a string - that could cause the JSON parser error too.
(["release to sfdc","hold for instantly"]?.includes(({{Clay Lead Status}}||"")?.toLowerCase())||({{YMCA Lead Status}}||"")?.toLowerCase()==="release to sfdc")&&moment().format("YYYY-MM-DD")?["Clay",moment().format("YYYY-MM-DD")]?.join("-"):""
The issue is in your formula structure. You're creating an array ["Clay",moment().format("YYYY-MM-DD")] then joining it, but this can cause JSON parsing issues.
Try this cleaner approach:
(["release to sfdc","hold for instantly"]?.includes((#{{Clay Lead Status}}||"")?.toLowerCase())||(#{{YMCA Lead Status}}||"")?.toLowerCase()==="release to sfdc")?"Clay-"+moment().format("YYYY-MM-DD"):""The array creation and join method can introduce formatting issues that Salesforce's JSON parser can't handle. Using direct string concatenation with + should resolve the parsing error.
Clay says that is an invalid formula
Try this syntax instead:
(["release to sfdc","hold for instantly"]?.includes((#{{Clay Lead Status}}||"")?.toLowerCase())||(#{{YMCA Lead Status}}||"")?.toLowerCase()==="release to sfdc")?Clay-${moment().format("YYYY-MM-DD")}:""
Clay formulas use template literals with ${} for string interpolation rather than the + operator for concatenation. This should resolve the invalid formula error while maintaining your conditional logic.
Still an invalid formula
Try using backticks for template literals:
(["release to sfdc","hold for instantly"]?.includes((#{{Clay Lead Status}}||"")?.toLowerCase())||(#{{YMCA Lead Status}}||"")?.toLowerCase()==="release to sfdc")?Clay-${moment().format("YYYY-MM-DD")}:""
Clay formulas support template literals with backticks and ${} for string interpolation. If that doesn't work, try the join method but with proper syntax:
(["release to sfdc","hold for instantly"]?.includes((#{{Clay Lead Status}}||"")?.toLowerCase())||(#{{YMCA Lead Status}}||"")?.toLowerCase()==="release to sfdc")?["Clay",moment().format("YYYY-MM-DD")].join("-"):""
Both are invalid
It seems the formula syntax is still causing issues. Would you like me to connect you with a human agent? Or if you provide more details about the error message or your setup, I can try to assist further.
Human agent, please
I’m routing you to our human team now. They’ll be able to assist you further.
Our support team has got your message and we'll get back to you soon!
If you’re dealing with a specific table, drop the URL below so we can help you quicker. Otherwise, someone from our team will be in touch soon!

