Silverpop / engage-api-client

Engage API Client Code
Apache License 2.0
13 stars 24 forks source link

SYNC_FIELDS Support #53

Open jasondpq opened 8 years ago

jasondpq commented 8 years ago

HI,

i am digging into the silverpop api and have just learned about the update_if_found and sync_fields flag of the addrecipient command.

is this supported? they are telling us that using a non keyed database is preferable when combing sms and email into a single DB. In order to update an existing record I went the easy route and set the UPDATE_IF_FOUND flag to true. one of the dbs i was writing to had no unique key set up and i got an error saying i needed to use SYNC_FIELDS on databases with no unique key if the UPDATE_IF_FOUND flag is set.

i don't see support for that here https://github.com/Silverpop/engage-api-client/blob/master/src/main/java/com/silverpop/api/client/command/AddRecipientCommand.java

our support rep sent over the following `

85628 2 EMAIL somebody@domain.com Customer Id 123-45-6789 Email somebody@domain.com ``
jasondpq commented 8 years ago

Does anyone have any ideas on this? i am starting to look at how i can implement and could use a little guidance :)

smitchelus commented 8 years ago

Hi Jason, I don't have anyone available right now to add this, but we would certainly accept a pull request if you wanted to give it a try. It really wouldn't be complicated. You'd need a new SyncField class in the elements package modeled after the existing Column class, and then a new sync fields list instance variable in the AddRecipientCommand class using that new SyncField class. Then just setter/getter methods and I think that should do the trick.

jasondpq commented 8 years ago

ok. I will see if i can put some time to this.