junxu3
January 16

Hi,
I have 2 questions.

#1
we have api POST https://api.usw2.pure.cloud/api/v2/routing/skillgroups to create a skillgroup in Cloud.

Following is its sample request
{
"name": "jun-test-API SKill Group - 4",
"skillConditions": [
{
"routingSkillConditions": [
{
"routingSkill": "jun-test-API Skill - 1",
"comparator": "GreaterThan",
"proficiency": 2,
"childConditions": [
{
"routingSkillConditions": [
{
"routingSkill": "jun-test-skill-02",
"comparator": "GreaterThan",
"proficiency": 5
}
],
"languageSkillConditions": [],
"operation": "Or"
}
]
}
],
"languageSkillConditions": [],
"operation": "And"
},
{
"routingSkillConditions": [
{
"routingSkill": "jun-test-API Skill - 2",
"comparator": "GreaterThan",
"proficiency": 3,
"childConditions": []
}
],
"languageSkillConditions": [],
"operation": "And"
},
{
"routingSkillConditions": [
{
"routingSkill": "jun-test-API Skill - 1",
"comparator": "GreaterThan",
"proficiency": 3,
"childConditions": []
}
],
"languageSkillConditions": [],
"operation": "And"
}
]
}

and this is its skill condition formular on Cloud UI - Groups -> Skill Expression Detail Panel
(jun-test-API Skill - 1 > 2 OR jun-test-skill-02 > 5) AND (jun-test-API Skill - 2 > 3) AND (jun-test-API Skill - 1 > 3)

We are developing a web tool (JSP+sevlet) to bulk create multiple skill groups by uploading an excel sheet. On the sheet, there are rows with 2 columns as following.
SkillGroupName SkillExpression
SkillGroup_001 (jun-test-API Skill - 1 > 2 OR jun-test-skill-02 > 5) AND (jun-test-API Skill - 2 > 3) AND (jun-test-API Skill - 1 > 3)
SkillGroup_002 (jun-test-API Skill - 1 > 2 OR jun-test-skill-02 > 5) AND (jun-test-API Skill - 2 > 3) AND (jun-test-API Skill - 1 > 3)
SkillGroup_003 (jun-test-API Skill - 1 > 2 OR jun-test-skill-02 > 5) AND (jun-test-API Skill - 2 > 3) AND (jun-test-API Skill - 1 > 3)

we want to use the SkillExpression value to create the skill group object. However, the request of the existing POST api api/v2/routing/skillgroups is not allowing us to provide a SkillExpression field in it. Instead, we have to split the skill condition formular into different small pieces and then build a complex request as showned in above request sample. That's so complex to achieve it in Java code to parse the condition formular and build the json structure.
May I ask if Genesys Cloud provides any other API and allow us creating a skill group by using SkillExpression in a simple json request? for e.g. like this request,
{
"name": "jun-test-API SKill Group - 4",
"SkillExpression": "(jun-test-API Skill - 1 > 2 OR jun-test-skill-02 > 5) AND (jun-test-API Skill - 2 > 3) AND (jun-test-API Skill - 1 > 3)"
}

#2
If above simple json request is not possible as of now, may I check if there is any existing java code lib or sample which you can share wth me to dynamicly parse the skill condition formular string and then convert it to the structual jspn request?
i.e.
convert skill condition string: (jun-test-API Skill - 1 > 2 OR jun-test-skill-02 > 5) AND (jun-test-API Skill - 2 > 3) AND (jun-test-API Skill - 1 > 3)
to Json string:
"skillConditions": [
{
"routingSkillConditions": [
{
"routingSkill": "jun-test-API Skill - 1",
"comparator": "GreaterThan",
"proficiency": 2,
"childConditions": [
{
"routingSkillConditions": [
{
"routingSkill": "jun-test-skill-02",
"comparator": "GreaterThan",
"proficiency": 5
}
],
"languageSkillConditions": [],
"operation": "Or"
}
]
}
],
"languageSkillConditions": [],
"operation": "And"
},
{
"routingSkillConditions": [
{
"routingSkill": "jun-test-API Skill - 2",
"comparator": "GreaterThan",
"proficiency": 3,
"childConditions": []
}
],
"languageSkillConditions": [],
"operation": "And"
},
{
"routingSkillConditions": [
{
"routingSkill": "jun-test-API Skill - 1",
"comparator": "GreaterThan",
"proficiency": 3,
"childConditions": []
}
],
"languageSkillConditions": [],
"operation": "And"
}
]

Thanks so much for your help!

Jun


Visit Topic to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, click here.