1

I am trying to create a subscriber using the SalesForce Marketing Cloud/Exact Target SOAP API. My subscriber is successfully being created, but they are not appearing in the specified list (only appear in the "all subscribers" bucket). Below is the body of my SOAP envelope. Any help would be appreciated!

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <CreateRequest xmlns="http://exacttarget.com/wsdl/partnerAPI">
        <Options>
            <SaveOptions>
                <SaveOption>
                    <PropertyName>*</PropertyName>
                    <SaveAction>UpdateAdd</SaveAction>
                </SaveOption>
            </SaveOptions>
        </Options>
        <Objects xsi:type="Subscriber">
            <Client>
                <ID>555</ID>
            </Client>
            <ObjectID xsi:nil="true">
            </ObjectID>
            <EmailAddress>some email address</EmailAddress>
            <Lists>
                <ID>123456789</ID>
            </Lists>
            <Attributes>
                <Name>First Name</Name>
                <Value>First</Value>
            </Attributes>
            <Attributes>
                <Name>Last Name</Name>
                <Value>Last</Value>
            </Attributes>
        </Objects>
    </CreateRequest>
</s:Body>
0

Seems like you are missing some info in the node try:

<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <CreateRequest xmlns="http://exacttarget.com/wsdl/partnerAPI"> <Options> <SaveOptions> <SaveOption> <PropertyName>*</PropertyName> <SaveAction>UpdateAdd</SaveAction> </SaveOption> </SaveOptions> </Options> <Objects xsi:type="Subscriber"> <Client> <ID>555</ID> </Client> <ObjectID xsi:nil="true"> </ObjectID> <EmailAddress>some email address</EmailAddress> <lists> <partnerkey xsi:nil="true"></partnerkey> <id>12345</id> <objectid xsi:nil="true"></objectid> <status>Active</status> </lists> <status>Active</status> <Attributes> <Name>First Name</Name> <Value>First</Value> </Attributes> <Attributes> <Name>Last Name</Name> <Value>Last</Value> </Attributes> </Objects> </CreateRequest> </s:Body>

  • I added those tags and I am getting the same result. Success message comes back, but the subscriber is not in the specified list. – Mike Dec 22 '16 at 14:06
0

I think I got it working, the key is in the node and providing a value of "upsert" for the Action tag:

<lists>
   <id>12345</id>
   <Status>Active</Status>
   <Action>upsert</Action>
</lists>
  • I'm still getting the same response. "OK. Created subscriber" with no errors. But the subscriber is still not in the list. I'm starting to wonder if there is an issue beyond code going on here. Thanks for the continued help! – Mike Dec 27 '16 at 16:09

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.