Skip to content

Instantly share code, notes, and snippets.

View rodrigofreitasit's full-sized avatar
👻

Rodrigo Freitas rodrigofreitasit

👻
View GitHub Profile
<!--–– Copyright © 2020 Zuzanna Jarczynska http://sfmarketing.cloud ––-->
%%[
SET @contactId = _subscriberkey
IF NOT EMPTY(@contactId) THEN
/* fetch data from Sales Cloud to show in the form */
SET @subscriberRows = RetrieveSalesforceObjects(
@wvpv
wvpv / sfmc-sql-pushaddress.sql
Created December 10, 2019 14:59
Query to pull PushAddress data
select
_ContactID ContactID
, _DeviceID DeviceID
, _APID APID
, _Status Status
, _Source Source
, _SourceObjectId SourceObjectId
, _Platform Platform
, _PlatformVersion PlatformVersion
, _Alias Alias
<script runat="server">
Platform.Load("core","1.1.5");
var prox = new Script.Util.WSProxy();
var queryAllAccounts = true;
var cols = ["Client.ID","CustomerKey","ListName","ID"];
var filter = {
Property: "ListClassification",
SimpleOperator: "equals",
Value: "PublicationList"
@jdeblank
jdeblank / ssjs_wsproxy_updatePublist.js
Last active January 22, 2023 01:03
Use SSJS and WSProxy to add/update a subscriber status in Publication List within Salesforce Marketing Cloud
<script runat="server">
Platform.Load("core","1.1.1");
var subkey = "abc123";
var email = "[email protected]"
var prox = new Script.Util.WSProxy();
// Set specific BU context if required
// prox.setClientId({ "ID": 7279411 });
define([
'postmonger'
], function (
Postmonger
) {
'use strict';
var connection = new Postmonger.Session();
var authTokens = {};
var payload = {};