0

I'm creating assets using the Fuel SDK and the Content Builder API but I can't figure out how to include nested tags. Here's my props code:

$postEmail->props = 
     array("name" => "name goes here",
     "channels"=> array(
     "email" => true,
     "web" => false),
     "views" => array(
     "html"=> array(
     "content" => 'content-text'),
     "text" => array(
     "content" =>""),
     "subjectline" => array(
     "content" => "subject here"),
     "preheader" =>array("content" =>"")),
     "tags" => [ "ParentTag", "ChildTag" ] ,
     "assetType" => array(
     "id" => 208),
     "category" => array(
     "id" => 5867),
     "data" => array(
     "email" => array(
     "options" => array(
     "characterEncoding"=> "utf-8")
     )
     )
     );

In the tags array, I can't seem to specify nested tags. Assuming I have ParentTag and ParentTag > ChildTag. ParentTag will be applied. ChildTag will not, and if I use "ParentTag > ChildTag" then the API complains about illegal characters.

How do I add ChildTag?

UPDATE: So far I've tried:

"tags" => ["ParentTag", "ChildTag"]  // child tag not applied
"tags" => ["ParentTag", "ParentTag > ChildTag"]  // Illegal character error
"tags" => ["ParentTag", ["ChildTag"]] // internal server error
"tags" => ["ParentTag", ["ParentTag", "ChildTag"]] // internal server error
"tags" => ["ParentTag", {"ParentTag" =>"ChildTag"}] // internal server error
0
0

I spoke to SFMC support — at time of writing, there's no support for specifying nested tags by name when creating assets. Tag IDs are currently stored rather than tag names as a workaround for a bug in content builder.

In my case, I used the Tag API to pull the list of all tags which includes names and IDs for each, and then adjusted my application to use the ID values rather than names.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.