ishant.kesar | Posts: 19

Map Salesforce User with Sender in OneSpan

0 votes

We 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.


Duo_Liang | Posts: 3776

Reply to: Map Salesforce User with Sender in OneSpan

0 votes

Hi 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


Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off