intercom-node icon indicating copy to clipboard operation
intercom-node copied to clipboard

Wrong request URL when conversation is assigned with "withRunningAssignmentRules" parameter

Open feelbadinc opened this issue 1 year ago • 0 comments

Why?

The withRunningAssignmentRules parameter is supposed to append /run_assignment_rules to the URL but instead it appends /run_assignment_rules/parts. The API is throwing the 404 error when you attempt to send a request to this URL.

Intercom API doc article for the reference: https://developers.intercom.com/docs/references/rest-api/api.intercom.io/Conversations/autoAssignConversation/

How?

In original code, the /parts string is being appended to the URL no matter the value of withRunningAssignmentRules variable. I moved the /parts string into the ternary expression so now it's appended only when withRunningAssignmentRules is false or undefined.

feelbadinc avatar Apr 22 '24 14:04 feelbadinc