2

I'm using the SFMC (soap) API in an application which automatically generates AmpScript for dynamic content. In order to allow the user to set up their dynamic content in my app (ready for SFMC) I'd like to find out distinct values for values in the attributes of subscribers. I've seen that I can get the Profile Attributes easily enough but the only way I can see to find the values is to fetch all of the subscribers (2500 at a time) to see what the values are. This seems like an inefficient approach, is there a better way?

1

If you're dealing with an Enterprise 2.0 account, you can write a Query Activity that selects distinct column values in _EnterpriseAttribute (one of the System Data Views). The Query Activity can be part of an Automation that refreshes the data on an interval.

Once the Data Extension is populated, you can retrieve the rows (DataExtensionObject) via API.

4
  • If I can I'd rather not add extra things to the customer's account, are there any other possible approaches? – Will Jun 6 '16 at 17:50
  • It's not a bunch of extra things. It's one Data Extension, one Query Activity and a single Automation. – Adam Spriggs Jun 9 '16 at 13:15
  • I'd like to do as much of this as possible using the API, can a Query Activity and Automation be created using the API? or is it a case of going into the customer's account to set this up? – Will Jun 15 '16 at 17:52
  • You can create the Query Activity and the DE with the API, but not the Automation. You can execute an Automation via API. – Adam Spriggs Jul 12 '16 at 14:15

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.