Chat#

ArticleFields()#

Returns common article fields for a Chat article.

my %ArticleFields = $LayoutObject->ArticleFields(
    TicketID  => 123,   # (required)
    ArticleID => 123,   # (required)
);

Returns:

%ArticleFields = (
    Sender => {                     # mandatory
        Label => 'Sender',
        Value => 'John Doe',
        Prio  => 100,
    },
    Subject => {                    # mandatory
        Label => 'Subject',
        Value => 'Article subject',
        Prio  => 200,
    },
    ...
);

ArticlePreview()#

Returns article preview for a Chat article.

$LayoutObject->ArticlePreview(
    TicketID   => 123,     # (required)
    ArticleID  => 123,     # (required)
    ResultType => 'plain', # (optional) plain|HTML. Default HTML.
    MaxLength  => 50,      # (optional) performs trimming (for plain result only)
);

Returns article preview in scalar form:

$ArticlePreview = 'John Doe [2017-06-08 15:46:51] Hello, world!';

ArticleCustomerRecipientsGet()#

Get customer users from an article to use as recipients.

my @CustomerUserIDs = $LayoutObject->ArticleCustomerRecipientsGet(
    TicketID  => 123,     # (required)
    ArticleID => 123,     # (required)
);

Returns array of customer user IDs who should receive a message:

@CustomerUserIDs = (
    'customer-1',
    'customer-2',
    ...
);