0

My integration team is trying to add subscribers to a list via the SOAP API and while the user is getting added to 'All Subscribers' it is not being added to the list in each child account. Below is the code:

public async Task<Subscriber> BuildAsync(string storeCode, string emailAddress, string subscriberKey)
       {

           return new Subscriber
           {
               EmailAddress = emailAddress,
               SubscriberKey = subscriberKey,
               Attributes = new[] { new ExactTargetTestBAS.Attribute { Name = "storeCode", Value = storeCode } },
               Status = SubscriberStatus.Active,
               Lists = GetList(storeCode),
               CreatedDate = DateTime.Now
           };
       }

       private SubscriberList[] GetList(string storeCode)
       {
           switch (storeCode)
           {
               case "BAS":
                   return ListFrom(2454335, "STORE1 - 927189");
               case "AS":
                   return ListFrom(2458346, "STORE2 - 927297");
               case "BOTC":
                   return ListFrom(2458345, "STORE3 - 927333");
               case "COTC":
                   return ListFrom(2458344, "STORE4 - 927369");
               case "CBA":
                   return ListFrom(2461213, "STORE5 - 927052");
               case "CPF":
                   return ListFrom(2454267, "STORE6 - 927052");
               case "ECP":
                   return ListFrom(2454356, "ECP-APIPurchase - 926359");

           }
           return new SubscriberList[0];
       }

       private static SubscriberList[] ListFrom(int id, string custKey)
       {
           return new[] { new SubscriberList { ID = id, IDSpecified = true, CustomerKey = custKey } };
       }
   }
  • This looks like it is via an SDK (I think this is the Java SDK) - I added the tag, but you might want to provide more details on that aspect inside of the question as it is less a SOAP API question and more related to the SDK functions – Gortonington Mar 17 at 12:44

Your Answer

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

Browse other questions tagged or ask your own question.