MM5.6 Permalink
This example is from BSI Pardot Links, but it can be used to generate any permanent link. When the ‘Pardot Link’ bit field is ticked, the asset is published to the Pardot channel (which puts the source copy in the non storage) and a link to it is generated.
When the ‘Pardot Link’ bit field is unticked, the link field is cleared and the asset removed from the channel.
https://test-dam-media-manager.bsigroup.com/workflow-management/editor/1
trigger "Pardot Link Bit ticked" {
type = "Specific Metadata Value"
resolves = ["Add to Pardot Channel", "Set Link Metafield"]
value = "true"
ignore_casing = "true"
meta_field = "guid:1B0C2BC9-D7B8-4CAC-A09B-D192214F8C05"
listen_to_metadata_changes = "addedonly"
}
action "Add to Pardot Channel" {
type = "Move Asset To Folder"
asset_item_id = "@sourceAssetItemId"
folder = "10,138"
}
action "Set Link Metafield" {
type = "Set Link Metafield"
meta_field = "guid:6C8D0B51-D9FF-49DF-A1C5-3FA90D75B8D8"
new_value = "https://test-dam.bsigroup.com/dmm3bwsv3/assetstream.aspx?assetid=@sourceAssetId&mediaformatid=10061&destinationid=10016"
asset_item_id = "@sourceAssetItemId"
use_versioned_metadata = "false"
}
trigger "Pardot Link Bit unticked" {
type = "Specific Metadata Value"
resolves = ["Remove from Pardot Channel", "Clear Link metafield"]
value = ""
ignore_casing = "true"
meta_field = "guid:1B0C2BC9-D7B8-4CAC-A09B-D192214F8C05"
listen_to_metadata_changes = "all"
}
action "Remove from Pardot Channel" {
type = "Remove Asset From Folder"
asset_item_id = "@sourceAssetItemId"
folder = "10,138"
}
action "Clear Link metafield" {
type = "Clear metafield"
asset_item_id = "@sourceAssetItemId"
metafield = "guid:6C8D0B51-D9FF-49DF-A1C5-3FA90D75B8D8"
}