Sometime you need to connect third-party systems with ADvendio to access Salesforce Data. Here you can find the basic as an example that is used by Dataplan's Journal Designer.
...
Code Block | ||
---|---|---|
| ||
<?xml version="1.0" encoding="utf-8" ?> <env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"> <env:Body> <n1:login xmlns:n1="urn:partner.soap.sforce.com"> <n1:username>YOUR_USERNAME</n1:username> <n1:password>YOUR_PASSWORD_AND_TOKEN_TOKEN<TOGETHER</n1:password> </n1:login> </env:Body> </env:Envelope> |
The result should be the following:
Code Block | ||
---|---|---|
| ||
<?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="urn:partner.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <loginResponse> <result> ... <serverUrl>https://na7.salesforce.com/services/Soap/u/42.0/00DA0000000ck3y</serverUrl> <sessionId>SESSION_ID</sessionId> ... </result> </loginResponse> </soapenv:Body> </soapenv:Envelope> |
In the result, there is serverUrl and sessionId you should use then for subsequent calls to ADvendio.
...
Code Block |
---|
<?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Header> <ns1:SessionHeader soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustUnderstand="0" xmlns:ns1="urn:enterprise.soap.sforce.com"> <ns1:sessionId>SESSION_ID</ns1:sessionId> </ns1:SessionHeader> </soapenv:Header> <soapenv:Body> <invalidateSessions xmlns="urn:enterprise.soap.sforce.com"> <sessionIds>SESSION_ID</sessionIds> </invalidateSessions> </soapenv:Body> </soapenv:Envelope> |
The result should be the following:
Code Block |
---|
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="urn:enterprise.soap.sforce.com"> <soapenv:Body> <invalidateSessionsResponse> <result> <success>true</success> </result> </invalidateSessionsResponse> </soapenv:Body> </soapenv:Envelope> |
...