GithubHelp home page GithubHelp logo

Comments (6)

davidseek avatar davidseek commented on May 19, 2024 8

and who should we poke to get this done?

from intercom-node.

davidseek avatar davidseek commented on May 19, 2024 2

Is there any new development on that? It has been 1yr+ and we're right now in the need of a fix for that.

from intercom-node.

kant01ne avatar kant01ne commented on May 19, 2024

when creating an admin initiated message from the API like in the example below you are not actually creating a conversation but a message. The id (id: '106118468' in the example below) refers to the message which explains why you are getting a 404 when trying to fetch/reply to a conversation using this message_id.

var message = {
  message_type: "email",
  subject: "Hey",
  body: "Ponies, cute small horses or something more sinister?",
  template: "plain",
  from: {
    type: "admin",
    id: "343616"
  },
  to: {
    type: "user",
    id: "588a21cc7b1ed4f39f0bf2dd"
  }
}

client.messages.create(message, callback);

returns:

body: 
   { type: 'admin_message',
     id: '106118468',
     created_at: 1496756108,
     subject: 'Hey',
     body: 'Ponies, cute small horses or something more sinister?',
     template: 'plain',
     message_type: 'email',
     owner: 
      { type: 'admin',
        id: '343616',
        name: 'Kevin Antoine',
        email: '[email protected]',
        avatar: [Object] } },

The reason why we do not return the conversation_id is that a conversation is not always created when a message is created. This is a limitation of our Engage product that allows sending messages from an admin to X-users. It wouldn't make sense to create a conversation for each outbound messages sent.

A conversation is created only for user-initiated messages. In this case, your workaround using /last/reply is a good workaround/hack. We are going to look into how we can return the conversation_id from the API in this case but I can't give an ETA right now.

from intercom-node.

Jolg42 avatar Jolg42 commented on May 19, 2024

Hi @Skaelv
Great! This would be better than the current hack :)

from intercom-node.

kant01ne avatar kant01ne commented on May 19, 2024

This is in our backlog for API improvement. I'll close this one as this is related to our API and not specific to intercom-node.
Thanks for reporting this @Jolg42

from intercom-node.

illyavorobets avatar illyavorobets commented on May 19, 2024

any updates with it?

from intercom-node.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.