Using the Events API (early access)

Have more questions? Submit a request

24 Comments

  • Thomas Verschoren
    Comment actions Permalink

    If the Proporties contain an URL value, is there a way to display a link?

     

    E,g. we have now linked Freshbooks Estimate creations to user tickets.

    Would be useful to embed a link back to the freshbooks item so we can quickly see the invoice.

    I tried doing an HTML escaped href= but that just added text.

    2
  • Charles Nadeau
    Comment actions Permalink

    Hi Thomas, you might also try cross-posting your question in the Events API forum:

    https://develop.zendesk.com/hc/en-us/community/topics/360000030527-Events-API-beta-

     

    0
  • Robin Tang
    Comment actions Permalink

    Hi Thomas,

    I'm assuming you are referring to the Customer Context timeline rendering links, as if you were just using the API you would be able to render it in whichever way you would like it.

     

    Adding a link that is clickable during the hover state is certainly a possibility. I will bring this up with our front end engineer!

    1
  • Thomas Verschoren
    Comment actions Permalink

    An example will make it clearer:

     

    I use the following json to create an Event

    {
    "user_id": "12345",
    "type": "newinvoice",
    "source": "freshbooks",
    "description": "New Invoice 2018/01",
    "created_at": "2018-12-13T17:51:00Z",
    "properties": {
    "amount": "98.74",
    "link": "http://www.domain.com"
    }
    }

    But having the link at least clickable, or replacable with

    {title: "invoice 123", url:"www.domain.com"} would be neat.

    1
  • Sander Verhaeven
    Comment actions Permalink

    Hi,

     

    Would it be possible to show the source of an event in interface? It would be nice if we could set an icon as well.

    {
    "user_id": "11962081749",
    "source": "Akti",
    "type": "Planned_Intervention",
    "created_at": "2018-11-05T22:26:00Z",
    "description": "Plan Intervention"
    "icon":"http://url.to/icon.png"
    }

    would result in 

    2
  • Billy Kong
    Comment actions Permalink

    Hi I am testing this api by using user emails to save an event. On zendesk support user ticket, I cannot see where the event is being displayed. Any help here? The get request returns me a json with the event I saved but I cannot see it on zendesk.

    Thanks

    edit: i see the interactions tab but it is not updating with saved events

    0
  • Bryan - Community Manager
    Comment actions Permalink

    @Thomas, @Sander, @Billy -- Since it looks like you're talking about the new Interaction feature in the agent UI and how it uses event data, I suggest posting issues at Viewing customer context in a ticket. The product managers are monitoring that space more closely and answering feedback regarding this new agent UI feature there.

    For questions related directly to the Events API, then posting on the community area's Events API (beta) page is best.

    0
  • Marlene Hirose
    Comment actions Permalink

    I'm attempting to use: GET /api/cdp/events?user_id={id} using our credentials and such

    And all I get is this: 

    {"id":1020,"reason":"Profile not found"}

    What am I doing wrong?

    0
  • Bryan - Community Manager
    Comment actions Permalink

    Hi Marlene -- if you're following the above example:

    curl 'https://{{subdomain}}.zendesk.com/api/cdp/events?user_id=345&event_type=checkout' \
      -H "Accept: application/json" \
      -v -u {email_address}:{password}

    ... and assuming you're authenticated in correctly and your account has been given permission for this feature (it's an "early access program"/beta feature, so not everyone has access to it), then I'd say you probably need to open a ticket with support@zendesk.com. There are probably things against your account that need to be checked beyond what can be done or shared in a public post.

    0
  • Marlene Hirose
    Comment actions Permalink

    thank you, Bryan. I shall do that

    0
  • Thomas Verschoren
    Comment actions Permalink

    Can you delete an event too?

    0
  • Bryan - Community Manager
    Comment actions Permalink

    Hi Thomas,

    Events are immutable, so they cannot be deleted. The design intent is that you want to create a trail of events that cannot change. If you need to "delete" something, another event would be created to "roll back" that change.

    This is a new feature that's still evolving, so if you have use-cases that you'd like to share, please do!

    0
  • Thomas Verschoren
    Comment actions Permalink

    One scenario would be where the external system mismatched a user due to conflicting account info. (E.g. email and phone but phone is applicable to two users).

    Other scenario would be an error in the external system. Someone changed a status from shipped to delivered by accident resulting in a wrong status update.

    Or, someone could make a typo in an event.. ;-)

    0
  • Bryan - Community Manager
    Comment actions Permalink

    Thanks for taking the time to share Thomas. I'm sure this will be an ongoing topic as this feature is used more and more.

    0
  • Thomas Verschoren
    Comment actions Permalink

    When I try to create an Event via the url: '/api/cdp/track', I can get an update in the timeline by pushing the following code:

    var task = {
    user_id: $("#requester-id").val(),
    type: 'Quick Note',
    source: 'My-App',
    description: 'Test',
    created_at: '',
    properties: {
    Note: 'Some Note',
    Agent: 'Thomas'
    }
    };

    It creates the event TEST correctly in the screenshot below, but also adds a weird profile_attribute_update.

    Where does this come from and can I disable it?

     

    0
  • Matthew Bass
    Comment actions Permalink

    Being able to create clickable links in event properties is a must for us.

    0
  • Bryan - Community Manager
    Comment actions Permalink

    Thanks for the feedback Matthew -- this continues to be brought up to product management from others as well who are exploring this feature.

    0
  • JD
    Comment actions Permalink

    In the Zendesk Relate demo in 2018, all the interactions had nice little icons, how are we able to accomplish this?

     

     

     

    1
  • Bryan - Community Manager
    Comment actions Permalink

    Hi JD. This is definitely a desired feature for others as well. While it was envisioned to be in the product, it hasn't made it yet. That said, the internal planning and design around getting there continues. You're another up-vote to get this into the product sooner than later. If you have any particular use-cases or needs, please post those here as well (ex: clickable links and other embedded behavior needs).

    0
  • Matthew Bass
    Comment actions Permalink

    How does the events API handle multiple conflicting identifiers? As an example, say I want to track an event for a user. I pass 2 identifiers: an email address and an ID:

    {
    "profile": {
    "source": "support",
    "identifiers": {
    "email": "somebody@domain.com",
    "user_id": "13288576734"
    }
    },
    "event": {
    ...
    }
    }

    What happens if the email address and the ID are both actually tied to different users? Will the event be attached to the first user (identified by email) or will the event just not be created?

    I tried this in my sandbox and got an HTTP 202 response which indicates success, however the event didn't get attached to either user. It seems like an error response would be better in this situation.

    0
  • Bryan - Community Manager
    Comment actions Permalink

    Hi Matthew Bass - I'm working on finding out the expected behavior. Since you are essentially submitting a job with this API, you'll get a 202 if the input structure conforms to what's expected (i.e. it will "succeed" with the 202 even if the subsequent job ends up failing). Keep in mind, too, that since this is "early access", behavior may change as well.

    I'll let you know when I get more details for the above scenario.

    0
  • Bryan - Community Manager
    Comment actions Permalink

    Hi Matthew. Noting again, this behavior could change, but the feedback I received is that...

    The conflicting identifiers should result in a failure and throw a 4xx response. There should not be a silent fail and there should not be a background decision that applies the event to a particular/arbitrary profile.

    I let product management know of your case. Has this been consistent for you? If you have any more details, I can pass those along as well. Thanks for raising this.

    0
  • Matthew Bass
    Comment actions Permalink

    Hi Bryan. Yes, I'm consistently getting an HTTP/2 202 response when I call the track event API with conflicting identifiers (an email from one profile and a user ID from another, for example). The event doesn't end up appearing on either profile, but the response is a 202 and not a 4xx.

    I'd be happy to pass along the request I'm using and the response I'm getting if you can put me in touch with someone directly. Thanks for your help.

    0
  • Bryan - Community Manager
    Comment actions Permalink

    See private ticket Matthew Bass. Thanks!

    0

Please sign in to leave a comment.

Powered by Zendesk