Salesforce sending agreement from apex : Invalid user ID or email provided in x-api-user header.
Hi All
I am integrating adobe sign with B2B commerce in salesforce. I need to send an agreement on custom logic execution. The running user will be a Community user in the end but for now I test with Admin users.
I do not know how can I use the provided load and send methods to send the agreement as someone else ?
Id agreement = echosign_dev1.AgreementTemplateService.load(template.Id,order.ccrz__Contact__c,variablesMap );
echosign_dev1.EchoSignApiService.SendDocumentResult documentResult = echosign_dev1.EchoSignApiService.sendDocument(agreement);
I have tried to change the agreement template so that is has send on behalf of but this seems to only work if you use standard functionality and not loading from apex ? My running test user has :
Adobe Sign Allow Sending As Other Users![]() |
My created agreement record for which I have the error has :
| echosign_dev1__Sender_User__c | 0051t000001JziGAAS |
And that user whose Id is populated is valid admin user which has adobe sign account and I was able to use my functionality when logged in as that user.
It's worth mentioning that my Agreement template has no document loaded but It's setup to use Runtime Variable.
Regards,
Mateusz

