How to Demo
The prototype has three core components outside of this developer portal:
- The Rolodex Data Product - provides a RESTFul API modelling People and Organisations with a Party supertype.
- The Salesforce Adapter - listens for People and Organisation Create, Update and Delete events from the Rolodex Data Product, and actions in a Salesforce Developer instance.
- The Dynamics Adapter - listens for People Create and Delete events from the Rolodex Data Product, and actions in a PowerApp.
Get a JWT authentication token
POST your credentials to /auth/login either in the OpenAPI docs or curl.
export ACCESS_TOKEN=$(curl -s -X 'POST' \
'https://rolodex.aucourant.co.uk/auth/login' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{"username": "your-id", "password": "your-pwd"}' | jq -r '.access_token')
If the credentials are recognised, you get a 200 response and the ACCESS TOKEN environment variable will have a value like this:
echo $ACCESS_TOKEN
eyJhbGciOiPOIzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWJqZWN0Ijp7InVzZXJuYW1lIjoianVzdGluIiwicm9sZXMiOlsidXNlciIsImFkbWluIl19LCJ0eXBlIjoiMNBjZXNzIiwiZXhwIjoxNzUzMzU1MTUxLCJpYXQiOjE3NTMzNTMzNTEsImp0aSI6IjIzOTEzOGU5LTQ2NjEtNDMzMS1hZjNkLWM1NGJmMzhkODYxZCJ9.STIjWmbDAqInfbXkMGqXeSYXB7Y0Vpo0jOqTylHw0BM
This is your JwtAccessBearer value and will authenticate against protected endpoints. Either paste into the padlock icon on the docs page or include in future curl requests, like below:
curl -X 'GET' \
'https://rolodex.aucourant.co.uk/auth/protected' \
-H 'accept: application/json' \
-H "Authorization: Bearer $ACCESS_TOKEN"
Token Expiry
The access tokens expire after 30 minutes.
Create a Person
This is just a prototype, so the data model is incomplete, but a persons can be created with first name, last Name and email address; this will be reflected in both Salesforce and the PowerApp.
External Identifiers
Will be posted back via events from the adapters to the data product. This allows clear identification of the alias in the external system.
Updates to these details will be reflected in Salesforce but not the PowerApp. This is just implementation detail
Update a Person
Changes will be reflected in Salesforce; Dynamics does not yet handle the PersonUpdated event.
Party Id
Party Id is needed; it was returned in the POST or can be retrieved via a GET
Delete a Person
Changes will be reflected in both Salesforce and Dynamics.
Create an Organisation
Organisations created on this API will be reflected as Salesforce Accounts.
Update an Organisation
Updates to Organisation name will be reflected in Salesforce.
Delete an Organisation
DELETE /organisations/{party_id}
Deleting an Organisation will be reflected in Salesforce.