We use set participant data on inbound calls, set in architect, to save conversation details to our CRM system.
I am now looking for a way to do this using the scripter, for manual outbound calls, but I'm having issues finding the participant id.
Do anyone have an idea about how to get the participant id on the customer, that we are dialing?
The idea was to use the API to set the participant attributes, but it requires both conversation id and participant id as far as I can see.
Correct, you must know both the conversation ID and the participant ID to set participant attributes using the API. You will first need to retrieve the conversation object so you have the list of participants in the conversation. Then iterate over the participant list to identify the one that you want and then use its ID to set attributes on. This will probably be really tricky to do directly from Scripter, so you'll probably want to implement some sort of middleware site or service to handle that logic and have the script invoke your custom site/service.