QueryJobsWithResult

Updated at:

Queries tasks based on task results.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

outboundbot:QueryJobsWithResult

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

PageNumber

integer

No

The page number.

Important This parameter is required.

1

PageSize

integer

No

The page size.

Important This parameter is required.

10

JobGroupId

string

Yes

The ID of the job group.

ad16fc35-d824-4102-a606-2be51c1aa6dd

QueryText

string

No

The search content. You can search by phone number.

1882020****

JobStatusFilter

string

No

The job status filter. Valid values:

  • Scheduling: scheduling

  • Executing: executing

  • Succeeded: finished and reached

  • Paused: paused

  • Failed: finished but not reached

  • Cancelled: cancelled due to manual intervention

Succeeded

HasAnsweredFilter

boolean

No

Specifies whether the call is answered.

true

HasHangUpByRejectionFilter

boolean

No

Specifies whether the call is hung up due to rejection.

false

HasReachedEndOfFlowFilter

boolean

No

Specifies whether the flow is completed.

true

InstanceId

string

Yes

The instance ID.

9d53cd72-4050-4419-8c17-acc0bf158147

TaskStatusFilter

string

No

The call status. Multiple values are separated by commas. Example: ["Executing","Succeeded"]. Valid values: (Note: The Succeeded status is subdivided into specific causes. The Succeeded: 1 (answered) status is not displayed. All subsequent returned values are specific subdivided cause types.)

  • Executing: 0 (dialing)

  • Succeeded: 1 (answered)

  • NoAnswer: 2 (not answered - no answer)

  • NotExist: 3 (not answered - nonexistent number)

  • Busy: 4 (not answered - busy)

  • Cancelled: 5 (not called - task stopped)

  • Failed: 6 (failed)

  • NotConnected: 7 (not answered - unreachable)

  • PoweredOff: 8 (not answered - powered off)

  • OutOfService: 9 (not answered - callee suspended)

  • InArrears: 10 (not answered - callee overdue payment)

  • EmptyNumber: 11 (not called - nonexistent number not called)

  • PerDayCallCountLimit: 12 (not called - daily limit exceeded)

  • ContactBlockList: 13 (not called - blacklist)

  • CallerNotRegistered: 14 (not called - caller number not registered)

  • Terminated: 15 (not called - terminated)

  • VerificationCancelled: 16 (not called - cancelled due to pre-call verification failure)

  • OutOfServiceNoCall: 17 (not called - callee suspended and not called)

  • InArrearsNoCall: 18 (not called - callee overdue payment and not called)

  • CallingNumberNotExist: 19 (not called - caller number does not exist)

  • SucceededFinish: 20 (answered - normally completed)

  • SucceededChatbotHangUpAfterNoAnswer: 21 (answered - robot hangs up after rejection)

  • SucceededChatbotHangUpAfterSilence: 22 (answered - hangs up due to silence timeout)

  • SucceededClientHangUpAfterNoAnswer: 23 (answered - user hangs up after rejection)

  • SucceededClientHangUp: 24 (answered - user hangs up without reason)

  • SucceededTransferByIntent: 25 (answered - transferred to agent due to intent match)

  • SucceededTransferAfterNoAnswer: 26 (answered - transferred to agent after rejection)

  • SucceededInoInterAction: 27 (answered - no interaction from user)

  • SucceededError: 28 (answered - interrupted by system exception)

  • SucceededSpecialInterceptVoiceAssistant: 29 (answered - special case interception - voice assistant)

  • SucceededSpecialInterceptExtensionNumberTransfer: 30 (answered - special case interception - extension number transfer)

  • SucceededSpecialInterceptCustomSpecialIntercept: 31 (answered - special case interception - custom interception)

  • HighRiskSipCode: 32 (not called - high risk and not called)

["Executing"]

JobFailureReasonsFilter

string

No

The list of job failure reasons.

Valid values:

  • NoAnswer :

    No answer.

  • PerDayCallCountLimit :

    Daily call count limit for the number.

  • InArrears :

    Overdue payment.

  • OutOfService :

    Suspended.

  • NoStrategy :

    Strategy is empty or not found.

  • EmptyNumber :

    Nonexistent number not called.

  • JobPerDayCallCountLimit :

    Daily call count limit for the number.

  • NoneRepeatableJobMaxAttemptCountLimit :

    Maximum number of task attempts. This takes effect when RepeatBy(@see ) is set to None.

  • ContactSuspended :

    Call stopped.

  • VerificationCancelled :

    Cancelled due to pre-call verification failure.

  • Unknown :

    Unknown error.

  • InvalidStrategy :

    Invalid strategy. The strategy configuration is incorrect.

  • TimeUp :

    Timeout during scheduling.

  • CallFailed :

    Call failed.

  • ContactBlockList :

    Outbound call blacklist.

["NoAnswer"]

StartActualTimeFilter

integer

No

The filter condition for the call start time.

1579055782000

EndActualTimeFilter

integer

No

The filter condition for the call end time.

1579055783000

LabelsJson

array

No

The filter condition for call labels.

Note

This condition can only filter by labels that are configured with specific enumerated label values, which means labels configured with specific label values in large language model scenarios.

string

No

The labels to be filtered and their corresponding label values.

Note

Filters all calls with specific labels and their corresponding specific label values. Example: {"ValueList":["Satisfied","Unsatisfied"],"Name":"IsSatisfied"} indicates filtering the call information where the label value corresponding to the "IsSatisfied" label is "Satisfied" or "Unsatisfied" in all calls.

{ "ValueList": [ "Satisfied", "Unsatisfied" ], "Name": "IsSatisfied" }

Response elements

Element

Type

Description

Example

object

The response object.

HttpStatusCode

integer

The HTTP status code.

200

Code

string

Code

OK

Message

string

The message returned by the API operation.

Success

RequestId

string

The request ID.

9bdaa1d1-a036-4451-ab11-ca0373679091

Success

boolean

Indicates whether the request is successful.

true

VariableNames

array

The names of the tags to be collected.

string

The full set of tag keys.

Is connected

Jobs

object

The jobs.

PageNumber

integer

The page number.

1

PageSize

integer

The number of entries per page.

10

PageCount

integer

The total number of pages.

1

RowCount

integer

The total number of entries.

1

List

array<object>

The list of jobs.

array<object>

The job object.

Status

string

The job status. Valid values:

  • Scheduling(0, "Scheduling")

  • Executing(1, "Executing")

  • Succeeded(2, "Completed - Reached")

  • Paused(3, "Paused")

  • Failed(4, "Completed - Not reached")

  • Cancelled(5, "Canceled - Manual intervention")

  • Drafted(6, "Draft")

Succeeded

StatusName

string

The name of the job status.

Completed - Reached

JobFailureReason

string

The reason for the job failure.

- Unknown (Unknown error) - NoAnswer (No answer) - InvalidStrategy (Invalid strategy, incorrect strategy configuration) - TimeUp (Timeout during scheduling) - NoStrategy (Strategy is empty or not found) - CallFailed (Call failed) - PerDayCallCountLimit (Daily call count limit for the phone number) - ContactBlockList (Outbound call blocklist) - EmptyNumber (Nonexistent number, no outbound calls) - JobPerDayCallCountLimit (Daily call count limit for the phone number) - VerificationCancelled (Canceled due to pre-call verification failure) - ContactSuspended (Call suspended) - InArrears (Overdue payment) - OutOfService (Service suspended) - NoneRepeatableJobMaxAttemptCountLimit (Maximum attempt count for the job, effective when RepeatBy is None)

Id

string

The job ID.

cc231a1d-3c05-4739-8926-193ecf4097ba

LatestTask

object

The latest call.

Status

string

The call status.

Succeeded

TaskEndReason

string

The call result.

FINISHED

HasAnswered

boolean

Indicates whether the call is answered.

true

CallDuration

integer

The call duration.

40000

HasReachedEndOfFlow

boolean

Specifies whether the flow is completed.

true

StatusName

string

The name of the call status.

Not dialed - Exceeded daily limit

CallTime

integer

The call time. The value is a UNIX timestamp in milliseconds.

1615363297000

CallDurationDisplay

string

The call duration.

40

HasHangUpByRejection

boolean

Specifies whether the call is hung up due to rejection.

false

Extras

array<object>

The names of the tags to be collected.

object

The pass-through parameter object.

Key

string

The tag key.

Is connected

Value

string

The tag value.

Yes

TagHits

array<object>

The tag hit information. This field is returned for the legacy canvas.

object

The tag hit object. This field is returned for the legacy canvas.

TagName

string

The tag name.

Kitten,Kitten

TagGroup

string

The tag group to which the tag belongs.

Animal

Contact

object

The contact.

Round

integer

The conversation round.

151

JobUuid

string

The job ID.

cc231a1d-3c05-4739-8926-193ecf4097ba

PreferredPhoneNumber

string

The phone number specified by the callee during the conversation. If this field is specified, the system calls this number. This is a custom field passed in JSON format when you call the API operation to execute the outbound call task.

134123****

PhoneNumber

string

The phone number of the contact.

1882020****

State

string

The status of the contact, such as Available, WrongNumber, or DoesNotExist. This is a custom field passed in JSON format when you call the API operation to execute the outbound call task.

Available

Honorific

string

The honorific of the contact. If this field is not specified, the default value is the same as the name. This is a custom field passed in JSON format when you call the API operation to execute the outbound call task.

Mr. Zhang

Name

string

The name of the contact, such as Zhang San.

Zhang San

Role

string

The role of the contact in the outbound call business. If this field is not specified, roles are not distinguished. For example, in debt collection, contact roles can be borrower, co-borrower, or guarantor. This is a custom field passed in JSON format when you call the API operation.

Borrower

Id

string

The contact ID. A unique identifier generated by the system when the outbound call list is uploaded.

63860deb-6218-45df-b1e0-76f2b166e790

ReferenceId

string

The custom contact ID uploaded by the customer. This ID must be provided by the business side to avoid duplicate names.

C01

HasLastPlaybackCompleted

boolean

Indicates whether the playback is completed when the call is hung up.

true

DialExceptionCodes

array<object>

The call exception codes.

object

The call exception codes.

Code

string

The error code.

0

Hint

string

The error message.

None

HangUpDirection

string

The party that hung up the call.

Callee

VoiceName

string

The name of the voice used in the call.

Labels

array<object>

The tag information that can be used as filter conditions. This field displays all tags with enumeration values in the task group.

object

The tag object.

Name

string

The tag name.

Is satisfied

ValueList

array

The list of tag values.

string

The tag value.

["No","Yes"]

Examples

Success response

JSON format

{
  "HttpStatusCode": 200,
  "Code": "OK",
  "Message": "Success",
  "RequestId": "9bdaa1d1-a036-4451-ab11-ca0373679091",
  "Success": true,
  "VariableNames": [
    "Whether connected"
  ],
  "Jobs": {
    "PageNumber": 1,
    "PageSize": 10,
    "PageCount": 1,
    "RowCount": 1,
    "List": [
      {
        "Status": "Succeeded",
        "StatusName": "Ended-Reached",
        "JobFailureReason": "- Unknown (unknown error)\n- NoAnswer (no answer)\n- InvalidStrategy (invalid strategy, incorrect strategy configuration)\n- TimeUp (timeout detected during scheduling)\n- NoStrategy (strategy is empty or not found)\n- CallFailed (call failed)\n- PerDayCallCountLimit (daily call count limit per number)\n- ContactBlockList (blocked from outbound calls)\n- EmptyNumber (nonexistent number, no further outbound calls)\n- JobPerDayCallCountLimit (daily call count limit per number)\n- VerificationCancelled (pre-call verification failed, call cancelled)\n- ContactSuspended (call suspended)\n- InArrears (overdue payment)\n- OutOfService (out of service)\n- NoneRepeatableJobMaxAttemptCountLimit (maximum attempt count for the task, takes effect when RepeatBy (@see) is None)",
        "Id": "cc231a1d-3c05-4739-8926-193ecf4097ba",
        "LatestTask": {
          "Status": "Succeeded",
          "TaskEndReason": "FINISHED",
          "HasAnswered": true,
          "CallDuration": 40000,
          "HasReachedEndOfFlow": true,
          "StatusName": "Not dialed-Exceeded daily limit",
          "CallTime": 1615363297000,
          "CallDurationDisplay": "40",
          "HasHangUpByRejection": false,
          "Extras": [
            {
              "Key": "Whether connected",
              "Value": "Yes"
            }
          ],
          "TagHits": [
            {
              "TagName": "猫幼年期,猫幼年期",
              "TagGroup": "动物"
            }
          ],
          "Contact": {
            "Round": 151,
            "JobUuid": "cc231a1d-3c05-4739-8926-193ecf4097ba\n",
            "PreferredPhoneNumber": "134123****",
            "PhoneNumber": "1882020****",
            "State": "Available",
            "Honorific": "Mr. Zhang",
            "Name": "John Smith",
            "Role": "Borrower",
            "Id": "63860deb-6218-45df-b1e0-76f2b166e790",
            "ReferenceId": "C01"
          },
          "HasLastPlaybackCompleted": true,
          "DialExceptionCodes": [
            {
              "Code": "0",
              "Hint": "None"
            }
          ],
          "HangUpDirection": "Callee",
          "VoiceName": ""
        }
      }
    ]
  },
  "Labels": [
    {
      "Name": "Satisfied or not",
      "ValueList": [
        "[\"No\",\"Yes\"]"
      ]
    }
  ]
}

Error codes

HTTP status code

Error code

Error message

Description

500 InternalError An error occurred while processing your request. Please try again later. Submit a ticket if the error still exists.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.