"Send Request" node

Amazon API Gateway allows developers to create, publish, maintain, and secure APIs at any scale. By integrating with a specific endpoint, users can trigger AWS Lambda functions, forward message to Amazon SQS, interact with backend services, or access AWS resources through an HTTP request. The integration between Synerise and Amazon API Gateway allows you to send any requests from Synerise.

This node can be used in customer-oriented and business workflows. A reponse from the endpoint generates the amazonApiGateway.sendRequest event. The name of the event is customizable in the configuration form of this node.

Prerequisites


Node configuration


  1. To create a workflow that sends a request to Amazon API Gateway, go to Automation > Workflows > Create new.
  2. Start the workflow with a trigger node, (for example, "Scheduled Run" node).
  3. On the trigger node, click THEN.
  4. Click Amazon API Gateway > Send request.
  5. Click Select connection.
  6. From the dropdown list, select the connection.

Create a connection

To allow the data exchange, establish a connection between Synerise and Amazon API Gateway.

  1. At the bottom of the Select connection dropdown list, click Add connection.
  2. In the Connection name field, enter the name of the connection.
    It will only be visible on the list of connections and will help you recognize it on the list.
  3. In the API key field, enter your Amazon API key which lets you receive external requests.
  4. Confirm by clicking Apply.

Define the integration settings

In this step, fill in the form that allows you to send data from Synerise to Amazon API Gateway.

Blank configuration form of the Send request node
Blank configuration form of the Send request node
  1. Select a HTTP method from the dropdown list.

  2. In the Stage invoke URL field, enter the URL of your API Gateway under which your resource is published. This is the base URL used to invoke your deployed API at a specific stage (for example, dev, prod). It’s the entry point for calling your API, the resource path is added in the next field. Example value: https://abc123.execute-api.us-east-1.amazonaws.com/prod

  3. In the Resource path field, enter the path which is added to the stage URL to access a particular resource or endpoint.
    Example values: /users/create; /orders/{orderId}

  4. In the Content Type enter the value of the Content-Type header.

  5. In the Body field, enter the request body.

  6. In the Response action field, enter the event name in which the response to the requests will be saved. By default, it’s amazonApiGateway.sendRequest. We recommend customizing the event name per each business case. The event will be generated only for the customer-oriented workflows on the profile cards of the customers who participated in the workflow.

  7. In the Additional event parameters section, you can add parameters (key-value) which will be added to the event with the request response. It should be noted that:

    • You can add up to 10 parameters
    • You can use Jinjava in the parameter value
    • The parameter name cannot exceed 128 characters
    • The parameter name cannot contain special characters
  8. Confirm by clicking Apply.

Example of use


In this example, let’s assume you already have your own email marketing tool, and Synerise serves as your primary data hub. By using real-time customer segmentation and analytics in Synerise and your email tool, you can benefit from both systems through the integration of Synerise and this tool via Amazon API Gateway.

The workflow will start at the defined date for selected group of customers. Information about these customers will be retrieved by the Send request node and exported to Amazon API Gateway. Jinjava will retrieve parameter values for each customer.

The data after sending the request will be available in Amazon SQS for further use in the Amazon email marketing tool.

  1. Start with the Audience node.
  2. In the configuration of the node:
    1. In the Run trigger section define the frequency and/or date and time when this node will be triggered.
    2. In the Define audience section, select an existing segmentation (the Segments tab) or define the conditions a customer must meet to be included in the node (the New audience tab).
    3. Confirm the settings by clicking Apply.
  3. Add the Send request node. In the configuration of the node, fill out the fields according to the instructions in the “Node configuration” section.
    Below, you can find an example request body:
    {
      "firstName": "{% customer firstname %}",
      "email": "{% customer email %}",
      "lastPurchasedItem": "{% aggregate %} UUID {% endaggregate %}"
    }    
        
    The values of these parameters will be replaced with the data of customers who arrive at the Send request node. The value of the lastPurchasedItem parameter is the result of an aggregate which returns the name of the last purchased item by the customer.
  4. Finish the node by adding the End node.
    Result:
    Final workflow configuration
    Final workflow configuration
πŸ˜•

We are sorry to hear that

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

πŸ˜‰

Awesome!

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

Close modal icon Placeholder alt for modal to satisfy link checker