Testing a deployed integration

After you deploy a flow, you can test it by triggering the event in the source application or calling an API.

About this task

Testing a deployed event-driven flow

To test a deployed event-driven flow, complete the event that triggers the flow then check for the expected results in the target applications.

Procedure

  1. In the source application for your flow, complete the event that triggers the flow.
    For example, if the flow is triggered when Salesforce cases are created, create a case in the Salesforce account that your flow connects to.
    An event-driven flow that creates a ticket in ServiceNow when a new case is created in Salesforce.
  2. Check the target applications in your flow to verify that you can see the expected results.
    For example, check your ServiceNow instance to verify that a corresponding ticket is created for the new case.

Testing a deployed API flow

A deployed API flow consists of a single API and its operations. To test this API, you can call its operations.

Procedure

To call the API, complete the following steps.

  1. To view the API definition for the deployed API flow, go to the Integrations tab of the Manage page and click the tile for the API flow.

    On the Documentation tab, the Overview section displays the type of API, the protocol, and the base URL for the API endpoint. You can use the Download OpenAPI Document link to view the OpenAPI document that describes the API. If you download the API document, it is saved as a YAML file to the default download location that is configured for your browser. The format of this file name is APIname-version.yaml; for example, Customer_API-0.0.1.yaml.

    You can view the details of each API operation that was configured in the flows for the imported API. You can then use these details to test the operation. The operation's description has a tag to identify which model (defined in the API flow) the operation belongs to.

    The following information is displayed for each operation.
    • The HTTP request for the operation.
    • The header parameters in a collapsible section.
    • The body, path, or query parameters with examples, and the schema if relevant, in collapsible sections. The parameters that you see depend on the operation's settings.
      HTTP request and parameters for an API operation
    • Languages that can be used when you make the request, and a code sample to call the operation in the selected language.
    • Response codes for the operation, and the response body schema with an example.
      Sample requests in tooling languages, and responses for an API operation
    You can also click Definitions and expand the sections to view the schema definition for each model of the API, and an example with sample values.
    API model definitions
  2. To test any of the API operations, click the operation, then click the Try it tab.
    This example shows how to test the following GET operation to retrieve the details of a customer contact in Salesforce by using a unique contact ID. The Details tab indicates that a Customer ID is mandatory.
    HTTP request and parameters for a sample GET operation
    1. From the Try it tab, specify the ID of an existing Salesforce contact in the CustomerID field. (You can use the Generate link to generate a sample value, but the test fails for a GET operation with a generated value because the Customer ID must represent an actual Salesforce contact.)
      Completed try tab for a sample GET operation
    2. Click Send to send the GET request for the API, then check the request and the response that are displayed.
      For the GET example, the Response section displays the returned success code (200 OK), the headers, and the contact details from Salesforce for the specified CustomerID value.
      Sample response for an API call
  3. Optional: If appropriate for the operation, check for the expected results in the target applications.
    For the GET example, you can verify that the retrieved details represent a contact that exists in the Salesforce instance. The contact ID in the URL for the Salesforce record is identical to the CustomerID value that was specified for testing.
    Sample response for an API call