How to Consume a SOAP API Using the 'Soap API V2' Component in wolkvox Studio
Table of Contents
Introduction
The "Soap API V2" component in wolkvox Studio allows you to consume SOAP services directly within your flows. This enables you to query, update, create, or delete information in external systems without leaving the routing logic.
SOAP (Simple Object Access Protocol) is a protocol for exchanging information between systems using XML-structured messages. Unlike many "REST" APIs (which typically use JSON), SOAP usually involves sending an XML "envelope" containing the details of the operation you want to execute, and the server responds in XML as well.
This component is located in the Communications group and is available for Voice, Interaction, Chat, CRM + Webhook, and Agent Scripting.
Configuration
- Double-click the component to open its configuration panel (right side).
- Configure its fields:
- Configure the service URL: In "URL", paste the address of the endpoint you want to consume.
- If the service requires URL parameters (query params), include them there.
- Select the consumption method: In "Method", choose one of the available options based on your needs:
- GET: Retrieve information from a resource.
- POST: Send information to the server (create/send data).
- PUT: Update information for an existing resource (overwrites with what is sent).
- DELETE: Remove a resource.
- Add the required headers:
- In "Headers", enter each header required by the service (e.g., Content-Type, tokens, credentials, etc.).
- Click "Add" to include it.
- Verify that they are listed in the "Headers" table.
- Common SOAP tip: Many services use Content-Type: text/xml or application/soap+xml (depends on the service). Use exactly what the endpoint provider specifies.
- Write the body (XML SOAP) if applicable: In "Body", paste the content required by the service.
- For SOAP, this is usually where the XML with the operation's Envelope goes (e.g., <soapenv:Envelope>...</soapenv:Envelope>).
- If the method is GET and the service does not require a body, this field can remain empty (depends on the endpoint).
- Define where to store the response:
- In "Result", enter the variable where you want to store the response from the consumption (e.g., $soap_response).
- Keep in mind the default variables. The component also automatically records:
- $soap_api_time: Execution time of the consumption.
- $soap_api_code: Response code (useful for validating success/error and routing the flow).
- Save the configuration: Click "Save" to apply the changes.
- Configure the service URL: In "URL", paste the address of the endpoint you want to consume.
