|
| 1 | +--- |
| 2 | +title: Elastic Path Source |
| 3 | +hidden: true |
| 4 | +--- |
| 5 | + |
| 6 | +[Elastic Path](https://www.elasticpath.com?utm_source=segmentio&utm_medium=docs&utm_campaign=partners){:target="_blank"} is a SaaS based headless commerce platform that provides core commerce with a focus on catalog and product data management and modern merchandising capabilities so that brands can power their complex commerce experiences across multiple geographies, touchpoints, brands, and business models. |
| 7 | + |
| 8 | +This is an [Event Cloud Source](/docs/sources/#event-cloud-sources){:target="_blank"} which can not only export data into your Segment warehouse, but can also federate the exported data into your other enabled Segment Destinations. |
| 9 | + |
| 10 | +This source is maintained by Elastic Path. For any issues with the source, contact the [Elastic Path Support team](https://support.elasticpath.com/hc/en-us){:target="_blank"}. |
| 11 | + |
| 12 | +## Getting started |
| 13 | + |
| 14 | +1. Navigate to **Connections > Catalog** and make sure you're on the **Sources** tab of the catalog. |
| 15 | +2. Search for **Elastic Path** in the Sources Catalog, select **Elastic Path**, and click **Add Source**. |
| 16 | +3. Give the Source a name and configure any other settings. |
| 17 | + - The name identifies this source within your workspace, and typically reflects the name of the application. The name can be anything, but Segment recommends that you use something that reflects the source itself and distinguishes amongst your environments (for example, `SourceName_Prod`, `SourceName_Staging`, or `SourceName_Dev`). |
| 18 | +4. Click **Add Source** to save your settings. |
| 19 | +5. Copy the Write key from the Segment UI and log in to the Elastic Path Commerce Manager. |
| 20 | +6. Navigate to Integrations Hub > Select Segment integration > [configure integration](https://elasticpath.dev/docs/composer/integration-hub/customer-management/segment){:target="_blank"} where you need to use Segment key. |
| 21 | + |
| 22 | +This integration uses JSONata templates to provide flexibility to send your custom fields to Segment. |
| 23 | + |
| 24 | +You can configure how you want to associate an Elastic Path event with Segment event for streaming data. For example, send the `Order Completed` event to Segment when the Elastic Path order event is `order.paid` or `order.authorized` or if order is fulfilled, for example, `order.fulfilled`. |
| 25 | + |
| 26 | + |
| 27 | +## Events |
| 28 | + |
| 29 | +The table below lists events that Elastic Path sends to Segment. These events appear as tables in your warehouse, and as regular events in other Destinations. |
| 30 | + |
| 31 | +| Event Name | Description | |
| 32 | +| -------------------------------- | ---------------------------------------------------------------------- | |
| 33 | +| `Customer Created` | Creating identity in Segment. | |
| 34 | +| `Customer Updated` | Updating identity in Segment | |
| 35 | +| `Checkout Started` | When a user started the checkout process. For example, when a user creates an order. | |
| 36 | +| `Order Completed` | Tracks when a user completes their order. For example, when an order is paid or authorized. | |
| 37 | +| `Order Updated` | When an order is updated. For example, when the user updates the shipping address. | |
| 38 | +| `Order Cancelled` | When a user cancels an order. | |
| 39 | +| `Order Refunded` | When a user refunds an order. | |
| 40 | + |
| 41 | +## Event properties |
| 42 | + |
| 43 | +The property name tables below of the different events list the properties included in the events listed above. |
| 44 | + |
| 45 | +### Identity events |
| 46 | + |
| 47 | +The following payload contains the properties for the following events: |
| 48 | + |
| 49 | +- `Customer Created` |
| 50 | +- `Customer Updated` |
| 51 | + |
| 52 | +| Property Name | Description | |
| 53 | +| ----------------------- | ------------------------------------------------------------------------------------------------------------------ | |
| 54 | +| `userId` | The customer ID of Elastic Path Composable Commerce. | |
| 55 | +| `traits` | The free-form dictionary of traits of the user, like email. | |
| 56 | +| `traits.name` | The customer name. | |
| 57 | +| `traits.email` | The customer email. | |
| 58 | + |
| 59 | +**Note**: You can add any custom fields as well as part of the traits e.g. age, gender, title, phone etc. |
| 60 | + |
| 61 | +### Order events |
| 62 | + |
| 63 | +The following payload contains the properties for the following events: |
| 64 | + |
| 65 | +- `Checkout Started` |
| 66 | +- `Order Completed` |
| 67 | +- `Order Updated` |
| 68 | +- `Order Cancelled` |
| 69 | +- `Order Refunded` |
| 70 | + |
| 71 | +| Property Name | Description | |
| 72 | +| --------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | |
| 73 | +| `userId` | If the registered user places an order, then the value of the userId is the Customer ID. Otherwise, it will be the order ID. You can change this as per your requirement. | |
| 74 | +| `event` | The event name, for example, `Checkout Started`, `Order Completed`. | |
| 75 | +| `properties` | This holds information about the order. | |
| 76 | +| `properties.order_id` | The Elastic Path Order ID. | |
| 77 | +| `properties.value` | The revenue ($) with discounts and coupons added in. For better flexibility and total control over tracking, Elastic Path lets you decide how to calculate how coupons and discounts are applied. This is usually required for the `Checkout Started` event. | |
| 78 | +| `properties.total` | The revenue ($) with discounts and coupons added in. For better flexibility and total control over tracking, Elastic Path lets you decide how to calculate how coupons and discounts are applied. This is usually required for all the events apart from the `Checkout Started` event. | |
| 79 | +| `properties.revenue` | The revenue ($) associated with the transaction (excluding shipping and tax). This is usually required for all the events apart from the `Checkout Started` event. | |
| 80 | +| `properties.tax` | The total tax associated with the transaction. | |
| 81 | +| `properties.discount` | The total discount associated with the transaction. | |
| 82 | +| `properties.shipping` | The shipping cost associated with the transaction. | |
| 83 | +| `properties.currency` | The currency code associated with the transaction. For example, GBP, USD. | |
| 84 | +| `properties.products` | The list of products in order. | |
| 85 | +| `properties.products.$.product_id` | The product ID. | |
| 86 | +| `properties.products.$.name` | The product name. | |
| 87 | +| `properties.products.$.sku` | The product SKU. | |
| 88 | +| `properties.products.$.price` | The product unit price. | |
| 89 | +| `properties.products.$.quantity` | The quantity of a product. | |
| 90 | + |
| 91 | +Note: Elastic path uses properties of these events from the [eCommerce Spec](/docs/connections/spec/ecommerce/v2){:target="_blank"} defined by the Segment doc. Add more properties as per this documentation based on your business requirement. |
| 92 | + |
| 93 | +## Add destinations |
| 94 | + |
| 95 | +After you configure your source, you can connect it with destinations. Log in to your downstream tools and check to see that your events appear as expected, and that they contain all of the properties you expect. If your events and properties don’t appear, check the Event Delivery tool, and refer to the destination docs for each tool for troubleshooting. If there are any issues with how the events arrive to Segment, contact the [Elastic Path Support team](https://support.elasticpath.com/hc/en-us){:target="_blank"}. |
0 commit comments