Creating Events with OWNER_USER_ID

Hello!

we are trying to create bunch of Events over API, but it looks like Insightly API does not honor OWNER_USER_ID that we provide. Instead, it uses the authenticated user (by the API key) and sets it as an owner.

Could you help us solve this? We can provide information regarding this issue privately if needed.

Thanks!

0

Comments

10 comments
  • Official comment

    Hello, thanks for the email. Unfortunately the API sets the OWNER_USER_ID based on the API key used at the time of the request (this is by design), but we are working on advanced permissions in the web app and the API, so we are looking at ways to make these sorts of tasks easier. I can't commit to a particular option at this time, but we are looking into this. Thanks again for using Insightly.

    Brian McConnell

    Insightly Engineering Team

    Comment actions Permalink
  • I realize I'm way late to this post, but I'm having the same issue: the API uses the provided value for ASSIGNED_BY_USER_ID but ignores the value passed in for OWNER_USER_ID. Has this always been the behavior of the API? We have had code in place for a while now that dynamically creates and assigns tasks using the API and I'm fairly certain that we were able to set our own OWNER_USER_ID at one point. Regardless, is there any chance this will be altered in the future so that we can use the API to assign tasks on behalf of other users?

    0
    Comment actions Permalink
  • The Owner of records created via the API has always been the user of the API key being used to make the calls, by design.

    0
    Comment actions Permalink
  • Hi asawyer,

    If you wan't to assign Tasks to someone via the API, the correct way to do it would be to set the RESPONSIBLE_USER_ID field.

    0
    Comment actions Permalink
  • Thanks, Anthony and Patrick. What we have is a web form that our account managers can submit which uses the API to automatically create a task for another member of the company. We are successfully using the RESPONSIBLE_USER_ID to set the assignee, but in an ideal world, we would be able to set the account manager as the creator of the task; or at least have them show up in Insightly next to "Task Created By." We've managed to work around this by putting the name of the account manager in the Task Notes field.

    Quick question: what's the difference between ASSIGNED_BY_USER_ID and OWNER_USER_ID? With our current setup, I am able to successfully populate the ASSIGNED_BY_USER_ID field with the Insightly ID of the account manager, but that doesn't seem to have any impact on the task. 

    0
    Comment actions Permalink
  • Hi asawyer,

    ASSIGNED_BY_USER_ID could be someone else than the Owner/Creator of the Task, e.g. an admin who has access to all tasks could go in and assign it. When ASSIGNED_BY_USER_ID is set, the name of that user is shown in the Task list as a highlighted badge as well as in the details screen as a banner at the very top emphasizing that it was assigned to you. Furthermore ASSIGNED_BY_USER_ID can also be used in report filtering.

    0
    Comment actions Permalink
  • For some reason, I'm not seeing that on my end. I don't mean to be difficult; I simply want to understand how everything works. 

    Here's a screenshot of my API task POST: https://www.dropbox.com/s/q7ns0l5mjvftaxy/post-man-POST-task.png?dl=0

    Here's a screenshot of my API GET for the aforementioned task: https://www.dropbox.com/s/t7ds685uthclix7/post-man-GET-task.png?dl=0

    Here's my Insightly task list: https://www.dropbox.com/s/23rq6gfgi2z43ex/task-list.png?dl=0

    Here's the task details page: https://www.dropbox.com/s/pgvk81b2kplqnft/task-details.png?dl=0

    I was able to see the effects of the ASSIGNED_BY_USER_ID in the reporting area, but all I see elsewhere is the OWNER_USER_ID and the RESPONSIBLE_USER_ID (both me in this case). Am I misunderstanding something?

    Again, thanks for the insights thus far. 

    0
    Comment actions Permalink
  • Hi asawyer, 

    Since OWNER_USER_ID and RESPONSIBLE_USER_ID are the same the Task was effectively not assigned and ASSIGNED_BY_USER_ID is ignored. If you're using your API key for all Task creations, anything assigned to yourself will not show up as assigned in the UI. A workaround would be to use a User's API key that will never get tasks assigned to him/her-self to make the badges and banners to show up.

    0
    Comment actions Permalink
  • Got it. Thanks for all the help!

    0
    Comment actions Permalink
  • You're welcome asawyer, glad to be of help!

    0
    Comment actions Permalink

Please sign in to leave a comment.