Platform Trigger queue event services (Early Adopter)
Use Platform Trigger queue event services to learn about the trigger events queued in your company. You can retrieve a count, retrieve message batches, and post acknowledgements of trigger events.
Create a Platform Event Queue Trigger
- Follow the instructions to create a trigger as you normally do using the steps in Add Platform triggers to automate tasks .
- Ensure you select Event queue as your trigger type.
- When defining the trigger type properties, add your client ID information. You can obtain a client ID by following the instructions in the REST developer quick start .
- Define the remainder of your property details.
In addition to creating an event queue trigger, make sure to create an HTTP post trigger using a webhook. See Add Platform triggers to automate tasks and Outbound webhooks (Early Adopter).
Retrieve count of events queued
To retrieve a count of the events queued, use the following syntax in the URI:
-
URI
https://{hostname}/ia/api/v1/services/delivery/event/count
- HTTP method : GET
For example, you could use something similar to the following cURL command to get a count of stored trigger events queued:
curl --location 'https://api.intacct.com/ia/api/v1/services/delivery/event/count` \
--header 'Authorization: Bearer {{your_authorization_token}}' \
--header 'Cookie: DFT_LOCALE=en_US.UTF-8' \
Your response might look something like this:
{
"ia::result": {
"count": 1
},
"ia::meta": {
"totalCount": 1,
"totalSuccess": 1,
"totalError": 0
}
}
Retrieve batch of events queued
To retrieve a batch of events queued, use the following syntax in the URI:
-
URI
https://{hostname}/ia/api/v1/services/delivery/event/list
- HTTP method : GET
Here the cURL example retrieves a batch of queued trigger events:
curl --location 'https://api.intacct.com/ia/api/v1/services/delivery/event/list` \
--header 'Authorization: Bearer {{your_authorization_token}}' \
--header 'Cookie: DFT_LOCALE=en_US.UTF-8' \
Response:
{
"ia::result": {
"events": [
{
"clientContext": "eyAib2JqZWN0IiA6ICJiaWxsIiwgImV2ZW50IiA6ICJhZnRlci5jcmVhdGUiLCAia2V5IiA6ICIxMjM0NSIgOiAiaWQiIDogIkIxMjM0IiB9",
"contentType": "application/json",
"eventId": "b61f5df7-cf8d-4e2c-99a1-bb38cddff413",
"eventType": "pull",
"payload": "ewogICAgIm9yZGVySWQiOiAiMTIzNDUiLAogICAgImN1c3RvbWVyTmFtZSI6ICJKb2huIERvZSIsCiAgICAidG90YWxBbW91bnQiOiA5OS45OQp9"
}
],
"ackId": "88ae4084-c468-4bbb-92f9-131fc0633292"
},
"ia::meta": {
"totalCount": 1,
"totalSuccess": 1,
"totalError": 0
}
}
Post acknowledgment of events queued
To post acknowledgment of events queued, use the following syntax in the URI:
-
URI
https://{hostname}/ia/api/v1/services/delivery/event/ack
- HTTP method : POST
The following cURL example posts an acknowledgment of receipt of the events specified in the batch.
curl --location 'https://api.intacct.com/ia/api/v1/services/delivery/event/ack` \
--header 'Authorization: Bearer {{your_authorization_token}}' \
--header 'Cookie: DFT_LOCALE=en_US.UTF-8' \
Response:
{
"ia::result": {
"ackId": "88ae4084-c468-4bbb-92f9-131fc0633292",
"status": "success"
},
"ia::meta": {
"totalCount": 1,
"totalSuccess": 1,
"totalError": 0
}
}