<Scenario Id="CreateCallActivity">
<Request Url="[Url]/services/data/v49.0/sobjects/task" RequestType="Post" RequestEncoding="Json" ResponseType="Json" >
<PostValues>
<Value Passes="2" Key="Subject">[[Subject]]</Value>
<Value Key="Status">Completed</Value>
<Value Key="Priority">Normal</Value>
<Value Key="TaskSubtype">Call</Value>
<Value Key="ActivityDate">[[CallStartTimeLocal].ToString("yyyy-MM-dd")]</Value>
<Value Key="CallDurationInSeconds">[[[DurationTimespan].get_TotalSeconds()].ToString("F0")]</Value>
<Value Key="CallType" Passes="2" If="[CallType]==Inbound">Inbound</Value>
<Value Key="CallType" Passes="2" If="[CallType]==Missed">Inbound</Value>
<Value Key="CallType" Passes="2" If="[CallType]==Outbound">Outbound</Value>
<Value Key="CallType" Passes="2" If="[CallType]==Notanswered">Outbound</Value>
<Value Key="Description" Passes="2" If="[CallType]==Inbound">[[InboundCallText]]</Value>
<Value Key="Description" Passes="2" If="[CallType]==Missed">[[MissedCallText]]</Value>
<Value Key="Description" Passes="2" If="[CallType]==Outbound">[[OutboundCallText]]</Value>
<Value Key="Description" Passes="2" If="[CallType]==Notanswered">[[NotAnsweredOutboundCallText]]</Value>
<Value Key="WhoId" If="[Contact::EntityType]!=Account">[Contact::EntityId]</Value>
<Value Key="WhatId" If="[Contact::EntityType]==Account">[Contact::EntityId]</Value>
<Value Key="OwnerId">[OwnerId]</Value>
</PostValues>
</Request>
</Scenario>