Sets attributes for the worker.
An object containing attributes to set for the worker.
Optional configuration parameters for customizing the attribute setting process.
A promise that resolves when the attributes are successfully set.
FlexSdkError with the following error code(s):
import { createClient } from "@twilio/flex-sdk";import { SetAttributes } from "@twilio/flex-sdk/actions/Worker";async function setWorkerAttributes() { const client = await createClient("SDK_TOKEN"); const setAttributesAction = new SetAttributes({ key: "value" }); await client.execute(setAttributesAction);} Copy
import { createClient } from "@twilio/flex-sdk";import { SetAttributes } from "@twilio/flex-sdk/actions/Worker";async function setWorkerAttributes() { const client = await createClient("SDK_TOKEN"); const setAttributesAction = new SetAttributes({ key: "value" }); await client.execute(setAttributesAction);}
Optional
Sets attributes for the worker.
Param: attributes
An object containing attributes to set for the worker.
Param: options
Optional configuration parameters for customizing the attribute setting process.
Returns
A promise that resolves when the attributes are successfully set.
Throws
FlexSdkError with the following error code(s):
Example