Push data into the Member Data Service
The following workflow outlines a process for pushing data from an external source into the Alida Member Data Service.
This workflow will function acceptably for small volumes of data of up to 1,000 members; however, it may not scale well when dealing with large volumes of data. To improve performance, see Best practices: Optimization.
Below is a diagram outlining the simplest process for pushing data into the Alida Member Data Service. Click the corresponding steps below the diagram for more information about each stage of the process.

A. Select the target Member Variable

Based on the integration in question, there will be a set of target Member Variables where data is stored in the Member Data Service. These are typically defined when describing the requirements for the integration.
The simplest way to describe these target variables is with the
name
attribute. However, we recommend describing the
target using the actual
memberVariableId
and to maintain it in the input
mapping. This is because the
name
attribute could be changed independently,
resulting in a new Member Variable being created the next time an integration
flow is executed.
At this step in the process, you will want to select one of the target Member Variables from your list.
B. GET Member Variable

Call the
/membervariables resource to check if the target
membervariable
exists and to get the identifier if it
does.
The key information to extract from this response is the
id
attribute which will be described as
memberVariableId
in other resources.
You may also want to validate the
type
and
datatype
attributes to ensure that they are as
expected.
Example: Member Variable exists |
---|
Request URL:
Response Content:
|
Example: Member Variable does not exist |
---|
Request URL:
Response Content:
|
C. Does the Member Variable exist?

The call in step B: GET MemberVariable will determine if the Member Variable exists.
If the Member Variable | Then |
---|---|
Exists | The
memberVariableId should be persisted for
subsequent usage.
|
Does not exist | Create one with a POST request in step D: POST Member Variable. |
D. POST Member Variable

If the POST is successful, then the response code will be an HTTP 201. The Location response header will contain the URL to the created instance. Alternatively, you can repeat the earlier call to look it up by name.
Example: Create a new Member Variable |
---|
Request URL:
Request Body:
|
E. Check for more Member Variables

Determine if there are any more target Member Variables and verify that they exist.
If more Member Variables | Then |
---|---|
Exist | Return to step A: Select the target Member Variable. |
Do not exist |
Proceed to step F: Select the member. |
F. Select the member

If you are ready to iterate through the list of members for which data will be pushed, pick a member from the list and proceed to step G: GET member by identifier.
G. GET member by identifier

When processing a member, you need to check to see if that member already exists.
Given the time-series nature of Member Values, the
email
property will still match a member even if that
member has subsequently changed their email address. Because the email Member
Variable applies the
uniquePerMember
constraint, the system will ensure
that a given Member Variable Value (such as the email address) is only ever
assigned to one member in your community.
Example: Member exists |
---|
Request URL:
Response Content:
|
Example: Member does not exist |
---|
Request URL:
Response Content:
|
H. Does the member exist?

If the member | Then |
---|---|
Exists | Proceed to step K: Select the target Member Variable |
Does not exist | Complete step I: Create a Member. |
I. Create member

A member is automatically created when you post a Member Value that includes an email address that has never been assigned to a member before. This will include assignment of a number of other Member Values for System Variables that can subsequently be retrieved. You can look up the new member ID by checking if a member exists (step G: GET member by identifier). Alternatively, the Location response header will include the URL to the Member Value instance created which would contain the member ID.
Furthermore, if you include the request header
X-WebApi-Return-Resource=true
, then the HTTP 201
response on successful creation following the POST will also return the created
Member Value in the body of the response (preventing a subsequent GET).
Example |
---|
Request URL:
Request Body:
|
J. Select target Member Variable

Once you know the member ID, select a Member Variable from the list you defined for which there is data for this member.
K. GET the latest Member Values

This step is not required from a functional perspective, since the time-series nature of Member Values will ensure that sending POST requests of the same data over and over again will produce the same result (i.e. idempotent) in terms of the resulting current or latest Member Value(s) for a given member. However, doing so affects the performance and data management overhead that is best avoided. For this reason, we recommend looking up the current or latest value first to avoid unnecessary POST requests
Example: Member Values exist |
---|
Request URL:
Response Content:
|
L. Does current target differ from current source?

If | Then |
---|---|
The current target is different from the current source | Proceed to step M: Post new Member Values. |
The current target is the same as the current source | Proceed to step N: More Member Variables? |
M. POST new Member Value(s)

If the current Member Value(s) for the member do not match the information coming from the source for the integration, then it will be necessary to update the Member Data Service with this information. This is done by sending a POST request to Member Values with the new information.
Example |
---|
Request URL:
Request Body:
|
N. More Member Variables?

If there are more Member Variables that have not been processed for this member, then loop back to step K: Select the target Member Variable , and repeat the process for the next variable. If not, move on to the next member.
O. More members?

If there are more members to process, then move on to the next one. If not, the process is complete.