Skip to content

Commit

Permalink
Merge branch 'master' of github.com:sendbird/SendBird-Desk-iOS-Framework
Browse files Browse the repository at this point in the history
  • Loading branch information
tezpark committed Jan 3, 2020
2 parents 3625f66 + 649f480 commit 6ef9571
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
}
Expand Down Expand Up @@ -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.
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.

0 comments on commit 6ef9571

Please sign in to comment.