Skip to content

Commit

Permalink
Merge pull request #812 from burzekj/web_msg_logic_fix
Browse files Browse the repository at this point in the history
web_msg logic fix
  • Loading branch information
Rafalz13 authored Nov 15, 2023
2 parents 3389cb1 + 090eb2a commit af3b837
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added new view type `agent_interaction_view_type` in `Genesys`source.
- Added libraries `nltk` and `sklearn` to `requirements`.

### Fixed
- Fixed bug for endpoint `conversations` in GET method in `Genesys` Task.

### Changed
- Splitted test for Eurostat on source tests and task tests
- Modified `SharepointList` source class:
Expand Down
22 changes: 18 additions & 4 deletions viadot/tasks/genesys.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,13 +487,27 @@ def run(
temp_dict = {
key: value for (key, value) in attributes.items() if key in key_list
}
temp_dict["conversationId"] = json_file["id"]
temp_dict["startTime"] = json_file["startTime"]
temp_dict["endTime"] = json_file["endTime"]
temp_dict["conversationId"] = json_file.get("id")
temp_dict["startTime"] = json_file.get("startTime")
temp_dict["endTime"] = json_file.get("endTime")
data_list.append(temp_dict)

desired_order = [
"startTime",
"endTime",
"LOB",
"CustomerOutcomeResult",
"CustomerOutcomeTrack",
"LastUtterance",
"Final Sub Intent",
"SubIntent",
"Final Main Intent",
"conversationId",
]

df = pd.DataFrame(data_list)
df = df[df.columns[-1:]].join(df[df.columns[:-1]])
df = df[desired_order]
df.rename(columns={"LastUtterance": "CustomerTextInput"}, inplace=True)

start = start_date.replace("-", "")
end = end_date.replace("-", "")
Expand Down

0 comments on commit af3b837

Please sign in to comment.