Skip to main content
7.7 Datasources

Create and manage Datasources for dynamic content, and use them in Display Rules to enable real-time updates.

Omma Sign avatar
Written by Omma Sign
Updated over a week ago

1. Introduction

  • What are Datasources?

    • Datasources in OmmaSign are tools that provide dynamic data, such as prices or weather, from external or internal sources.

  • Why Use Datasources in Display Rules?

    • Integrating datasources with display rules allows your content to update in real-time based on live data, ensuring that your displays are always relevant.


2. How to Integrate Datasources with Display Rules

  • Step 1: Accessing Datasources

    • Navigate to the Datasources section in OmmaSign.

  • Step 2: Creating a Datasource

    • Create a new datasource by naming it, selecting the type, and setting how often it refreshes.

    • Use the Editor to input or modify the JSON structure of the datasource directly in OmmaSign. This allows you to define custom data points that your display rules can reference.

  • Step 3: Attaching Datasources to Display Rules

    • Go to the content that you want to attach datasource to display rules. And click the display rules.

    • Press the datasource icon to choose and add your logic depends on what you need.

    • For example, if the temperature in the Istanbul is greater than 22, display the item.


3. Use Cases for Datasources in Display Rules

1. Price-Based Display Rule

Use Case: Show different content based on product price.

{
"products": [
{
"name": "Coffee Latte",
"price": 4.99
},
{
"name": "Espresso",
"price": 2.99
},
{
"name": "Cappuccino",
"price": 3.99
}
]
}

2. Weather-Based Display Rule

Use Case: Display content based on current weather conditions.

{
"weather": {
"city": "Istanbul",
"temperature": 25,
"condition": "sunny",
"humidity": 60
}
}

Example Rule:

  • If condition == "sunny", display summer promotions.

  • If temperature < 10, display winter gear.

3. Event-Based Display Rule

Use Case: Change content based on upcoming events.

{
"events": [
{
"title": "Black Friday Sale",
"date": "2024-11-29",
"promotion": "50% off on all items"
},
{
"title": "Christmas Special",
"date": "2024-12-25",
"promotion": "Buy 1 Get 1 Free"
}
]
}

Example Rule:

  • If date == "2024-11-29", show Black Friday content.

  • If date == "2024-12-25", show Christmas special content.

4. Inventory-Based Display Rule

Use Case: Display content based on inventory levels.

{
"inventory": [
{
"product": "Laptop",
"stock": 15
},
{
"product": "Smartphone",
"stock": 5
},
{
"product": "Tablet",
"stock": 0
}
]
}

Example Rule:

  • If stock == 0, show "Out of Stock" content.

  • If stock > 10, show "In Stock" content with promotion.

5. Traffic-Based Display Rule

Use Case: Adjust content based on real-time traffic data.

{
"traffic": {
"city": "London",
"status": "heavy",
"average_speed": 20
}
}

Example Rule:

  • If status == "heavy", display content encouraging public transport.

  • If average_speed > 40, show fast travel options.

_______

Previous: 7.6 Frequency

_______

Related

Did this answer your question?