Documentation
¶
Index ¶
- type Activity
- type ActivityRequest
- type ActivityType
- type Agent
- type AgentStatus
- type Client
- func (c *Client) CreateActivity(ctx context.Context, r *CreateActivityRequest) (*Activity, error)
- func (c *Client) CreateActivityType(ctx context.Context, r *CreateActivityTypeRequest) (*ActivityType, error)
- func (c *Client) CreateAgent(ctx context.Context, r *CreateAgentRequest) (*Agent, error)
- func (c *Client) CreateAgentStatus(ctx context.Context, r *CreateAgentStatusRequest) (*AgentStatus, error)
- func (c *Client) CreateBulkActivity(ctx context.Context, r *CreateBulkActivityRequest) (*CreateBulkActivityResponse, error)
- func (c *Client) CreateQueue(ctx context.Context, r *CreateQueueRequest) (*QueuesList, error)
- func (c *Client) CreateRequirement(ctx context.Context, r *CreateRequirementRequest) (*Requirement, error)
- func (c *Client) CreateSite(ctx context.Context, r *CreateSiteRequest) (*SitesList, error)
- func (c *Client) CreateSkill(ctx context.Context, r *CreateSkillRequest) (*SkillsList, error)
- func (c *Client) CreateTeam(ctx context.Context, r *CreateTeamRequest) (*TeamsList, error)
- func (c *Client) DeleteActivities(ctx context.Context, r *DeleteActivitiesRequest) error
- func (c *Client) DeleteActivityType(ctx context.Context, r *DeleteActivityTypeRequest) (*ActivityType, error)
- func (c *Client) DeleteQueues(ctx context.Context, r *DeleteQueuesRequest) error
- func (c *Client) DeleteSites(ctx context.Context, r *DeleteSitesRequest) error
- func (c *Client) DeleteSkills(ctx context.Context, r *DeleteSkillsRequest) error
- func (c *Client) DeleteTeams(ctx context.Context, r *DeleteTeamsRequest) error
- func (c *Client) GetAgentStatus(ctx context.Context, r *GetAgentStatusRequest) (*AgentStatus, error)
- func (c *Client) ListActivities(ctx context.Context, r *ListActivitiesRequest) (*ListActivitiesResponse, error)
- func (c *Client) ListActivityTypes(ctx context.Context) (*ListActivityTypesResponse, error)
- func (c *Client) ListAgents(ctx context.Context, r *ListAgentsRequest) (*ListAgentsResponse, error)
- func (c *Client) ListQueues(ctx context.Context) (*QueuesList, error)
- func (c *Client) ListRequirementTypes(ctx context.Context) (*ListRequirementTypesResponse, error)
- func (c *Client) ListRequirements(ctx context.Context, r *ListRequirementsRequest) (*ListRequirementsResponse, error)
- func (c *Client) ListSites(ctx context.Context) (*SitesList, error)
- func (c *Client) ListSkills(ctx context.Context) (*SkillsList, error)
- func (c *Client) ListTeams(ctx context.Context) (*TeamsList, error)
- func (c *Client) UpdateAgent(ctx context.Context, r *UpdateAgentRequest) (*Agent, error)
- func (c *Client) UpdateQueues(ctx context.Context, r *UpdateQueuesRequest) (*Filter, error)
- func (c *Client) UpdateSites(ctx context.Context, r *UpdateSitesRequest) (*Filter, error)
- func (c *Client) UpdateSkills(ctx context.Context, r *UpdateSkillsRequest) (*Filter, error)
- func (c *Client) UpdateTeams(ctx context.Context, r *UpdateTeamsRequest) (*Filter, error)
- type CreateActivityRequest
- type CreateActivityTypeRequest
- type CreateAgentRequest
- type CreateAgentStatusRequest
- type CreateBulkActivityRequest
- type CreateBulkActivityResponse
- type CreateQueueRequest
- type CreateRequirementRequest
- type CreateSiteRequest
- type CreateSkillRequest
- type CreateTeamRequest
- type DeleteActivitiesRequest
- type DeleteActivityTypeRequest
- type DeleteQueuesRequest
- type DeleteSitesRequest
- type DeleteSkillsRequest
- type DeleteTeamsRequest
- type Error
- type Filter
- type GetAgentStatusRequest
- type ListActivitiesRequest
- type ListActivitiesResponse
- type ListActivityTypesResponse
- type ListAgentsRequest
- type ListAgentsResponse
- type ListRequirementTypesResponse
- type ListRequirementsRequest
- type ListRequirementsResponse
- type Queue
- type QueuesList
- type Requirement
- type RequirementType
- type SitesList
- type SkillsList
- type TeamsList
- type UpdateAgentRequest
- type UpdateQueuesRequest
- type UpdateSitesRequest
- type UpdateSkillsRequest
- type UpdateTeamsRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Activity ¶
type Activity struct { ID string `json:"id,omitempty"` // An arbitrary string to be displayed to end users. Description string `json:"description,omitempty"` AgentID string `json:"agent_id,omitempty"` // Identifier for the corresponding agent. EndTime time.Time `json:"end_time,omitempty"` StartTime time.Time `json:"start_time,omitempty"` TypeID string `json:"type_id,omitempty"` // Identifier for the associated activity type. }
Agents can have scheduled activities that are either created directly in Assembled or sourced from other calendaring applications such as Google Calendar.
func (Activity) MarshalJSON ¶
func (*Activity) UnmarshalJSON ¶
type ActivityRequest ¶
type ActivityRequest struct { // One of create, update, or delete. Note that update and delete are // currently in beta. Contact us at support@assembled.com to be notified // of updates. Action string `json:"action,omitempty"` // Agents can have scheduled activities that are either created directly // in Assembled or sourced from other calendaring applications such as // Google Calendar. Activity Activity `json:"activity,omitempty"` }
type ActivityType ¶
type ActivityType struct { ID string `json:"id,omitempty"` // Channels associated with the activity. Must be non-empty when the the // activity is productive. Channels []string `json:"channels,omitempty"` // Third-party identifier. Supplied to Assembled and is used to uniquely // identify activity types across different systems. ImportID string `json:"import_id,omitempty"` // Corresponds to type in the Activity object, will be deprecated in a // future API version. Value string `json:"value,omitempty"` BackgroundColor string `json:"background_color,omitempty"` // Hex string. FontColor string `json:"font_color,omitempty"` // Hex string. Name string `json:"name,omitempty"` Productive bool `json:"productive,omitempty"` // If true, timeoff must be false. ShortName string `json:"short_name,omitempty"` Timeoff bool `json:"timeoff,omitempty"` // If true, productive must be false. }
Activity types represent a categorization of different activities. Currently they are only editable via the dashboard.
type Agent ¶
type Agent struct { ID string `json:"id,omitempty"` // Third-party identifier. Supplied to Assembled and is used to uniquely // identify agents across different systems. ImportID string `json:"import_id,omitempty"` Channels []string `json:"channels,omitempty"` // One of: 'phone', 'email', or 'chat'. Email string `json:"email,omitempty"` Name string `json:"name,omitempty"` Queues []string `json:"queues,omitempty"` // Unique identifiers for associated queues. Site string `json:"site,omitempty"` // Unique identifier for associated site. Skills []string `json:"skills,omitempty"` // Unique identifiers for associated skills. Teams []string `json:"teams,omitempty"` // Unique identifiers for associated teams. }
Agents handle units of work and can be assigned to activities or schedules. They can be grouped by site and team and can be assigned to queues or channels based on their skills.
type AgentStatus ¶
type AgentStatus struct { // Identifier for the associated event with the current status. EventID string `json:"event_id,omitempty"` // Agent's current status from upstream system e.g. 'ready', 'away', or // 'busy'. Values are not validated. Status string `json:"status,omitempty"` AgentID string `json:"agent_id,omitempty"` // Identifier for the corresponding agent. AgentName string `json:"agent_name,omitempty"` Channel string `json:"channel,omitempty"` EndTime time.Time `json:"end_time,omitempty"` StartTime time.Time `json:"start_time,omitempty"` }
Agents can have statuses (sourced from external systems) that indicate what they are currently working on. For example, in a phone system an agent may be “available for calls”, “busy on a call”, or “wrapping up on a call".
func (AgentStatus) MarshalJSON ¶
func (r AgentStatus) MarshalJSON() ([]byte, error)
func (*AgentStatus) UnmarshalJSON ¶
func (r *AgentStatus) UnmarshalJSON(b []byte) error
type Client ¶
type Client struct { Base string HTTP http.Client EnableTelemetry bool // contains filtered or unexported fields }
func (*Client) CreateActivity ¶
Creates an activity with the specified parameters. Valid IDs for agents can be retrieved from the agent endpoints. Valid IDs for activity types can be retrieved from the activity types endpoints. This endpoint will return 400 if invalid IDs are provided.
func (*Client) CreateActivityType ¶
func (c *Client) CreateActivityType(ctx context.Context, r *CreateActivityTypeRequest) (*ActivityType, error)
Creates an activity type.
func (*Client) CreateAgent ¶
Creates an agent profile with the specified parameters. Valid IDs for site, teams, and queues can be retrieved from endpoints for filters. This endpoint will return 400 if invalid IDs are provided.
func (*Client) CreateAgentStatus ¶
func (c *Client) CreateAgentStatus(ctx context.Context, r *CreateAgentStatusRequest) (*AgentStatus, error)
func (*Client) CreateBulkActivity ¶
func (c *Client) CreateBulkActivity(ctx context.Context, r *CreateBulkActivityRequest) (*CreateBulkActivityResponse, error)
Creates, updates, or deletes multiple activities in a single request. A given request occurs within a transaction, so in the event of an error during the request, it should be assumed that no changes were processed.
func (*Client) CreateQueue ¶
func (c *Client) CreateQueue(ctx context.Context, r *CreateQueueRequest) (*QueuesList, error)
func (*Client) CreateRequirement ¶
func (c *Client) CreateRequirement(ctx context.Context, r *CreateRequirementRequest) (*Requirement, error)
Creates or overwrites a requirement with the specified parameters.
func (*Client) CreateSite ¶
func (*Client) CreateSkill ¶
func (c *Client) CreateSkill(ctx context.Context, r *CreateSkillRequest) (*SkillsList, error)
func (*Client) CreateTeam ¶
func (*Client) DeleteActivities ¶
func (c *Client) DeleteActivities(ctx context.Context, r *DeleteActivitiesRequest) error
Deletes all activities that match the specified parameters. Valid IDs for agents can be retrieved from the agent endpoints. This endpoint will return 400 if invalid IDs are provided.
Activities can be partially deleted. For example, if agent XYZ has an activity from 3pm-5pm and the deletion window is from 4pm-5pm, there will still exist a 3-4pm activity for agent XYZ after the deletion is completed.
func (*Client) DeleteActivityType ¶
func (c *Client) DeleteActivityType(ctx context.Context, r *DeleteActivityTypeRequest) (*ActivityType, error)
Deletes an activity type.
func (*Client) DeleteQueues ¶
func (c *Client) DeleteQueues(ctx context.Context, r *DeleteQueuesRequest) error
func (*Client) DeleteSites ¶
func (c *Client) DeleteSites(ctx context.Context, r *DeleteSitesRequest) error
func (*Client) DeleteSkills ¶
func (c *Client) DeleteSkills(ctx context.Context, r *DeleteSkillsRequest) error
func (*Client) DeleteTeams ¶
func (c *Client) DeleteTeams(ctx context.Context, r *DeleteTeamsRequest) error
func (*Client) GetAgentStatus ¶
func (c *Client) GetAgentStatus(ctx context.Context, r *GetAgentStatusRequest) (*AgentStatus, error)
func (*Client) ListActivities ¶
func (c *Client) ListActivities(ctx context.Context, r *ListActivitiesRequest) (*ListActivitiesResponse, error)
Returns a list of activity objects that match the provided query.
func (*Client) ListActivityTypes ¶
func (c *Client) ListActivityTypes(ctx context.Context) (*ListActivityTypesResponse, error)
Returns a list of all activity type objects configured on the account.
func (*Client) ListAgents ¶
func (c *Client) ListAgents(ctx context.Context, r *ListAgentsRequest) (*ListAgentsResponse, error)
Returns a list of agent objects that match the provided query.
func (*Client) ListQueues ¶
func (c *Client) ListQueues(ctx context.Context) (*QueuesList, error)
func (*Client) ListRequirementTypes ¶
func (c *Client) ListRequirementTypes(ctx context.Context) (*ListRequirementTypesResponse, error)
Returns a list of all requirement type objects configured on the account.
func (*Client) ListRequirements ¶
func (c *Client) ListRequirements(ctx context.Context, r *ListRequirementsRequest) (*ListRequirementsResponse, error)
Returns a list of requirement objects that match the provided query.
func (*Client) ListSkills ¶
func (c *Client) ListSkills(ctx context.Context) (*SkillsList, error)
func (*Client) UpdateAgent ¶
Partial update of an agent with the specified fields. Fields that are not included in the request are not updated, while fields that are explicitly set to null or an appropriate empty value (for example, "[]" for lists) are set to empty. Valid IDs for site, teams, and queues can be retrieved from endpoints for filters. This endpoint will return 400 if invalid filter IDs are provided.
func (*Client) UpdateQueues ¶
func (*Client) UpdateSites ¶
func (*Client) UpdateSkills ¶
func (*Client) UpdateTeams ¶
type CreateActivityRequest ¶
type CreateActivityRequest struct { // Whether or not to allow conflicting events. If true, this created // activity will be allowed to have conflicts with other activities. If // false, any overlapping activities for the specified agent will be // deleted. Defaults to false. AllowConflicts bool `json:"allow_conflicts,omitempty"` // An arbitrary string to be displayed to end users. Description string `json:"description,omitempty"` // Identifier for the corresponding schedule. Defaults to the master // schedule. ScheduleID string `json:"schedule_id,omitempty"` AgentID string `json:"agent_id,omitempty"` // Unique identifier for an agent. EndTime time.Time `json:"end_time,omitempty"` StartTime time.Time `json:"start_time,omitempty"` TypeID string `json:"type_id,omitempty"` // Unique identifier for an activity type. }
func (CreateActivityRequest) MarshalJSON ¶
func (r CreateActivityRequest) MarshalJSON() ([]byte, error)
func (*CreateActivityRequest) UnmarshalJSON ¶
func (r *CreateActivityRequest) UnmarshalJSON(b []byte) error
type CreateActivityTypeRequest ¶
type CreateActivityTypeRequest struct { // Channels associated with the activity. Must be non-empty when the the // activity is productive. Channels []string `json:"channels,omitempty"` // Third-party identifier. Supplied to Assembled and is used to uniquely // identify activity types across different systems. ImportID string `json:"import_id,omitempty"` // Corresponds to type in the Activity object, will be deprecated in a // future API version. Value string `json:"value,omitempty"` BackgroundColor string `json:"background_color,omitempty"` // Hex string. FontColor string `json:"font_color,omitempty"` // Hex string. Name string `json:"name,omitempty"` Productive bool `json:"productive,omitempty"` // If true, timeoff must be false. ShortName string `json:"short_name,omitempty"` Timeoff bool `json:"timeoff,omitempty"` // If true, productive must be false. }
type CreateAgentRequest ¶
type CreateAgentRequest struct { // Third-party identifier. Supplied to Assembled and is used to uniquely // identify agents across different systems. ImportID string `json:"import_id,omitempty"` Channels []string `json:"channels,omitempty"` // One of: 'phone', 'email', or 'chat'. Email string `json:"email,omitempty"` Name string `json:"name,omitempty"` Queues []string `json:"queues,omitempty"` // Unique identifiers for associated queues. Site string `json:"site,omitempty"` // Unique identifier for associated site. Skills []string `json:"skills,omitempty"` // Unique identifiers for associated skills. Teams []string `json:"teams,omitempty"` // Unique identifiers for associated teams. }
type CreateAgentStatusRequest ¶
type CreateAgentStatusRequest struct { // Identifier for the associated event with the current status. EventID string `json:"event_id,omitempty"` // Agent's current status from upstream system e.g. 'ready', 'away', or // 'busy'. Values are not validated. Status string `json:"status,omitempty"` AgentID string `json:"agent_id,omitempty"` // Identifier for the corresponding agent. AgentName string `json:"agent_name,omitempty"` Channel string `json:"channel,omitempty"` EndTime time.Time `json:"end_time,omitempty"` StartTime time.Time `json:"start_time,omitempty"` }
func (CreateAgentStatusRequest) MarshalJSON ¶
func (r CreateAgentStatusRequest) MarshalJSON() ([]byte, error)
func (*CreateAgentStatusRequest) UnmarshalJSON ¶
func (r *CreateAgentStatusRequest) UnmarshalJSON(b []byte) error
type CreateBulkActivityRequest ¶
type CreateBulkActivityRequest struct { // An array of requests following the format below. Activities []ActivityRequest `json:"activities,omitempty"` // Identifier for the corresponding schedule. Defaults to the master // schedule. ScheduleID string `json:"schedule_id,omitempty"` }
type CreateQueueRequest ¶
type CreateQueueRequest struct {
Queues []Filter `json:"queues,omitempty"`
}
type CreateRequirementRequest ¶
type CreateRequirementRequest struct { EndTime time.Time `json:"end_time,omitempty"` Required int `json:"required,omitempty"` RequirementTypeID string `json:"requirement_type_id,omitempty"` StartTime time.Time `json:"start_time,omitempty"` }
func (CreateRequirementRequest) MarshalJSON ¶
func (r CreateRequirementRequest) MarshalJSON() ([]byte, error)
func (*CreateRequirementRequest) UnmarshalJSON ¶
func (r *CreateRequirementRequest) UnmarshalJSON(b []byte) error
type CreateSiteRequest ¶
type CreateSiteRequest struct {
Sites []Filter `json:"sites,omitempty"`
}
type CreateSkillRequest ¶
type CreateSkillRequest struct {
Skills []Filter `json:"skills,omitempty"`
}
type CreateTeamRequest ¶
type CreateTeamRequest struct {
Teams []Filter `json:"teams,omitempty"`
}
type DeleteActivitiesRequest ¶
type DeleteActivitiesRequest struct { // Unique identifiers for agents. All activities in the deletion window // will be deleted for each specified agent. AgentIDs []string `json:"agent_ids,omitempty"` // Identifier for the corresponding schedule. Defaults to the master // schedule. ScheduleID string `json:"schedule_id,omitempty"` EndTime time.Time `json:"end_time,omitempty"` StartTime time.Time `json:"start_time,omitempty"` }
func (DeleteActivitiesRequest) MarshalJSON ¶
func (r DeleteActivitiesRequest) MarshalJSON() ([]byte, error)
func (*DeleteActivitiesRequest) UnmarshalJSON ¶
func (r *DeleteActivitiesRequest) UnmarshalJSON(b []byte) error
type DeleteActivityTypeRequest ¶
type DeleteActivityTypeRequest struct {
ID string `json:"id,omitempty"`
}
type DeleteQueuesRequest ¶
type DeleteQueuesRequest struct {
QueueIDs []string `json:"queue_ids,omitempty"`
}
type DeleteSitesRequest ¶
type DeleteSitesRequest struct {
SiteIDs []string `json:"site_ids,omitempty"`
}
type DeleteSkillsRequest ¶
type DeleteSkillsRequest struct {
SkillIDs []string `json:"skill_ids,omitempty"`
}
type DeleteTeamsRequest ¶
type DeleteTeamsRequest struct {
TeamIDs []string `json:"team_ids,omitempty"`
}
type Filter ¶
type Filter struct { ID string `json:"id,omitempty"` // Identifier for the parent filter. May be null. ParentID string `json:"parent_id,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` Name string `json:"name,omitempty"` // Identifier for the filter. UpdatedAt time.Time `json:"updated_at,omitempty"` }
Filters can be used to categorize or group agents as well as activities.
func (Filter) MarshalJSON ¶
func (*Filter) UnmarshalJSON ¶
type GetAgentStatusRequest ¶
type GetAgentStatusRequest struct {
ID string `json:"id,omitempty"`
}
type ListActivitiesRequest ¶
type ListActivitiesRequest struct { // If true, include activity types active on the account. Defaults to // false. IncludeActivityTypes bool `json:"include_activity_types,omitempty"` // If true, include associated agent objects. Defaults to false. IncludeAgents bool `json:"include_agents,omitempty"` // Identifier for the corresponding schedule. Defaults to the master // schedule. ScheduleID string `json:"schedule_id,omitempty"` Agents []string `json:"agents,omitempty"` // Filter results to a specific set of agents. Channel string `json:"channel,omitempty"` // Filter results to a specific channel. EndTime time.Time `json:"end_time,omitempty"` StartTime time.Time `json:"start_time,omitempty"` Team string `json:"team,omitempty"` // Filter results to a specific team. Types []string `json:"types,omitempty"` // Filter results to a specific set of types. }
func (ListActivitiesRequest) MarshalJSON ¶
func (r ListActivitiesRequest) MarshalJSON() ([]byte, error)
func (*ListActivitiesRequest) UnmarshalJSON ¶
func (r *ListActivitiesRequest) UnmarshalJSON(b []byte) error
type ListActivitiesResponse ¶
type ListActivityTypesResponse ¶
type ListActivityTypesResponse struct {
ActivityTypes map[string]ActivityType `json:"activity_types,omitempty"`
}
type ListAgentsRequest ¶
type ListAgentsRequest struct { Channels []string `json:"channels,omitempty"` // One of: 'phone', 'email', or 'chat'. Queue string `json:"queue,omitempty"` // Name of the queue to filter on. Site string `json:"site,omitempty"` // Name of the site to filter on. Team string `json:"team,omitempty"` // Name of the team to filter on. }
type ListAgentsResponse ¶
type ListRequirementTypesResponse ¶
type ListRequirementTypesResponse struct {
RequirementTypes map[string]RequirementType `json:"requirement_types,omitempty"`
}
type ListRequirementsRequest ¶
type ListRequirementsRequest struct { // Filter results to a specific set of requirement types. RequirementTypes []string `json:"requirement_types,omitempty"` EndTime time.Time `json:"end_time,omitempty"` StartTime time.Time `json:"start_time,omitempty"` }
func (ListRequirementsRequest) MarshalJSON ¶
func (r ListRequirementsRequest) MarshalJSON() ([]byte, error)
func (*ListRequirementsRequest) UnmarshalJSON ¶
func (r *ListRequirementsRequest) UnmarshalJSON(b []byte) error
type ListRequirementsResponse ¶
type ListRequirementsResponse struct {
Requirements []Requirement `json:"requirements,omitempty"`
}
type QueuesList ¶
type Requirement ¶
type Requirement struct { // Count of required staffing in the interval, can be partial. Required int `json:"required,omitempty"` // Unique identifier for the corresponding requirement type. RequirementTypeID string `json:"requirement_type_id,omitempty"` // Count of scheduled staffing in the interval, can be partial. Scheduled int `json:"scheduled,omitempty"` EndTime time.Time `json:"end_time,omitempty"` StartTime time.Time `json:"start_time,omitempty"` }
Requirements represent a set of staffing requirements and grouped staffing against the requirement within a given time window. They correspond to metrics about required staffing and scheduled staffing that appear above the team calendar.
func (Requirement) MarshalJSON ¶
func (r Requirement) MarshalJSON() ([]byte, error)
func (*Requirement) UnmarshalJSON ¶
func (r *Requirement) UnmarshalJSON(b []byte) error
type RequirementType ¶
type RequirementType struct { ID string `json:"id,omitempty"` // List of unique identifiers for activity types that count as scheduled // against the requirement. ActivityTypeIDs []string `json:"activity_type_ids,omitempty"` Name string `json:"name,omitempty"` }
Requirement types contain metadata about named set of staffing requirements.
type SkillsList ¶
type UpdateAgentRequest ¶
type UpdateAgentRequest struct { ID string `json:"id,omitempty"` // Third-party identifier. Supplied to Assembled and is used to uniquely // identify agents across different systems. ImportID string `json:"import_id,omitempty"` Channels []string `json:"channels,omitempty"` // One of: 'phone', 'email', or 'chat'. Email string `json:"email,omitempty"` Name string `json:"name,omitempty"` Queues []string `json:"queues,omitempty"` // Unique identifiers for associated queues. Site string `json:"site,omitempty"` // Unique identifier for associated site. Skills []string `json:"skills,omitempty"` // Unique identifiers for associated skills. Teams []string `json:"teams,omitempty"` // Unique identifiers for associated teams. }