מוקד יצירת קשר

חשבו על מוקד יצירת קשר שפועל בין השעות 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. הסוכן הראשון, לורן, יודע ספרדית ופורטוגזית, והוא מיוצג כך:

  {
    "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"
    ]
  }

שימו לב שיש להגדיר בבקשה את כל מזהי התפקידים והמיומנויות. הם צריכים להיות זהים למזהים שמשמשים להגדרת העובדים.

דוגמה לבקשה מלאה


    {
      {
        "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"
  }