AMPScript que encurta links através da API do Shot.oi a ser utilizado no Salesforce Marketing Cloud
Documentação da API https://developers.short.io/reference/post_links
flowchart
subgraph AMPScript
userid(@userid)
campanha(@campanha)
destinocompleto(@destinocompleto)
titulo(@titulo)
destinocompleto --> originalURL
titulo --> title
userid --> tags
campanha --> tags
subgraph payload ["@payload - Json Parameter"]
allowDuplicates
domain
originalURL
title
tags
end
headerkey(@headerKey)
headerval(@headerVal)
headerkey --> headers
headerval --> headers
payload -->body_params
subgraph api ["Shot.io API"]
body_params(Body Params)
headers(Headers)
body_params --> generate
headers --> generate
generate(Generate Link)
response(Responses)
generate --> response
end
shorturl(@shortURL)
response --"RegExMatch(@response,shortURL)"--> shorturl
end
shorturl --> Message
subgraph Message["SMS Message"]
end