0

I'm trying to perform an action (Start, Pause, Publish) on a Triggered Send via WSProxy but with no success so far.

<script runat="server">
Platform.Load("core", "1.1");
//140643
var prox = new Script.Util.WSProxy();

var action = ["Start", "Pause", "Publish"];
var opts = {};
var props = {"CustomerKey": 140643};
var req = prox.performItem("TriggeredSend", props, action[1], opts);
Write(Stringify(req));

</script>

And the status message of the response was: "Cannot perform Perform on objects of type TriggeredSend"

Can I ask if it's possible to achieve this via WSProxy?

2 Answers 2

1

No, you cannot Perform on a Triggered Send. According to this chart, it only allows Create, Update and Delete:

https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/supported_operations_for_objects_and_methods.html

enter image description here

3
0

Based on @Gortonington answer here. I could convert it using WSProxy as below:
"Inactive" status equals "Pause"
"Active" status equals "Start"
And RefreshContent equals true meaning Publish

<script runat="server">
Platform.Load("core", "1.1");

var prox = new Script.Util.WSProxy();

var updateObject = [
    {
    CustomerKey: 140642,
    TriggeredSendStatus: "Inactive"
    //RefreshContent: true
    },
    {
    CustomerKey: 140643,
    TriggeredSendStatus: "Inactive"
    //RefreshContent: true
    }];

var options = {SaveOptions: [{'PropertyName': '*', SaveAction: 'UpdateOnly'}]};
var req = prox.updateBatch('TriggeredSendDefinition', updateObject, options);
Write(Stringify(req));
</script>

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .