Search

Create export file - JSON Package

Introduction and purpose

The following is an introduction to how to make use of JSON in Emply's export functionality.

The data to appear in a JSON export is user defined, therefore it is possible to set up pulls with exactly the data you need, to other systems, without having to work around data that is not needed.

The data in a JSON export should be seen as a "snapshot", taken by a profile at the last execution of the export, you should therefore make sure to execute your export again if you want updated data.

Executing an export can be done manually, automatically at a specific time, or automatically when changes are made - or data is created on profiles. This is set up and customized by the user using Emply's automation methods.

How do I create a JSON export?

Go to Settings > Integrations > Export > click '+ New Export' > select 'JSON Package'.

Here you give the export an internal description, choose if it should be used for 'Employee' and/or 'Candidate'.
Below you select the keywords that will represent the data you want to retrieve with your JSON export.

Sk_rmbillede_2023-02-20_kl._14.16.png

How to use a JSON export?

Once you have filled in the desired fields, copy the unique GUID at the bottom of your JSON Package:

Sk_rmbillede_2023-02-20_kl._14.18.15.png

 

Then you need to make an export on the employees you want to retrieve the data on.
Go to Employees > select the desired employees > press the burger icon and select 'Export':

Sk_rmbillede_2023-02-20_kl._14.19.41.png

 

Select desired JSON export > press 'Export':

Sk_rmbillede_2023-02-20_kl._14.22.49.png

 

Testing the JSON Package

Then go to the Emplys API. Here you should have your API key and JSON Package GUID ready.

To test in Emply's API, click 'Authorize', fill in your API key under 'Value' and finish by clicking 'Authorize':

Sk_rmbillede_2023-01-20_kl._13.05.58.png

 

Then select the 'Exports' endpoint, and first execute a GET request with the endpoint /v1/{customer}/exports/{exportId}.

  • exportId = GUID which can be found in the export setup.
  • customer = The first part of the platform domain e.g.: example.emply.com will have the word 'example' as customer.
  • languageKey = Not needed, used if the export is set up in multiple languages and you want to pull a speciic translation of the data.
  • from/to = To and from date of export.

Sk_rmbillede_020923_020029_PM.jpg

When the data is loaded you will get an entity for each employee where the export has run within the selected time period, an entity in this feature consists of 3 values:

  • ID = The Entity ID of the exported profile, the entity ID is created on the first run of the export and does not change, on future runs of the export the data associated with this entity ID will be updated.
  • Created = Date and for the last export of the entity. This is the date and time that will be read in the from/to parameter.
  • LanguageKey = The language from which this entity draws data.

To read the data in an entity, a GET request must be executed with the endpoint /v1/{customer}/exports/{exportId}/entities/{entityId}.

  • exportId = GUID which can be found in the export setup.
  • entityId = the 'ID' value of an entity retrieved in the previous call.
  • customer = The first part of the platform domain e.g.: example.emply.com will have the word 'example' as customer.

Sk_rmbillede_020923_022733_PM.jpg


Then the data set up the export will be displayed in JSON format, if the data is populated on the profile where the export is run.

 

How to use your JSON Package with Emplys API

Once the desired result is obtained after testing, programming of the traits can be done, the method would work the same way as when testing with this flow:

  1. Pull list of entities run in selected time period with endpoint: /v1/{customer}/exports/{exportId}.
  2. Use the entity ID and the endpoint: /v1/{customer}/exports/{exportId}/entities/{entityId} to see the data in the export.
  3. Save/process entity data as desired.
  4. Repeat steps 2 and 3 for each entity shown in step 1.

 

Setting up automation for JSON

Once you have created a JSON export it is possible to set up automation so that the API call happens automatically.

Go to Settings > Automation > click on 'New workflow':

Sk_rmbillede_2023-02-20_kl._14.28.02.png

 


In this example, we have selected 'Employee' as what the automation will deal with and that 'Created' will trigger the automation. Once this is set up and saved, click '+ Add Action':

Sk_rmbillede_2023-02-20_kl._14.30.21.png

 

Here we select 'Integration' as the action to be triggered:

Sk_rmbillede_2023-02-20_kl._14.31.27.png

 

Then we select the integration it should deal with. Here we select the desired JSON Package we have created:

Sk_rmbillede_2023-02-20_kl._14.32.31.png

 

Once the automation is set up remember to switch from 'Inactivated' to 'Activated':

Sk_rmbillede_2023-02-20_kl._14.33.12.png

 

Using automated exports, allows to have delta-like exports that only run when creating/changing data, automated exports are not necessary as JSON exports can be executed manually if desired.

Was this article helpful?

Was this article helpful?

Want to get in touch?

We got you. Fill out a request and we'll get back to you as soon as possible.

Submit a request