如何進行PushEvent和PushEvents SOAP呼叫 | ACC
若您想要解決,本文會提供因應措施 推送事件 和 PushEvents SOAP Adobe Campaign和Adobe Campaign Classic中的呼叫。
說明 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>
登入/密碼<
/urn:sessiontoken>
解決方法 resolution
推送事件:
此呼叫在觸發 獨特 RT執行個體上的事件。
範本("test" 在範例中)需要在RT上從控制執行個體成功發佈。
在 <
urn:domEvent>
,型別的事件 <
rtEvent>
定義時必須使用 type 作為範本型別和 電子郵件 是收件者的電子郵件地址。
在 <
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<
/firstName>
<
姓氏>
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執行個體上的事件。
所有要求與第一個呼叫相同。
多個 <
rtEvent>
必須在以下位置定義: <
urn:domEventCollection>
.
呼叫範例:
<
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>
未觸發事件的原因為 推送事件 僅適用於多個事件。 如果呼叫只與一個事件進行, 推送事件 呼叫為必填。