# Integration Specifications

&#x20;

## API Endpoints

The Daasity Emplifi extractor is built based on this [Emplifi (Social Bakers) API Documentation](https://api.socialbakers.com/#dataapi). The following endpoints are used by Daasity to replicate data from Emplifi:

* [Profile Metrics](https://api.emplifi.io/#profile-metrics)
* [Posts](https://api.emplifi.io/#posts)
* [Aggregated Post Metrics](https://api.emplifi.io/#aggregated-post-metrics-crossplatform)

## Entity Relationship Diagram (ERD)

[This link diagram houses the ERD ](https://lucid.app/lucidchart/12de6b6a-f126-45dc-81ef-9356eadd0a3b/edit?page=0_0#)for the Daasity Emplifi integration illustrating the different out-of-box tables and keys used to join across tables.  Hover over the embedded diagram to reveal controls to zoom and scroll.

## Emplifi Schema

The Daasity Emplifi extractor creates these tables using the endpoints and replication methods listed. The data is mapped from source API endpoint to the table based on the mapping logic outlined in each table.

* Custom Reports (Metrics)
* Profiles
* Posts
* Aggregated Metrics

**Note:** The default tables in the Emplifi schema use the Posts API.  The Profile Metrics and Aggregated Post Metrics API generate custom tables within the Daasity platform

## Custom Reports (Metrics Endpoint)

This endpoint is a custom endpoint that must be configured within the Daasity App - review this [article](http://support.daasity.com/knowledge/how-to-setup-emplifi) on how to setup custom reports

The integration runs on a daily basis with a primary and secondary extract:

1. Primary Extract: the integration extracts all the Profiles that are available within each platform
2. Secondary Extract: the integration extracts the dimensions and metrics as specified in the integration setup for each profile within each platform

The Emplifi integration has certain limitations as outlined [here](https://api.socialbakers.com/#limits):

* Can only extract 12 months of history at one time
* Limited to 25 metrics per report

**CAUTION:** The Daasity integration with Emplifi only extracts data from the six (6) supported platforms in the Profile Metrics section of the Data API

All custom tables generated by the Emplifi integration will be created in the \[emplifi] schema within the database.

* Update Method: UPSERT

The table name and definition is based on the selections made when setting up each report within the Daasity app.  Every report will have at a minimum the following fields:

| **Emplifi Field** | **Database Column** |
| ----------------- | ------------------- |
| date.day          | date\_day           |
| profile           | profile             |

Additional metrics and dimensions can be selected based on the platform selected:

* [Facebook](https://api.socialbakers.com/#facebook-metrics)
* [Instagram](https://api.socialbakers.com/#instagram-metrics)
* [Twitter](https://api.socialbakers.com/#twitter-metrics)
* [YouTube](https://api.socialbakers.com/#youtube-metrics)
* [LinkedIn](https://api.socialbakers.com/#linkedin-metrics)
* [Pinterest](https://api.socialbakers.com/#pinterest-metrics)

**NOTE:** When selecting additional metrics and dimensions, you can only select one dimension noted with a \* and you can only select metrics with dimensions that are listed in the Social Bakers documentation above

## Profiles Table

The \[profiles] table is generated by requesting a list of all the profiles connected in Emplifi for each platform by using the [List of Connected Profiles endpoint](https://api.socialbakers.com/#list-of-connected-profiles)

This is the first extract run on a daily basis to determine if any new profiles have been added to Emplifi

* Update method: UPSERT
* Table Name: emplifi.profiles

| **Emplifi Field**                                                | **Database Column** |
| ---------------------------------------------------------------- | ------------------- |
| id                                                               | profile\_id         |
| N/A - determined based on the {network} passed into the API call | social\_platform    |
| name                                                             | name                |
| timezone                                                         | timezone            |
| insights\_enabled                                                | insights\_enabled   |

## Posts Table

Posts, Post Labels and Post Attachment tables are generated for 4 of the 6 supported platforms as two of the platforms do not provide any meaningful data.

The \[social\_platform\_posts], \[social\_platform\_post\_label] and \[social\_platform\_attachments] tables are generated by using these four endpoints:

* [Facebook](https://api.socialbakers.com/#facebook-page-post-metrics)
* [Instagram](https://api.socialbakers.com/#instagram-profile-post-metrics)
* [Youtube](https://api.socialbakers.com/#youtube-profile-video-metrics)
* [LinkedIn](https://api.socialbakers.com/#linkedin-profile-post-metrics)

## **Posts**

* Update method: INSERT
* Table Name: emplifi.social\_platform\_posts

**NOTE:** Post Metrics are captured daily and use an insert so trends on how a post has performed over time can be measured.  Thus to capture the current performance of a post you must select the most recent row from the table.

To see performance over time make sure to include the \_\_sync\_date in your reporting which identifies when the data was captured

**Post Labels**

* Update method: UPSERT
* Table Name: emplifi.social\_platform\_post\_labels

## **Post Attachments**

* Update method: UPSERT
* Table Name: emplifi.social\_platform\_posts\_attachments

## Aggregated Metrics

Aggregated metrics extracts are created dynamically through a support request to the Daasity team - please contact <support@daasity.com> to setup your aggregated metrics.  The tables are generated by extracting data from the [Aggregated Post Metrics API](https://api.socialbakers.com/#aggregated-post-metrics-crossplatform) which must be configured for the specific metric and level of detail desired.

Each metric will be stored in its own table and can at one of two levels of detail, either at the profile level or at the profile / post label level

**Profile**

Tables names as \[metric\_profile] are at the profile level of detail and will have daily results across all platforms for that metric and profile

* Update method: UPSERT
* Table Name: emplifi.metric\_profiles

## **Profile Post Labels**

Extracts at the profile / post label level of detail will generate two tables for each metric.

\[metric\_profile\_post\_label] for daily results across all platforms for that metric at the profile and post-label level of detail<br>

* Update method: UPSERT

\[metric\_post\_label] which contains the post labels for each profile

* Update method: UPSERT


---

# 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://help.daasity.com/core-concepts/data-integrations/setup-guides/digital-integrations/emplifi/integration-specifications.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.
