使用nodejs建立Marketing Cloud的contact數據

首先在Marketing Cloud的UI上建立一個contact:前端

觀察Chrome開發者工具network標籤頁裏的HTTP請求:工具

jerry.gcdemo.hybris.com/sap/opu/oda…post

這個請求用於讀取CSRF token:url

點擊保存,會發送一個新的HTTP post請求:spa

請求url: jerry.hybris.com/sap/opu/oda… 再看下重要的請求頭部字段:3d

把第一步得到的CSRF token填到Postman裏的header字段裏,如圖:code

body:cdn

{"CountryCode":"CN","City":"Chengdu","FirstName":"Jerry1","LastName":"Wang1","PostalCode":"610093","RegionCode":"","Street":"天府軟件園","HouseNumber":"天府軟件園","DateofBirth":null,"ContactPersonFacets":[{"Id":"jerry1@sap.com","IdOrigin":"EMAIL","Obsolete":false,"Invalid":false},{"Id":"","IdOrigin":"PHONE","Obsolete":false,"Invalid":false},{"Id":"","IdOrigin":"MOBILE","Obsolete":false,"Invalid":false},{"Id":"","IdOrigin":"FAX","Obsolete":false,"Invalid":false}],"IsConsumer":true,"Filter":{"MarketingAreaId":"CXXGLOBAL"}}
複製代碼

狀態碼201,證實建立成功了:blog

能夠在前端看到建立成功的contact:token

要獲取更多Jerry的原創文章,請關注公衆號"汪子熙":

相關文章
相關標籤/搜索