List template variables
client.Sequence.ListTemplateVariables(ctx) (*SequenceListTemplateVariablesResponse, error)
GET/v1/sequences/template/variables
Lists the variables a sequence template may use: the first and last name, the contact’s and its first account’s fields of a type a message can print, and the sender’s name and email. Use an entry’s ref in a send step’s subject or body. A variable needs a fallback for contacts missing the value: {{ {attr:ad_…} }} is written {{ coalesce({attr:ad_…}, "fallback") }}, and one without a fallback is refused when the draft is saved. Anything else inside {{ }} is refused too.
Required scopes: sequences:read, contacts:read and accounts:read
Rate limit category: Read
List template variables
package main
import (
"context"
"fmt"
"github.com/Lightfld/lightfield-go"
"github.com/Lightfld/lightfield-go/option"
)
func main() {
client := githubcomlightfldlightfieldgo.NewClient(
option.WithAPIKey("My API Key"),
)
sequenceListTemplateVariablesResponse, err := client.Sequence.ListTemplateVariables(context.TODO())
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", sequenceListTemplateVariablesResponse.Data)
}
{
"data": [
{
"field": {
"id": "id",
"valueType": "ADDRESS"
},
"group": "contact",
"label": "label",
"ref": "ref"
}
],
"object": "list",
"totalCount": -9007199254740991
}Returns Examples
{
"data": [
{
"field": {
"id": "id",
"valueType": "ADDRESS"
},
"group": "contact",
"label": "label",
"ref": "ref"
}
],
"object": "list",
"totalCount": -9007199254740991
}