module Selligent::Client::Transactionals
Implements the transactional endpoints
/organizations/:organization/journeys/transactional/*
Public Instance Methods
Sends (multiple) transactional messages (email, mobile push, sms)
The model has the following shape:
{
items: [ recipient: "info@example.com", language: "EN', data: {}, dtsdata: [ { data_selection: "DTS1", content: [ { id: "AB" }, { id: "CD" } ] } ] ]
}
@param api_name [String] The name of the execution that should be sent @param model [Hash] The model containing the data that should be sent @option model [Array] :items The send requests
# File lib/selligent/client/transactionals.rb, line 49 def send_transactional(api_name, model) post "#{base_url}/journeys/transactional/#{api_name}/send", model end
Returns information on the transactional journey with the given api name.
@param api_name [String] The api name
# File lib/selligent/client/transactionals.rb, line 17 def transactional(api_name) get "#{base_url}/journeys/transactional/#{api_name}" end
Returns a transactional-status-object for the transactional journey with the given id on the given organization.
@param id [String] The message id
# File lib/selligent/client/transactionals.rb, line 110 def transactional_status(id) get "#{base_url}/journeys/transactional/status/#{id}" end
Returns a list of the transactional journeys defined on the organization.
# File lib/selligent/client/transactionals.rb, line 10 def transactionals get "#{base_url}/journeys/transactional" end
Returns a list of transactional-status-objects for the messages that correspond to the list of guids that is submitted, for the transactional journeys defined on the given organization.
@param ids [Array<String>] The message identifiers
# File lib/selligent/client/transactionals.rb, line 102 def transactionals_status(ids) post "#{base_url}/journeys/transactional/status", ids end
Create and/or update a user profile and then trigger the transactional message with the given api-name on the given organization.
The model has the following shape:
{
items: [ { recipient: "fff", language: "EN", profile: [ { scope: "MASTER", fields: { "Name": "John", "LastName": "Smith" } } ], data: {}, dtsdata: [ { data_selection: "DTS1", content: [ { id: "AB" }, { id: "CD" } ] } ] } ]
}
@param api_name [String] The name of the execution that should be sent @param model [Hash] The model containing the data that should be sent @option model [Array] :items The request bodies
# File lib/selligent/client/transactionals.rb, line 93 def update_profile_and_send_transactional(api_name, model) post "#{base_url}/journeys/transactional/shortcut/#{api_name}/updateProfileAndSend", model end