我有一个用例,我需要缩短我的Url并通过短信发送它。我有一个HTML页面,在呼叫时,更新我的客户的详细信息。它基本上更新了Sales Cloud中针对该特定潜在客户的对象的属性。当用户单击我们在SMS中给出的链接时,将打开HTML页面并验证该用户的信息(之前设置为未验证的属性现在设置为已验证)。
问题 在我的情况下,生成的有点链接本身会被点击(可能是当它被发送到bitly服务器以缩短链接时),即使用户没有点击该链接,用户的信息也会得到验证。 / p>
这是我的代码:
%%[
var @leadId, @shortenUrl, @bitlyUrl, @link
Set @contacts = RetrieveSalesforceObjects("Lead", "Id,FirstName,LastName", "Combined_Mobile__c", "=",
6569698800)
if rowcount(@contacts) != 0 then
Set @row = Row(@contacts, 1)
Set @firstName = FIELD(@row, "FirstName")
Set @lastName = FIELD(@row, "LastName")
Set @leadId = FIELD(@row, "Id")
endif
Set @encodedId = Base64Encode(@leadId)
set @urlLink =Concat('<url>','?leadID=',@encodedId)
set @bitlyUrl = 'https://api-ssl.bitly.com/v3/shorten?access_token=b6a8bcb7b8299121a6588dc619a71f23d0cd1211&format=txt&longUrl='
set @verifyUrl = Concat(@bitlyUrl,@urlLink,"&format=txt")
]%%
HTML页面包含以下代码:
%%[
set @encodedId = RequestParameter("leadID")
set @leadId = Base64Decode(@encodedId,'UTF-8', 1)
set @contacts= RetrieveSalesforceObjects("Lead", "Lead_Type__c,FirstName", "Id", "=",@leadId)
if rowcount(@contacts) != 0 then
Set @row = Row(@contacts, 1)
Set @firstName = FIELD(@row, "FirstName")
set @result = UpdateSingleSalesforceObject("Lead",@leadId,"Contact_Verified__c","Verified")
endif
]%%
<!DOCTYPE html>
<html>
<!--HTML header and body code-->
</html>
有什么建议吗?