Skip to content

Instantly share code, notes, and snippets.

@mc-doc
mc-doc / convert-soap-async.php
Last active April 25, 2018 20:23
Use this PHP example as a model to convert your existing API calls to asynchronous processing.
<?php
$request = new Marketing Cloud_CreateRequest();$opts = new Marketing Cloud_CreateOptions();
$opts->RequestType = Marketing Cloud_RequestType::Asynchronous;
$request->Options = $opts;
$results = $client->Create($request);
@mc-doc
mc-doc / convert-soap-async.net
Last active April 25, 2018 20:22
Use this C# example as a model to convert your existing API calls to asynchronous processing.
// .NET
CreateOptions co = new CreateOptions();
co.RequestType = RequestType.Asynchronous;
co.RequestTypeSpecified = true;
CreateResult[] results = integrationFramework.Create(co, subscribers, out requestID, out status);
@mc-doc
mc-doc / convert-soap-sync.php
Last active April 25, 2018 20:22
Use this PHP example as a model to convert your existing API calls to asynchronous processing.
<?php
$request = new Marketing Cloud_CreateRequest();$opts = new Marketing Cloud_CreateOptions();
$request->Options = $opts;
$results = $client->Create($request);
@mc-doc
mc-doc / convert-soap-sync.net
Last active April 25, 2018 20:22
Use this C# example as a model to convert your existing API calls to asynchronous processing.
// .NET
CreateOptions co = new CreateOptions();
CreateResult[] results = integrationFramework.Create(co, subscribers, out requestID, out status);
@mc-doc
mc-doc / custom-activity-modal.json
Last active February 1, 2021 20:07
sample for running hover modal in custom activity in load-custom-activity-ui.htm
"userInterfaces": {
"configModal": {
"height": 200,
"width": 300
},
"runningModal": {
"url": "runningModal.html"
},
"runningHover": {
"url": "runningHover.html"
@mc-doc
mc-doc / internationalize-branch-labels2.json
Last active April 25, 2018 20:21
map internationalized outcomes from multi-outcome activity to i18n key in internationalize-branch-labels.htm
"outcomeLabelLanguageMap": {
"buy_item": "buyLabel",
"sell_item": "sellLabel",
"hold_item": "holdLabel"
}
@mc-doc
mc-doc / internationalize-branch-labels1.json
Last active April 25, 2018 20:21
internationalized outcomes from multi-outcome activity in internationalize-branch-labels.htm
"lang": {
"en-US": {
"name": "Custom Split",
"description": "An app extension with multiple outcomes.",
"buyLabel": "Buy",
"sellLabel": "Sell",
"holdLabel": "Hold"
}
}
@mc-doc
mc-doc / custom-activity-multiple-outcomes.json
Last active April 25, 2018 20:21
Define a Custom Split Activity with Multiple Outcomes sample in extending-activities.htm
"outcomes": [
{
"arguments": {
"branchResult": "buy_item",
"some argument": "passed from config.json for buy_item"
}
},
{
"arguments": {
"branchResult": "sell_item",
@mc-doc
mc-doc / custom-activity-config.json
Last active June 1, 2020 12:17
Custom Activity config.json definition structure in custom-activity-config.htm
{
"workflowApiVersion": "1.1",
"metaData": {
"icon": "images/sms.png",
"category": "message"
},
"type": "myActivityType",
"lang": {
"en-US": {
"name": "Custom Activity (Workflow API v1.1)",
@mc-doc
mc-doc / change-retention-data-extension-soap3.xml
Last active April 25, 2018 20:20
Sample SOAP Response to Set End of Data Retention Period in changing_the_retention_period_for_a_data_extension.htm
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Header>
<wsa:Action>UpdateResponse</wsa:Action>
<wsa:MessageID>urn:uuid:f61440a2-d9c0-4bea-8926-10b0ae7eae31</wsa:MessageID>
<wsa:RelatesTo>urn:uuid:a1fac280-09f5-40fb-a069-e2ef627fcde8</wsa:RelatesTo>
<wsa:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To>
<wsse:Security>
<wsu:Timestamp wsu:Id="Timestamp-f90df106-30d0-46ab-a652-2f651b9d6e7b">
<wsu:Created>2011-04-02T05:42:36Z</wsu:Created>