Skip to content

Commit

Permalink
POST /sessions: SessionEnd and SessionStart to SessionEndTime a…
Browse files Browse the repository at this point in the history
…nd `SessionStartTime`
  • Loading branch information
AleksandrMolchagin committed Dec 16, 2024
1 parent fc66a38 commit 1cf7079
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions docs/Scores - Salesforce Data API.postman_collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -929,6 +929,7 @@
"body": {
"mode": "raw",
"raw": "{\n \"SessionDate\": \"2024-11-19\",\n \"SessionTopic\": \"Game Day\",\n \"TeamSeasonId\": \"a0qcX000000GEggQAG\",\n \"SessionStart\": \"16:00:00.000Z\",\n \"SessionEnd\": \"18:00:00.000Z\" \n \n}",
"raw": "{\n \"SessionDate\": \"2024-11-19\",\n \"SessionTopic\": \"Game Day\",\n \"TeamSeasonId\": \"a0qcX000000GEggQAG\",\n \"SessionStartTime\": \"16:00:00.000Z\",\n \"SessionEndTime\": \"18:00:00.000Z\" \n}",
"options": {
"raw": {
"language": "json"
Expand Down
12 changes: 8 additions & 4 deletions src/main/mule/sessions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,8 @@ output application/java
---
[{
Session_Date__c: payload.SessionDate as Date {format: 'yyyy-MM-dd'},
(Session_Start__c: payload.SessionStart as Time) if payload.SessionStart != null,
(Session_End__c: payload.SessionEnd as Time) if payload.SessionEnd != null,
(Session_Start__c: payload.SessionStartTime as Time) if payload.SessionStartTime != null,
(Session_End__c: payload.SessionEndTime as Time) if payload.SessionEndTime != null,
Session_Topic__c: payload.SessionTopic,
Team_Season__c: payload.TeamSeasonId
}]]]></ee:set-payload>
Expand Down Expand Up @@ -340,7 +340,9 @@ output application/json
]]></ee:set-variable>
</ee:variables>
</ee:transform>
<salesforce:query doc:name="Select Query with sessionId from Assessment object" doc:id="1e288924-44bc-4e3c-b544-5b51936d7367" config-ref="Salesforce_Config" target="assesmentResponse" targetValue="#[output application/json &#10;---&#10;payload]">
<salesforce:query doc:name="Select Query with sessionId from Assessment object" doc:id="1e288924-44bc-4e3c-b544-5b51936d7367" config-ref="Salesforce_Config" target="assesmentResponse" targetValue="#[output application/json
---
payload]">
<salesforce:salesforce-query ><![CDATA[SELECT Id FROM Assessment__c WHERE Session__c = ':sessionId'
]]></salesforce:salesforce-query>
<salesforce:parameters ><![CDATA[#[output application/java
Expand All @@ -349,7 +351,9 @@ output application/json
sessionId : vars.sessionId
}]]]></salesforce:parameters>
</salesforce:query>
<salesforce:query doc:name="Select Query with sessionId from Attendence object" doc:id="cfe08f1a-cc1a-4102-bf59-a6aaeb021ec5" config-ref="Salesforce_Config" target="attendanceResponse" targetValue="#[output application/json &#10;---&#10;payload]">
<salesforce:query doc:name="Select Query with sessionId from Attendence object" doc:id="cfe08f1a-cc1a-4102-bf59-a6aaeb021ec5" config-ref="Salesforce_Config" target="attendanceResponse" targetValue="#[output application/json
---
payload]">
<salesforce:salesforce-query ><![CDATA[SELECT Id FROM Attendance__c WHERE Session__c = ':sessionId' AND Attended__c = true
]]></salesforce:salesforce-query>
<salesforce:parameters ><![CDATA[#[output application/java
Expand Down

0 comments on commit 1cf7079

Please sign in to comment.