聯絡中心

假設客服中心的營運時間為 8:30 至 18:00,由四個服務專員支援多種語言的通話。可能的代理程式有三種可能指派的情況:8:30-16:30、9:00-17:00 和 10:00-18:00。從之前的預測中,您知道每種語言的需求因星期幾而異。星期一的通話通常以英文和葡萄牙文提供服務,因此至少要有一位具有這些語言的代理程式。每個週二通常使用西班牙文和法文,因此每種語言都至少要有一位服務專員精通。無論何種語言,一律至少要有兩個可用代理程式。

每天調節幾次

在這個客服中心範例中,每天有三次異動,且規劃期間橫跨兩天。例如,特定星期一的 8:30-16:30 位移會表示如下:

  {
    "shifts": [
      {
        "id": "Monday-2024-7-1 8:30-16:30",
        "startDateTime": {
          "year": 2024,
          "month": 7,
          "day": 1,
          "hours": 8,
          "minutes": 30
        },
        "endDateTime": {
          "year": 2024,
          "month": 7,
          "day": 1,
          "hours": 16,
          "minutes": 30
        }
      }
    ]
  }

含有六位位移的範例


    {
      "shifts": [
      {
        "id": "Monday-2024-7-1 8:30-16:30",
        "startDateTime": {
          "year": 2024,
          "month": 7,
          "day": 1,
          "hours": 8,
          "minutes": 30
        },
        "endDateTime": {
          "year": 2024,
          "month": 7,
          "day": 1,
          "hours": 16,
          "minutes": 30
        }
      },
      {
        "id": "Monday-2024-7-1 9:00-17:00",
        "startDateTime": {
          "year": 2024,
          "month": 7,
          "day": 1,
          "hours": 9
        },
        "endDateTime": {
          "year": 2024,
          "month": 7,
          "day": 1,
          "hours": 17
        }
      },
      {
        "id": "Monday-2024-7-1 10:00-18:00",
        "startDateTime": {
          "year": 2024,
          "month": 7,
          "day": 1,
          "hours": 10
        },
        "endDateTime": {
          "year": 2024,
          "month": 7,
          "day": 1,
          "hours": 18
        }
      },
      {
        "id": "Tuesday-2024-7-2 8:30-16:30",
        "startDateTime": {
          "year": 2024,
          "month": 7,
          "day": 2,
          "hours": 8,
          "minutes": 30
        },
        "endDateTime": {
          "year": 2024,
          "month": 7,
          "day": 2,
          "hours": 16,
          "minutes": 30
        }
      },
      {
        "id": "Tuesday-2024-7-2 9:00-17:00",
        "startDateTime": {
          "year": 2024,
          "month": 7,
          "day": 2,
          "hours": 9
        },
        "endDateTime": {
          "year": 2024,
          "month": 7,
          "day": 2,
          "hours": 17
        }
      },
      {
        "id": "Tuesday-2024-7-2 10:00-18:00",
        "startDateTime": {
          "year": 2024,
          "month": 7,
          "day": 2,
          "hours": 10
        },
        "endDateTime": {
          "year": 2024,
          "month": 7,
          "day": 2,
          "hours": 18
        }
      }
    ]
  }
  

員工技能語言

服務專員熟悉的語言會以 skill 表示。第一位專員 Lauren 熟悉西班牙文和葡萄牙文,其組成方式如下:

  {
    "employees": [
      {
        "id": "Lauren",
        "role_ids": [
          "Agent"
        ],
        "skill_ids": [
          "ES",
          "PR"
        ]
      }
    ]
  }

也可以按照其他範例所述,新增其他類型的排程限制、轉移要求和員工偏好設定。

四名員工共襄盛舉的範例


  {
    "employees": [
      {
        "id": "Lauren",
        "role_ids": [
          "Agent"
        ],
        "skill_ids": [
          "ES",
          "PR"
        ]
      },
      {
        "id": "Markus",
        "role_ids": [
          "Agent"
        ],
        "skill_ids": [
          "EN",
          "PR"
        ]
      },
      {
        "id": "Hans",
        "role_ids": [
          "Agent"
        ],
        "skill_ids": [
          "EN",
          "ES"
        ],
        "shiftRequests": [
          {
            "shiftIds": [
              "Monday-2024-7-1 10:00-18:00"
            ],
            "type": "STATUS_NOT_WORK"
          }
        ]
      },
      {
        "id": "Peter",
        "role_ids": [
          "Agent"
        ],
        "skill_ids": [
          "EN",
          "FR"
        ],
        "shiftPreferences": [
          {
            "shiftId": "Monday-2024-7-1 10:00-18:00",
            "preference": 1
          }
        ]
      }
    ]
  }
  

服務專員和語言的需求涵蓋範圍

代理程式或特定語言的需求取決於「服務涵蓋範圍規定」。兩個代理程式的需求是在 roleRequirements 中指定,而 skillRequirements 中已指定語言的需求。週一和週二的涵蓋範圍要求以下列形式表示:

  {
    "coverageRequirements": [
      {
        "startDateTime": {
          "year": 2024,
          "month": 7,
          "day": 1,
          "hours": 8,
          "minutes": 30
        },
        "endDateTime": {
          "year": 2024,
          "month": 7,
          "day": 1,
          "hours": 18
        },
        "roleRequirements": [
          {
            "role_id": "Agent",
            "target_employee_count": 1,
            "priority": "PRIORITY_HIGH"
          }
        ],
        "skillRequirements": [
          {
            "skill_id": "EN",
            "target_employee_count": 1
          },
          {
            "skill_id": "PR",
            "target_employee_count": 1
          }
        ]
      },
      {
        "startDateTime": {
          "year": 2024,
          "month": 7,
          "day": 2,
          "hours": 8,
          "minutes": 30
        },
        "endDateTime": {
          "year": 2024,
          "month": 7,
          "day": 2,
          "hours": 18,
          "minutes": 0
        },
        "roleRequirements": [
          {
            "role_id": "Agent",
            "target_employee_count": 1,
            "priority": "PRIORITY_HIGH"
          }
        ],
        "skillRequirements": [
          {
            "skill_id": "ES",
            "target_employee_count": 1
          },
          {
            "skill_id": "FR",
            "target_employee_count": 1
          }
        ]
      }
    ],
    "role_ids": [
    "Agent"
    ],
    "skill_ids": [
      "EN",
      "ES",
      "FR",
      "PR"
    ]
  }

請注意,您必須在要求中定義所有角色和技能 ID。這些欄位必須與用來定義員工的 ID 相符。

完整要求範例


    {
      {
        "requestId": "contact_center_examples",
        "solve_parameters": {
          "time_limit": {
            "seconds": 60
          }
        },
        "employees": [
          {
            "id": "Lauren",
            "role_ids": [
              "Agent"
            ],
            "skill_ids": [
              "ES",
              "PR"
            ]
          },
          {
            "id": "Markus",
            "role_ids": [
              "Agent"
            ],
            "skill_ids": [
              "EN",
              "PR"
            ]
          },
          {
            "id": "Hans",
            "role_ids": [
              "Agent"
            ],
            "skill_ids": [
              "EN",
              "ES"
            ],
            "shiftRequests": [
              {
                "shiftIds": [
                  "Monday-2024-7-1 10:00-18:00"
                ],
                "type": "STATUS_NOT_WORK"
              }
            ]
          },
          {
            "id": "Peter",
            "role_ids": [
              "Agent"
            ],
            "skill_ids": [
              "EN",
              "FR"
            ],
            "shiftPreferences": [
              {
                "shiftId": "Monday-2024-7-1 10:00-18:00",
                "preference": 1
              }
            ]
          }
        ],
        "shifts": [
          {
            "id": "Monday-2024-7-1 8:30-16:30",
            "startDateTime": {
              "year": 2024,
              "month": 7,
              "day": 1,
              "hours": 8,
              "minutes": 30
            },
            "endDateTime": {
              "year": 2024,
              "month": 7,
              "day": 1,
              "hours": 16,
              "minutes": 30
            }
          },
          {
            "id": "Monday-2024-7-1 9:00-17:00",
            "startDateTime": {
              "year": 2024,
              "month": 7,
              "day": 1,
              "hours": 9
            },
            "endDateTime": {
              "year": 2024,
              "month": 7,
              "day": 1,
              "hours": 17
            }
          },
          {
            "id": "Monday-2024-7-1 10:00-18:00",
            "startDateTime": {
              "year": 2024,
              "month": 7,
              "day": 1,
              "hours": 10
            },
            "endDateTime": {
              "year": 2024,
              "month": 7,
              "day": 1,
              "hours": 18
            }
          },
          {
            "id": "Tuesday-2024-7-2 8:30-16:30",
            "startDateTime": {
              "year": 2024,
              "month": 7,
              "day": 2,
              "hours": 8,
              "minutes": 30
            },
            "endDateTime": {
              "year": 2024,
              "month": 7,
              "day": 2,
              "hours": 16,
              "minutes": 30
            }
          },
          {
            "id": "Tuesday-2024-7-2 9:00-17:00",
            "startDateTime": {
              "year": 2024,
              "month": 7,
              "day": 2,
              "hours": 9
            },
            "endDateTime": {
              "year": 2024,
              "month": 7,
              "day": 2,
              "hours": 17
            }
          },
          {
            "id": "Tuesday-2024-7-2 10:00-18:00",
            "startDateTime": {
              "year": 2024,
              "month": 7,
              "day": 2,
              "hours": 10
            },
            "endDateTime": {
              "year": 2024,
              "month": 7,
              "day": 2,
              "hours": 18
            }
          }
        ],
        "coverageRequirements": [
          {
            "startDateTime": {
              "year": 2024,
              "month": 7,
              "day": 1,
              "hours": 8,
              "minutes": 30
            },
            "endDateTime": {
              "year": 2024,
              "month": 7,
              "day": 1,
              "hours": 18
            },
            "roleRequirements": [
              {
                "role_id": "Agent",
                "target_employee_count": 1,
                "priority": "PRIORITY_HIGH"
              }
            ],
            "skillRequirements": [
              {
                "skill_id": "EN",
                "target_employee_count": 1
              },
              {
                "skill_id": "PR",
                "target_employee_count": 1
              }
            ]
          },
          {
            "startDateTime": {
              "year": 2024,
              "month": 7,
              "day": 2,
              "hours": 8,
              "minutes": 30
            },
            "endDateTime": {
              "year": 2024,
              "month": 7,
              "day": 2,
              "hours": 18,
              "minutes": 0
            },
            "roleRequirements": [
              {
                "role_id": "Agent",
                "target_employee_count": 1,
                "priority": "PRIORITY_HIGH"
              }
            ],
            "skillRequirements": [
              {
                "skill_id": "ES",
                "target_employee_count": 1
              },
              {
                "skill_id": "FR",
                "target_employee_count": 1
              }
            ]
          }
        ],
        "role_ids": [
          "Agent"
        ],
        "skill_ids": [
          "EN",
          "ES",
          "FR",
          "PR"
        ]
      }
    }
    

回應範例

解題工具的回應包含要轉移的代理程式分配,以及最佳化程序的狀態。

以下範例顯示已指派的位移:

  {
    "solutionStatus": "OPTIMAL",
    "shiftAssignments": [
      {
        "employeeId": "Lauren",
        "shiftId": "Tuesday-2024-7-2 10:00-18:00",
        "roleId": "Agent"
      },
      {
        "employeeId": "Markus",
        "shiftId": "Monday-2024-7-1 8:30-16:30",
        "roleId": "Agent"
      },
      {
        "employeeId": "Peter",
        "shiftId": "Monday-2024-7-1 10:00-18:00",
        "roleId": "Agent"
      },
      {
        "employeeId": "Peter",
        "shiftId": "Tuesday-2024-7-2 8:30-16:30",
        "roleId": "Agent"
      }
    ],
    "requestId": "contact_center_examples"
  }