Map Salesforce User with Sender in OneSpan
Saturday, March 5, 2022 at 11:43amWe are using Apex SDK to create transaction in OneSpan, we aren't using OneSpan Salesforce Connector. We have API key for authentication. When the user create transactions in OneSpan from SF, sender is always OneSpan's user attached to master account.
My question is how can I map SF user with OS user/role/signer so that when User X creates a transaction in OneSpan from Salesforce SENDER must be User X and if User Y creates a transaction in OneSoan from Salesforce SENDER must be User Y.
Reply to: Map Salesforce User with Sender in OneSpan
Saturday, March 5, 2022 at 02:09pmHi ishant.kesar,
Unfortunately, OSS APEX sdk doesn't have the out-of-the-box capability to map SFDC user with OSS user, however if your code can handle this logic, the APEX sdk does allow to specify the transaction sender with below code:
OneSpanSDK sdk = new OneSpanSDK();
OneSpanAPIObjects.Package_x pkg = new OneSpanAPIObjects.Package_x();
pkg.name = 'Create Transaction from Salesforce - ' + Datetime.now().format();
pkg.description = 'This is an example transaction.';
pkg.emailMessage = 'This is an email message.';
pkg.status = OneSpanAPIObjects.PackageStatus.DRAFT;
//set sender
OneSpanAPIObjects.Sender sender = new OneSpanAPIObjects.Sender();
sender.email = 'your_sender_email'
pkg.sender = sender
sdk.createPackage(pkg);
Duo