I am looking for a way to change the date format from YYYY/MM/DD to MM/DD/YYYY when sending a Twillio sms message using webhooks. My understanding is that you cannot use Email Scripting Tokens in a webhook only basic text tokens and lead tokens.
Solved! Go to Solution.
On top of Sandford’s point, we usually prefer text tokens to date tokens when using dates that should be displayed or used in webhooks, precisely for this reason.
Greg
I am looking for a way to change the date format from YYYY/MM/DD
For Marketo Date/DateTime fields, the date format is yyyy-MM-dd (hyphens, not slashes). That's standard ISO 8601 date format.
The only way to change that output format is to pass the field through another webhook (before sending to Twilio) that copies the Date, in a different format, to a new String field created for that purpose. Then pass that String field to Twilio.
Thank you guys. I was hoping they would be a different workaround but it looks like we will create duplicate fields one as a text field for display and one as a date field for the program. I am not sure if it has been asked before, but I did create an idea of being able to use Email script tokens in webhooks. Thank you again for your quick replies.
We use a php endpoint to receive the webhook data from Marketo and transform the data before forwarding the data to Twilio. For us it was much easier to write logic to standardise phone numbers before sending to Twilio than to update the whole database. Transforming the formatting of dates would be very straightforward.
In essence you're using up some of your webserver resources to free up some of Marketo's