We have an outbound IVR integration that we would like to bring over to PureCloud, for the purpose of calling our Salesforce contacts for ongoing campaigns. The contact list would be changing on a regular basis, and it looks like the Platform API has the means to make changes to an existing list for that purpose.
For our inbound call handling, we were able to leverage the Salesforce Data Actions connection to access our custom Salesforce web services; there doesn't appear to be an Apex toolkit or other ready-made solution for going the other way and updating a PureCloud campaign from Salesforce, is that correct?
Following up on this discussion, if I were to create an Apex OAuth client, could I use a Client Credentials Grant to access the Platform API and update my campaign?
[At this point, ] the application would authenticate, identify the Campaign, and replace the contents / contacts with the current active contact list.
I'm not very familiar with writing Apex scripts, though it should be possible if you can make a POST request to get your auth token and use it in the header for subsequent requests.
My biggest concern is that I don't know how Apex scripts are executed. If it's client side, then you absolutely must not do this. An OAuth client's client secret must be handled as a password, so if the Apex script is running client side, the password would have to be exposed to the client. Mishandling the client secret like that is a security breach and will result in your oauth client being deactivated. If Apex scripts are all server-side, it should be fine since the user will never see the secret.
This would be server side, and there would be no user interaction; these would be periodic / scheduled processes to customize the campaign based on Salesforce data.