Update Tag Information via API

Hi,

I'm looking to update tag information via the UI API by Named User. The update will be coming from a web service written in .Net that reads from our website database.

I need to "sync" extra information into the customers UI record/tags to enable accurate push segmentation.

Can anyone point me in the right direction? Especially in respect of .Net examples I can't find any.

Neil

Didn't find what you were looking for?

New post

Comments

18 comments

  • Hi Neil,

    At this time, we do not have any example .NET examples for how to update tags on a Named User using the API.

    However, what you can do is follow the API documentation for Modifying Tags on a Named User.

    Using that information, your .NET code can make an HTTP Web Request (Just as you would a cURL request) to submit data to that API endpoint to change tags for a particular user.

    Let me know if that helps!

    0
  • Hi Michael!

    I've spent all day reading up on this and realised that's what I now need to do!

    I've created a new tag group for our CMS so now I just need to work out how to add/update via the Named User endpoint. I need to check if the Named User is there and then call an update if they exist or an add if they don't.

    I'm just not sure how to even connect to the API, without any .Net examples at all this is going to be really difficult!

     

     

    Neil

    0
  • Neil,

    It's not too hard. I have attached an example push request I made using the HTTPWebRequest class. You would probably need to do something similar with the Named User endpoint.

    0
  • OK thanks for the help Michael! I'll see how far I can get!

    Neil

    0
  • No problem!

    0
  • Hi Michael,

    Great news I think I've cracked it! just a couple of questions and I think I can try this out in the live environment:

    1) If I have 3 server tags (in a tag group called "kps") and I write "add: VALUE1, VALUE2, VALUE3", then I run the same statement again, i.e. "add", what exactly happens? Do the initial tags get updated/overwritten? Just want to be clear on how to update tags, I'm assuming I only ever need to call "remove" or "add"?

    2) The really scary part of sending the push is not knowing how many and exactly who will receive the push. Is there any way in the UA interface or in the API to see exactly who is in your segment *before* sending?! Otherwise I think we might have a heart attack in the near future. We have customers we absolutely must exclude based on server tags, i.e. people on trial memberships. Mass email systems, e.g. MailChimp always let you preview your audience before committing to sending, this seems a glaring oversight in the UA interface, unless I'm missing something?

    Thanks in advance for your help!

    Neil

    0
  • Neil,

    1) If those three tags in the tag group "kps" already exist in the tag group or on a device, then that additional add command is treated as a no-op. That is, since it already exists, it won't do anything. There are three commands you can use: add will add a new tags to the device/tag group that does not already exists. If it exists, it won't perform any add operation for that tag. Remove will, obviously, remove the tags you want to remove. Set is a command that will allow you to add/overwrite any existing tags on that tag group or device. It's kind of like an add command, but will overwrite any existing tags.

     

    2) Generally we recommend testing in your development environment with the same tags set up, that way you're not testing in a live environment. There is a segment estimator that is visible to Enterprise customers in the UA interface, which can be flipped on if it's not already.

    Otherwise, for an API integration, you might get a full Channel ID listing to see what tags are currently on your users devices and do some filtering based off of that data to find how many users you would potentially reach.

     

    0
  • OK Michael, thanks for the great support that all makes sense. We don't have the enterprise version but we may end up there if this all goes well.

    The only thing missing now is I can't see my "kps" server tag group/tags anywhere in the device lookup results screen. Someone else is looking into it but it may well be a bug? If you look at "Named User" = "76198" in our Dev environment (see attached) there is no sign of them although I know there are tags there.

     

    Neil

     

    0
  • Sorry that is actually "Named User" 1 but you get the idea!

    0
  • Neil,

    Hmm....your tag groups should show up in that list. Can you see if tag groups are set up elsewhere in the dashboard? Also, could you let me know how you're setting up the tag groups?

    0
  • Yeah it's strange. I'm just not comfortable sending until I can see the tags on that screen TBH.

    See attached images. I've followed the online documentation to the letter. One shows the tag group setup, which I did in the "Integration Options" section. The next shows how I setup the segment using the new "kps" tag group. Then the last one shows how I setup the test push, also revealing that the tags are there for selection. I'd done an API update to send the tags "1POUNDTRIAL", "FBSPECIAL" and "MONTHLY" up to Named User 1 and Named User 76198 I think. My plan is to get this fully tested with the 2 users (myself and a colleague) then update 40000+ customers and fire away to a subset.

    If we can figure out why they are not there or how to get them to display I'll be a happy bunny!

    Thanks for your help.

    Neil

    0
  • Neil,

    Do you happen to know which App Key you're testing with right now?

    I can see those tags added properly to Named User ID 76198 and Named User ID 1 on our end. (Associated to iOS Channel ID: 

    e8b158d1-9134-4f66-aab1-064711c509f5 and Android Channel ID: 7ea18091-bddd-4476-8790-61d3a0347868 respectfully). I saw those on the Development app at least.

    0
  • Michael,

    I've setup and uploaded via the API to both development (LVuJi6bcRdaMwJp6hjNJZg) and live (Bp6F0SEKR_yx7TzVythIwQ) environments.

    Still can't see the tags anywhere, but they are there - Duncan Metcalfe from UA confirmed he could see them. He also wasn't sure why they weren't appearing. This is what he could see using your internal tools:

    App Key: Bp6F0SEKR_yx7TzVythIwQ, Named User Id: 1, Platform: android, Device Id: e73e93f9-9ff7-403e-b4ed-a05b1550bbda, Tag Group: kps, Tags: ['MONTHLY','FBSPECIAL','1POUNDTRIAL'], Created: 2016-07-14 11:11:30.039000, Last Modified: 2016-07-27 11:50:28.169000

    Neil

    0
  • Neil,

    Might be a bug on our end then. Myself and Duncan have created a ticket for our Engineering team to look into it and see if they can't do something about it.

    I'll respond and let you know once I hear from them!

    0
  • Fantastic thanks for all your help Michael!

    0
  • Neil,

    We had some conversations with our Engineering team, and it turns out that we only show the tags and tags group for Channel IDs in the dashboard. We have not built out the functionality yet for displaying the tags and tag groups for a Named User.

    Although, I've been told that that is coming. Unfortunately, for right now, it only exists to be seen via API calls to get the Named User info.

    0
  • OK is there a timescale on this?

    The only way I can test/verify will be to code my own Named User API calls into our CMS which will take quite a bit of work!

    Neil
    0
  • Neil,

    Unfortunately I don't have a timeline for it at the moment. It does seem like one of our Engineers is working on it though, so it may be soon that you should be able to see it in the dashboard. We'll definitely keep you informed when it comes out though!

    0

Please sign in to leave a comment.