AssignJobs

Updated at:

Creates outbound call jobs in batches.

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:AssignJobs

create

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

InstanceId

string

Yes

The instance ID.

12f3dd08-0c55-44ce-9b64-e69d35ed3a76

JobGroupId

string

Yes

The job group ID.

d004cfd2-6a81-491c-83c6-cbe186620c95

StrategyJson

string

No

The execution strategy for the job group.

  • repeatBy: The recurrence type. Valid values: Once (runs once), Day (repeats daily), Week (repeats weekly), and Month (repeats monthly).

  • startTime: The start time of the strategy.

  • endTime: The end time of the strategy.

  • workingTime: The time windows during which calls can be made.

  • maxAttemptsPerDay: The maximum daily call attempts per phone number.

  • minAttemptInterval: The minimum interval between call retries, in minutes.

  • routingStrategy: The number routing strategy. Valid values: None (no preference), LocalFirst (prioritizes numbers in the same city), and LocalProvinceFirst (prioritizes numbers in the same province).

  • repeatDays: The specific days on which the job runs, based on the repeatBy type. If repeatBy is set to Week, 0 represents Sunday, and 1 through 6 represent Monday through Saturday. If repeatBy is set to Month, values from 1 to 31 represent the days of the month. If a month does not have a specified day (for example, February 30), the job is skipped for that month.

  • repeatable: Specifies whether the job is recurring. Valid values are true and false.

{"maxAttemptsPerDay":"3","minAttemptInterval":"10","routingStrategy":"LocalProvinceFirst","repeatDays":["1","2","3"],"workingTime":[{"beginTime":"10:00:00","endTime":"11:00:00"},{"beginTime":"14:00:00","endTime":"15:00:00"}],"repeatable":true,"endTime":1707494400000,"startTime":1706976000000,"repeatBy":"Week"}

RosterType

string

No

The roster type.

If you create jobs by calling this API, you can omit this parameter. The default value is json. If you upload a contact list file, set this parameter to excel.

json

JobDataParsingTaskId

string

No

The ID of the data parsing task for the outbound call job.

You can omit this parameter if you create jobs by calling this API.

Note

If you create jobs by uploading a file, you must call the CreateJobDataParsingTask operation to obtain a value for this parameter.

d004cfd2-6a81-491c-83c6-cbe186620c95

IsAsynchrony

boolean

No

Specifies whether the task is asynchronous.

You can omit this parameter if you create jobs by calling this API. The default value is false.

false

CallingNumber

array

No

These numbers are displayed as the caller ID to the contact.

Note

If unspecified, all available calling numbers are used.

string

No

A calling number.

4008013260

JobsJson

array

No

Important This parameter is required.

The job data, a JSON array where each object represents a contact. For formatting details, see the example.

The array can contain up to 99 elements.

string

Yes

extras: (Optional) A container for additional information.

  • key: The key of a custom variable.

  • value: The value of the custom variable.

contacts: (Required) Information about the contact.

  • phoneNumber: (Required) The phone number of the contact. If number encryption is required, provide the encrypted phone number.

  • referenceId: (Required) A user-defined unique ID for the contact, used to prevent duplicate entries.

  • role: (Optional) The role of the contact in the outbound call. If not specified, no role is assigned.

  • honorific: (Optional) The honorific title for the contact.

  • name: (Optional) The name of the contact.

  • encryptedAesKey: (Optional) The encrypted AES key. This is used when uploading an encrypted phone number.

{ "extras": [{ "value": "测试", "key": "测试" }, { "key": "ServiceId", "value": null }, { "key": "TenantId", "value": null }], "contacts": [{ "phoneNumber": "134*******", "name": "张三", "referenceId": "C01", "role": "客户1", "honorific": "老张" }] }

Response elements

Element

Type

Description

Example

object

The response object.

HttpStatusCode

integer

The HTTP status code.

200

JobGroupId

string

The job group ID.

390515b5-6115-4ccf-83e2-52d5bfaf2ddf

RequestId

string

The request ID.

254EB995-DEDF-48A4-9101-9CA5B72FFBCC

Success

boolean

Indicates whether the request was successful.

true

Code

string

The status code.

OK

Message

string

The response message.

Success

JobsId

array

A list of job IDs.

string

The job ID.

12f3dd08-0c55-44ce-9b64-e69d35ed3a76

Examples

Success response

JSON format

{
  "HttpStatusCode": 200,
  "JobGroupId": "390515b5-6115-4ccf-83e2-52d5bfaf2ddf",
  "RequestId": "254EB995-DEDF-48A4-9101-9CA5B72FFBCC",
  "Success": true,
  "Code": "OK",
  "Message": "Success",
  "JobsId": [
    "12f3dd08-0c55-44ce-9b64-e69d35ed3a76"
  ]
}

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.
404 NotExist.Instance The specified Instance does not exist.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.