# Marketing & Offers

{% hint style="info" %}
Implementation is **OPTIONAL**
{% endhint %}

### General flow

* Smarts shows marketing offers inside app after client log in to store.
* Client will tap to add the offer to shopping cart
* Client can accept more offers during the shopping process (tab will be available)
* **COMING SOON !** Cross-sale offer can be send along with product data which will be displayed after product has been added to shopping cart.

### Configuration

**Implement required SDK methods for offers and marketing.** There is no additional configuration needed at the moment.

### Implementation

You only need to create a new class, implement **`OfferAdapter`** interface and fill all required methods.  API endpoints for marketing are created automatically and secured with token.&#x20;

It is important to add `@Component` annotation on top of the class. There is no restriction for class name or location in your project. Our SDK will find your implementation based on the interface (DI).

```java
import ee.smarts.common.v1.Entities.offer.Offer;
import ee.smarts.common.v1.requests.OfferSearchRequest;
import ee.smarts.starter.adapter.OfferAdapter;
import org.springframework.stereotype.Component;
import java.util.List;

@Component
public class OfferServiceImpl implements OfferAdapter {

    @Override
    public List<Offer> searchOffers(OfferSearchRequest request) {
        // implement this method
        return null;
    }
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.smarts.ee/integration/spring-boot-starter/marketing-and-offers.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
