From 649f4808ff8795bfed05deaf4280a78d3e4ec20c Mon Sep 17 00:00:00 2001 From: Tez Park Date: Sat, 4 Jan 2020 04:09:49 +0900 Subject: [PATCH] Update README.md --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index fd8737f..1d1255f 100644 --- a/README.md +++ b/README.md @@ -163,14 +163,14 @@ Please notice that only after customers sending at least one message to the tick > To create a ticket, you can use `createTicketWithTitle:userName:groupKey:customField:completionHandler:` method. The `groupKey` and `customField` could be evaluated when a ticket is created though it's used only in Dashboard currently. `groupKey` is the key of an agent group so that the ticket is assigned to the agents in that group. `customField` holds customizable data for the individual ticket. ## Setting Ticket customFields -Ticket information could be kept in `customFields`. `setTicketWithTicketId:customFields:completionHandler:` in `SBDSKTicket` lets the SDK set the `customFields` of the current customer. The `customFields` columns should be defined in SendBird Dashboard beforehand. Otherwise, the setting would be ignored. +Ticket information could be kept in `customFields`. `setCustomFields:completionHandler:` in `SBDSKTicket` lets the SDK set the `customFields` of the current customer. The `customFields` columns should be defined in SendBird Dashboard beforehand. Otherwise, the setting would be ignored. ```obj-c -NSDictionary *customerCustomFields = @{ - @"gender": @"male", - @"age": @"20", - }; +NSDictionary *ticketCustomFields = @{ + @"gender": @"male", + @"age": @"20", + }; -[ticket setCustomFields:setCustomerCustomFields:customerCustomFields completionHandler:^(SBDError * _Nullable error) { +[ticket setCustomFields:ticketCustomFields completionHandler:^(SBDError * _Nullable error) { if (error != nil) { // Error handling. } @@ -346,4 +346,4 @@ Its `UserMessage.getData()` has the following format: } ``` Therefore, when this type of message is received on `channel:didReceiveMessage:` delegate of `SBDChannelDelegate` or `getPreviousMessagesByTimestamp:limit:reverse:messageType:customType:completionHandler:` of channel, you can parse the data and use it for URL preview rendering. -Also if you extract URL information from customers text, build above JSON, stringify it and then send it as custom data by `sendUserMessage:` of channel, agents can also see URL preview. \ No newline at end of file +Also if you extract URL information from customers text, build above JSON, stringify it and then send it as custom data by `sendUserMessage:` of channel, agents can also see URL preview.