Registration

This section details how to accept an invite. The invite link is a unique URL that can be sent via email, text message or any other means.

  1. Invitee clicks "ACCEPT" email
  2. Ecom validates email OR fetches the invite email from the API using Invite ID
  3. If no invite exists, or email is incorrect SFCC displays appropriate error
  4. User completes registration form within SFCC and customer is created
  5. SFCC calls out to invites/accept with the customers SFCC ID
  6. Invites creates profile in Omneo with SFCC ID
  7. SFCC sends customer to SFCRM, SFCRM sends to Omneo and a match is made (find where SFCC ID = X and update)

Accepting the invite by url

This endpoint redirects the user to the external registration page to finalise their invitation. The API will append an invite_id query string to indicate the invitation ID.

GET https://invites.com/invites/{inviteId}

Response:

301 REDIRECT 
https://example.org/register?invite_id={inviteId}&e={url encoded base64 email}

Additional state can be appended to the end of the URL if needed, e.g:

Request:

GET https://invites.com/invites/{inviteId}?utm_campaign=XXX&utm_source=XXX

Response:

301 REDIRECT
https://example.org/register?invite_id={inviteId}&utm_campaign=XXX&utm_source=XXX

Registration page prefills the registration form details

At this point the registration page can either callout to the API for the full invite payload OR validate the email passed in the URL.

Authorizing your request

Authorization: Bearer headers are required where noted in the example requests. Most endpoints require authorization with the exception of the public invite redirect link.

Tokens do not expire and are string literals.

To get started, request a new access token from Omneo Support support@omneo.io.

Validate email

POST {api_url}/v1/invites/{inviteId}/validate

{
	"recipient_email": "recipient@example.org"
}

Response:

200 OK

Retrieve invite

GET {api_url}/v1/invites/{inviteId}

Response:

{
	"data": {
		"recipient_email": "recipient@example.org"
		...
	}
}

Registration page finalises registration

The external registration page must now callback to the invites API to accept the invite.

There are a few things to note here:

  • The registration should fail if the API returns a non 200 status code.
  • The callback payload must contain the email of the recipient for validation. This is in-case the customer was able to alter their email at registration.
  • The callback payload must contain other form details including first name, last name and email opt-in status
  • The callback payload must include the ID of the customer created in the external system (e.g. Salesforce Commerce Cloud ID)
POST {api_url}/v1/invites/{inviteId}/accept

{
	"recipient_email": "recipient@example.org",
	"recipient_external_id": "XXX",
	"first_name": "John",
	"last_name": "Citizen",
	"email_promo": true
}

Response:

202 ACCEPTED

At this point the customer is now queued for creation in Omneo with an attached identity (recipient_external_id)