creating custom event through my app server?

Hi All,

 

I am able create custom event through UAirship SDK in my app.
I want create custom events through my app server.

Scenario:

Basically when things happen in my app server i.e, suppose event is generated.
Based on that, I want to send notification to targeted audience.

How can I achieve above scenario through urban airship?
Is there any posible to create the custom events through my app server and database?

Didn't find what you were looking for?

New post

Comments

8 comments

  • It is now possible to create Custom Events through Urban Airship that occur outside of an app. More information about this can be found here: http://docs.urbanairship.com/api/ua.html#server-side-custom-events

    Comment actions Permalink
  • Hi Chnakaya,

    At this time, creating Custom Events through an API( Your App Server) is not possible.

    You will need to create those Custom Events within the app.

    Related to the scenario you described, you can now set up Automation Messages to be triggered to be sent to a user based on the detection of a Custom Event. So, instead of your servers handling this, Urban Airship will handle it.

    If Automation is not currently a part of your plan, you will be unable to utilize this feature. Otherwise, your best bet would be to add in identifiers into your Custom Events so you know what user is triggering the event, and use that information on your server-side to send a push to that user.

    Comment actions Permalink
    0
  • Hi Chnakaya,

    I would like to trigger custom events through app. Can we use this feature in our app?

    I am getting server error in the API.

     

    Thanks,
    Jignesh

    Comment actions Permalink
    0
  • Jignesh,

    Can we see the request you sent as well as the response you received? Are you trying to send these via the SDK or via the API?

    Comment actions Permalink
    0
  • Hi 

    body:
    {
    "user": {
    "ios_channel": "be59bcdb-ada5-4993-9101-d727683416bf"
    },
    "body": {
    "name": "purchased"
    }
    }

    response: 
    {
    "ok": false,
    "operationId": "b0a2940e-31d2-4716-9934-764b67f4124b",
    "error": "server error",
    "failed": [
    "{\n \"user\": {\n \"ios_channel\": \"be59bcdb-ada5-4993-9101-d727683416bf\"\n },\n \"body\": {\n \"name\": \"purchased\"\n }\n}"
    ]
    }

    Comment actions Permalink
    0
  • Jignesh,

    For debugging purposes, does sending this payload work at all?

     

    {
    "occurred": "2018-07-29T02:31:22",
    "user": {
    "ios_channel": "be59bcdb-ada5-4993-9101-d727683416bf"
    },
    "body": {
    "name": "purchased",
    "value": 120.49,
    "transaction": "886f53d4-3e0f-46d7-930e-c2792dac6e0a",
    "interaction_id": "your.store/us/en_us/pd/shoe/pid-11046546/pgid-10978234",
    "interaction_type": "url",
    "properties": {
    "category": "mens shoes",
    "id": "pid-11046546",
    "description": "sky high",
    "brand": "victory"
    },
    "session_id": "22404b07-3f8f-4e42-a4ff-a996c18fa9f1"
    }
    }

    Comment actions Permalink
    0
  • This is the response however its not showing up in the dashboard UI.

    {

      "ok": true,
      "operationId": "f5aa7d9f-3c7e-4250-91e6-fc791481d4d7"

    Comment actions Permalink
    0
  • Jignesh,

    Make sure that when you're looking at the Event Tracking page in the UI, that you set the appropriate time frame for how long in the past you want to get data for Custom Events.

    By default, the time frame looks at the last 7 days.

    In the payload I sent, the occurred date for that Custom Event was 2018-07-29, so you'll want to set the time frame further back than 7 days to be able to see that purchase event. So, you should see that that event occurred on the 29th of July.

    Comment actions Permalink
    0

Please sign in to leave a comment.