function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Davide MolinariDavide Molinari 

openCTI - screenPop not passing arguments to flow

Hi all,
I'm working with the OpenCTI library and I want to invoke a flow through screenPop() method.

I create a visualforce page for testing purpose and according to the developer guide I wrote the folloing snippet of code:
function screenPopFlow() {

        date = '2018-08-21';
        duration = 10,00;
        subject = 'Incoming call';
        sforce.opencti.screenPop({ type: sforce.opencti.SCREENPOP_TYPE.FLOW,
                                  params: {flowDevName: 'ScreenDemo', flowArgs: [{ 'activityDate': date, 'duration': duration, 'subject': subject }]}, 
                                   callback : screenPopCallback });
        
    }
It seems that flow does not receive any values:
User-added image

OpenCTI version: 43

Anyone can suggest?

Thanks
Davide
 
Best Answer chosen by Davide Molinari
Davide MolinariDavide Molinari
FlowArgs are written in the wrong way: EACH flow variable requires an object of the array, in which you need to indicate:
- 'name': name of the variable
- 'type': type of the variable
- 'value': value of the variable

example --> [{'name': 'activityDate', 'type': 'Date', 'value': '2018-08-22'}]

All Answers

Davide MolinariDavide Molinari
FlowArgs are written in the wrong way: EACH flow variable requires an object of the array, in which you need to indicate:
- 'name': name of the variable
- 'type': type of the variable
- 'value': value of the variable

example --> [{'name': 'activityDate', 'type': 'Date', 'value': '2018-08-22'}]
This was selected as the best answer
Varun GaurVarun Gaur
Where you saved this vf page can you tell me step by step process as i stuck .