如何進行PushEvent和PushEvents SOAP呼叫 | ACC
如果您想要在Adobe Campaign和Adobe Campaign Classic中進行 PushEvent 和 PushEvents SOAP 呼叫,本文會提供因應措施。
說明 description
環境
- Campaign Classic
- Campaign
- Campaign Classic v7
- Campaign v8
問題/症狀
必要條件:
-
下載觸發呼叫的SOAP UI
-
正在上傳WSDL (
<伺服器URL>/nl/jsp/schemawsdl.jsp?schema=nms:rtEvent)至SOAP UI -
必須授權測試電腦的IP,否則您會收到「存取遭拒」錯誤。
-
用於驗證的有效認證(通常是mc使用者),將放入
<urn:sessiontoken>login/password</urn:sessiontoken>
解決方法 resolution
推播事件:
此呼叫將用於觸發RT執行個體上的 唯一 事件。
範本(範例中的 "test")需要在RT上從控制執行個體成功發佈。
在< urn:domEvent>中,為型別的事件 < rtEvent>的定義必須以 型別 為範本型別,電子郵件 為收件者電子郵件地址。
在< ctx>中,必須定義範本上使用的所有屬性。 在此範例中,範本包含以下內容:
< P >Your email is: <%= rtEvent.email %>< P > -> is using the attribute email directly as email in define within rtEvent
< P >Your first name: <%= rtEvent.ctx.firstName %>< P > -> is using ctx.firstname as ctx is an inner element of rtEvent
< P >Your last name: <%= rtEvent.ctx.lastName %>< P> -> is using ctx.lastname as ctx is an inner element of rtEvent
呼叫範例:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:nms:rtEvent">
< soapenv:Header/>
< soapenv:Body>
< urn:PushEvent>
< urn:sessiontoken>登入/密碼< /urn:sessiontoken>
< urn:domEvent>
< rtEvent type="test" email="xxx@gmail.com">
< ctx>
<名字> ABC< /名字>
< lastName> DEF< /lastName>
< /ctx>
< /rtEvent>
< /urn:domEvent>
< /urn:PushEvent>
< /soapenv:Body>< /soapenv:Envelope>
成功回應:
<SOAP-ENV:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns="urn:nms:rtEvent" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
< SOAP-ENV:Body>
< PushEventResponse SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns="urn:nms:rtEvent">
< plId xsi:type="xsd:long"> 0000000000< /plId>
< /PushEventResponse>
< /SOAP-ENV:Body>< /SOAP-ENV:Envelope>
接收PIID表示已成功接收事件,且正在處理中。
推送事件:
此呼叫將用於觸發RT執行個體上的 多個 事件。
所有要求與第一個呼叫相同。
必須在 <urn:domEventCollection> . 中定義多個< rtEvent>
呼叫範例:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:nms:rtEvent">
< soapenv:Header/>
< soapenv:Body>
< urn:PushEvents>
< urn:sessiontoken>?< /urn:sessiontoken>
< urn:domEventCollection>
<! — 此時可輸入ANY元素。 需要1個以上的專案 — >
< /urn:domEventCollection>
< /urn:PushEvents>
< /soapenv:Body>< /soapenv:Envelope>
注意: 如果這個呼叫中只定義了1個元素,RT執行個體將會收到它,回應200 OK,但是 不會觸發、處理任何事件,也不會出現在事件中,而且不會有任何內容顯示在網頁記錄中。
您將會收到這類回應,這表示它到達RT,但不會發生任何事情:
<SOAP-ENV:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns="urn:nms:rtEvent" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
< SOAP-ENV:Body>
< PushEventsResponse SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns="urn:nms:rtEvent">
< pdomIds xsi:type="ns:Element" SOAP-ENV:encodingStyle="http://xml.apache.org/xml-soap/literalxml">
< rtEvent email="xxx@gmail.com" type="test"/>
< /pdomIds>
< /PushEventsResponse>
< /SOAP-ENV:Body>< /SOAP-ENV:Envelope>
未觸發事件的原因是 推送事件 僅適用於多個事件。 如果呼叫只與一個事件一起進行,則需要 PUSH EVENT 呼叫。