Questions tagged [gtl]

SFMC Guide Template Language is an email scripting supplement to AMPScript and Server-Side JavaScript.

Filter by
Sorted by
Tagged with
21
votes
4answers
11k views

Can AMPScript parse JSON?

Using AMPScript to parse an XML feed. Client is switching to JSON. Is there something similar to BuildrowsetfromXML() for JSON in AMPScript? I am confined to using the members login area and not an ...
1
vote
3answers
1k views

Guide Template Language blocks displayed in CloudPages

I can't figure out how to get GTL working on CloudPages. I was informed that it should work. Here's my HTML: <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"&...
0
votes
2answers
4k views

Parse JSON string in AMPscript

We are currently passing a string attribute via the REST API that contains JSON. { "User_List": "[{\"name\":\"john doe\", \"email\":\"john.doe@mail.com\"}, {\"name\":\"jane doe\", \"email\":\"jane....
6
votes
1answer
1k views

How does Guide Template Language parse a straight JSON array?

I'm learning Guide, and I've been able to parse an array of objects... AmpScript: set @json = '[{"voucher":"123456789"}, {"voucher":"234567890"}]' Guide: {{.dataobject JsonVar type=variable ...
2
votes
1answer
772 views

Using GTL to Display Data from Nested JSON Arrays

I am building an email using data passed through JSON. Here is an example of the JSON file: { "order": { "items": [ { *Other Data*, "tracking": [ { **"...
2
votes
2answers
733 views

AMPScript/GTL function to check if variable is string or a numeric

Need to check a type of variable in ampscript, in order to use FormatNumber function(that can only work with integer variables). I tried the Handlebars function {{isString()}}, but can't make it ...
1
vote
3answers
1k views

Guide Template Language to provide dynamic links via href attribute

I'm trying to use the Guide Template Language to provide a dynamic link in a triggered send, something like this: <a href="{{My_Url}}">{{My Url}}</a> or <a href="{{My_Url}}">Your ...
0
votes
2answers
2k views

Json parse in emails with ampscript

Im trying to parse some weather json data in my email. But I cant quite fiqure out the syntax. With this code I'm trying to get the main.temp value printed. Below is my code so far, but it dosnt work :...
0
votes
1answer
746 views

GTL and multi nested JSON

I need to send an email and update a data extension based on JSON content. I've written code combining GTL and AMPscript but I keep getting errors. And also since this is my first time using GTL and ...