NAME
Twilio::Rest::FlexApi::V1::Assessments - The Assessments resource
SYNOPSIS
my $client = Twilio::Rest::Client->new($account_sid, $auth_token);
my $assessments = $client->flex_api->v1->assessments->create($category_sid, $category_name, $segment_id, $agent_id, $offset, $metric_id, $metric_name, $answer_text, $answer_id, $questionnaire_sid, \%options);
for my $assessments ($client->flex_api->v1->assessments->read({}, 20)) {
...
}
$client->flex_api->v1->assessments($assessment_sid)->update($offset, $answer_text, $answer_id, \%options);
DESCRIPTION
This file holds AssessmentsList, AssessmentsPage, AssessmentsContext and AssessmentsInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.
AssessmentsList
Returned by $client->flex_api->v1->assessments. See also Twilio::ListResource.
create
my $assessments = $client->flex_api->v1->assessments->create($category_sid, $category_name, $segment_id, $agent_id, $offset, $metric_id, $metric_name, $answer_text, $answer_id, $questionnaire_sid, \%options);
Add assessments against conversation to dynamo db. Used in assessments screen by user. Users can select the questionnaire and pick up answers for each and every question. Returns a AssessmentsInstance.
The required values are:
$category_sid-
The SID of the category
$category_name-
The name of the category
$segment_id-
Segment Id of the conversation
$agent_id-
The id of the Agent
$offset-
The offset of the conversation.
$metric_id-
The question SID selected for assessment
$metric_name-
The question name of the assessment
$answer_text-
The answer text selected by user
$answer_id-
The id of the answer selected by user
$questionnaire_sid-
Questionnaire SID of the associated question
The options are:
-
The Authorization HTTP request header
read
my @records = $client->flex_api->v1->assessments->read(\%options, $limit, $page_size);
Get assessments done for a conversation by logged in user. Returns the records as a list, fetching as many pages as it needs.
The options are:
-
The Authorization HTTP request header
segment_id-
The id of the segment.
stream
my $stream = $client->flex_api->v1->assessments->stream(\%options, $limit, $page_size);
Takes the same arguments as "read", and returns a Twilio::Stream.
page
my $page = $client->flex_api->v1->assessments->page(\%options, $page_size, $page_token, $page_number);
Fetches one page, and returns a Twilio::Page.
get_page
my $page = $client->flex_api->v1->assessments->get_page($url);
Fetches the page at a URL given by Twilio.
get_context
my $context = $client->flex_api->v1->assessments->get_context($assessment_sid);
Returns a AssessmentsContext, and makes no request.
AssessmentsPage
A Twilio::Page of AssessmentsInstance objects.
records_key
build_instance
Used by Twilio::Page.
AssessmentsContext
Returned by $client->flex_api->v1->assessments($assessment_sid). It makes no request until one of these methods is called.
update
my $assessments = $client->flex_api->v1->assessments($assessment_sid)->update($offset, $answer_text, $answer_id, \%options);
Update a specific Assessment assessed earlier. Returns a AssessmentsInstance.
The required values are:
$offset-
The offset of the conversation
$answer_text-
The answer text selected by user
$answer_id-
The id of the answer selected by user
The options are:
-
The Authorization HTTP request header
AssessmentsInstance
See also Twilio::InstanceResource.
It has update, which work as they do on the context.
Its fields are:
- account_sid
-
The unique SID identifier of the Account.
- agent_id
-
The id of the Agent
- answer_id
-
The id of the answer selected by user
- answer_text
-
The answer text selected by user
- assessment
-
Assessment Details associated with an assessment
- assessment_sid
-
The SID of the assessment
- offset
-
Offset of the conversation
- report
-
The flag indicating if this assessment is part of report
- segment_id
-
Segment Id of conversation
- timestamp
-
No description in the specification.
- url
-
No description in the specification.
- user_email
-
The email id of the user.
- user_name
-
The name of the user.
- weight
-
The weightage given to this comment
CONSTRUCTORS
new
Objects here come from the methods above, so there is no need to call new directly.
LICENSE
Copyright (c) 2026 Francisco Zarabozo. Released under the MIT License.