Hana

Connect Hana to SegMetrics to unlock deeper insights, accurate revenue attribution, and full customer journey tracking. Gain clarity on the KPIs that matter most in your floral ecommerce and POS funnels.


Step 1: Access Integrations in SegMetrics

  1. Log in to your SegMetrics account.
  2. From your dashboard, click Settings.
  3. Navigate to Integrations.

Step 2: Select the API Integration

Because Hana does not have a native API, this integration is set up using the SegMetrics API. You will need to locate your SegMetrics API credentials to configure the connection.

  1. In SegMetrics, navigate to Settings then Integrations.
  2. Locate and open the API Integration.
  3. Take note of your Account ID, Integration ID, and API Key.

Step 3: Configure the SegMetrics Script in Hana

SegMetrics provides a custom PHP script to send your Hana order and contact data into SegMetrics. Your developer will use this script to complete the integration.

  1. Download and open the SegMetricsAPI.zip file provided by the SegMetrics team.
  2. Reference the SegMetricsExample.php file, which includes all available public methods and usage examples.
  3. Follow these steps to configure the script:
    1. Create the class by passing in your Account ID, Integration ID, and API Key from Step 2.
    2. Set the live or testing mode using setLive() . This defaults to TRUE . When in non-live mode, the API payload will be shown in the console so you can verify data before going live.
    3. Use doCreateContact()  to create or update a contact based on the order data.
    4. Use sendOrder()  to send the order into SegMetrics, just as the send_to_hana  method does in the original Hana code.
    5. Optionally, pass a products  array similar to the $cart_rows_query  from the original Hana code. If left empty, the class will run a $cart_rows_query  automatically using the same logic as the original code.

Note: If you are importing past orders, make sure the date_created  field reflects the original order date rather than the date the data is being sent. Use ini_set('date.timezone', 'America/Los_Angeles')  or adjust the timezone to match your store's location.


Step 4: Test and Go Live

  1. With setLive()  set to FALSE , run the script and verify the API payload in the console to confirm contacts and orders are being sent correctly.
  2. Once the data looks correct, set setLive()  to TRUE  to begin sending live data to SegMetrics.
  3. Reach out to the SegMetrics support team to confirm data is flowing in as expected.

Frequently Asked Questions

Q: Why is the Hana integration different from other integrations in SegMetrics?

A: Hana does not have a native API, so a direct integration is not possible. Instead, SegMetrics provides a custom PHP script that uses the SegMetrics API to send contact and order data from Hana into your SegMetrics account.

Q: Where do I find the credentials needed to configure the script?

A: Your Account ID, Integration ID, and API Key can all be found in the API Integration section of your SegMetrics account under Settings then Integrations.

Q: What does the testing mode do?

A: When setLive()  is set to FALSE , the script runs in testing mode and outputs the API payload to the console instead of sending live data. This lets you verify that contacts and orders are being formatted and sent correctly before going live.

Q: What happens if I leave the products array empty?

A: If no products array is passed, the script will automatically run a $cart_rows_query  using the same logic as the original Hana code to retrieve the order's line items.

Q: How do I make sure past orders use the correct date?

A: When importing historical orders, update the date_created  field in the script to use the original order date rather than the current date and time. Set ini_set('date.timezone', 'America/Los_Angeles')  or adjust the timezone to match your store's location to ensure order dates are accurate.

Q: What can I track once Hana is connected to SegMetrics?

A: With the integration active, you can track how your Hana orders and customer activity tie directly to revenue, monitor customer journeys from first touch through purchase and repeat orders, and gain clearer attribution across your funnels and campaigns.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us