Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,9 @@ userReply.setAttachmentUrls(new String[]{"http://www.example.com/attachment.jpg"
System.out.println(MapperSupport.objectMapper().writeValueAsString(userReply));
Conversation.reply("66", userReply);

// run assignment rules
Conversation.runAssignmentRules("19240007891");

// mark conversation as read
Conversation.markAsRead("66");
```
Expand Down
5 changes: 5 additions & 0 deletions intercom-java/src/main/java/io/intercom/api/Conversation.java
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,11 @@ public static AdminMessage create(AdminMessage message) throws InvalidException
return response;
}

public static Conversation runAssignmentRules(String id) {
final HttpClient resource = new HttpClient(UriBuilder.newBuilder().path("conversations").path(id).path("run_assignment_rules").build());
return resource.post(Conversation.class, null);
}

static void validateAdminReplyRequest(AdminReply reply) {

validateMessageType(reply);
Expand Down