Skip to content

Commit dd8ece4

Browse files
thewheatchoran
authored andcommitted
Support running assignment rules (#243)
1 parent dc7adbc commit dd8ece4

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -585,6 +585,9 @@ userReply.setAttachmentUrls(new String[]{"http://www.example.com/attachment.jpg"
585585
System.out.println(MapperSupport.objectMapper().writeValueAsString(userReply));
586586
Conversation.reply("66", userReply);
587587

588+
// run assignment rules
589+
Conversation.runAssignmentRules("19240007891");
590+
588591
// mark conversation as read
589592
Conversation.markAsRead("66");
590593
```

intercom-java/src/main/java/io/intercom/api/Conversation.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,11 @@ public static AdminMessage create(AdminMessage message) throws InvalidException
134134
return response;
135135
}
136136

137+
public static Conversation runAssignmentRules(String id) {
138+
final HttpClient resource = new HttpClient(UriBuilder.newBuilder().path("conversations").path(id).path("run_assignment_rules").build());
139+
return resource.post(Conversation.class, null);
140+
}
141+
137142
static void validateAdminReplyRequest(AdminReply reply) {
138143

139144
validateMessageType(reply);

0 commit comments

Comments
 (0)