I'm using the SalesForce Marketing Cloud (Exact Target).

I have a folder ID (category ID) and I want to get all the send definitions (user-initiated sends) in that folder via the SOAP API in C#. I know when retrieving lists, I can create a filter that matches on Category (folder ID).

When I attempt to do the same for email send definitions, I receive the status :

Error: The Filter Property 'CategoryID' is not a retrievable property.

I tried both Category and CategoryID, and no luck. Anyone have success trying to do this?

Here is my code to set up the filter:

        RetrieveRequest rr = new RetrieveRequest();
        rr.ObjectType = "EmailSendDefinition";
        rr.Properties = new string[] { "ObjectID", "Name", "CategoryID", "SenderProfile.FromName", "SenderProfile.CustomerKey" };

        SimpleFilterPart sfp = new SimpleFilterPart();
        sfp.Property = "CategoryID";
        sfp.SimpleOperator = SimpleOperators.equals;
        sfp.Value = new string[] { categoryId };
        rr.Filter = sfp;
  • 1
    Was going to reopen your other question but I guess you wanted to get an answer faster. You're right, this is a pretty relevant question, hope you don't mind I updated it a bit to have people discover it easier. Sep 20 '16 at 18:52
  • @SamuelDeRycke thanks Sam! I don't mind at all. New to using these communities, so learning the conventions on the fly.
    – Mike
    Sep 20 '16 at 19:37

I tried with CategoryID in SimpleFilter it works, do you have EmailSendDefinition as ObjectTye in your request? It is not SendDefinition ObjectType

my raw xml looks like below

<ObjectType>EmailSendDefinition</ObjectType><Properties>Name</Properties><Properties>CategoryID</Properties><Filter xsi:type="SimpleFilterPart"><Property>CategoryID</Property><SimpleOperator>equals</SimpleOperator><Value>1234</Value></Filter>

set ClientIDs for RetrieveRequest

        var m_etclient = new etAPI.ClientID();
        m_etclient.ID = 123456;
        m_etclient.IDSpecified = true;
        rr.ClientIDs = new etAPI.ClientID[1];
        rr.ClientIDs[0] = m_etclient;
  • I've added my current code so you can see what I'm doing. Not using the XML, but the c# webservice library. It looks like it should be good. Can you see anything I'm missing?
    – Mike
    Sep 23 '16 at 19:58
  • your code looks fine, not sure why you still get that error. maybe try remove more attributes, I only have new string[] { "Name", "CategoryID"} and a simple filter like yours and it works for me. Also try setting ClientID for rr request, I have updated my answer for that details. It can cause errors if you are trying to access a businessunit that is not parent.
    – Bo Hu
    Sep 26 '16 at 0:55
  • Thanks for the help. I tried both suggestions (limiting the properties, setting client ID) and I still get the same error: Error: The Filter Property 'CategoryID' is not a retrievable property. Stumped at this point.
    – Mike
    Sep 27 '16 at 19:45
  • @Mike, I suggest to download Fiddler to track what is sending to SFMC. download and open Fiddler, run your app, in Fiddler's left panel looking for a log of "/Service.asmx", in the right panel, top half is your xml envelope request, click on "Raw" tab and copy paste your xml request, remove credentials <o:username> <o:password> and <ClientIDs> tag, you can inspect xml response in bottom half panel. BTW, which endpoint are you pointing to? s0, s4,s6 or s7?
    – Bo Hu
    Sep 28 '16 at 0:20
  • I'm using endpoint S1 (webservice.exacttarget.com/Service.asmx). I'll have to download Fiddler and give that a go so I can post the XML. Stay tuned!
    – Mike
    Sep 28 '16 at 22:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.