{receptor phone}: the phone number where the message will be sent. This phone number must carry the country international prefix
{API key}: the AI worker API key. This automatically sets the phone number form where the message will be sent as the worker if the worker is connected to a Whatsapp channel. Create an API KEY here.
{WPP API provider}: now all of new implementations should use “wa-cloud” which means the client is directle using WPP API through META and not through a BSP (Business SOlution Provider) as for example Gupshup. You may see many implenetations with “wa-gupshup”.
{pipeline ID}: is the pipeline ID, which you can get from the URL when selecting a pipeline in the ‘Pipelines’ section. For example, in the URL: [
https://app.getdarwin.ai/agent/1805/pipelines/2064](<https://app.getdarwin.ai/agent/1805/pipelines/2064>)
The number 2064 is the pipeline ID (and 1805 is the agent ID){template id}: the id of the message template. A message sent by API as an outbound message must be templatized, meaning that a tempalte must be created and Meta has to approve it.
{bodyParams}: array of strings containing the values that replace the variable parameters in the template body. The order must match the order of the template placeholders. For example, if the template body has {{1}} and {{2}}, then bodyParams[0] replaces {{1}} and bodyParams[1] replaces {{2}}.
{buttonsParams}: array of strings containing the values that replace the dynamic parameters in the template buttons, if any. It is used, for example, when the template has a dynamic URL button or an OTP copy-code button. The order must match the order of the dynamic buttons configured in the template. If the template does not have dynamic buttons, this field can be omitted.
{param x value}: are the values of the parameters of the template if the template has parameters (variable fields, such as for example a name, date and time).
Important: bodyParams and buttonsParams must be sent as real JSON arrays, not as comma-separated text.
Correct: "bodyParams": ["John", "3pm tomorrow"]
Incorrect: "bodyParams": "John,3pm tomorrow"
The Source Object
{datax} and {datax value}
The object “source” is not required. It is only necessary is we want that message to carry some “hidden” information. I say “hidden” because it is information not explicited in the template. It mains purpose as it names says it to describe the source of the message, so the filed utm_source is required if the source object exists. What type of data can also be sent in this object:
utm_medium: used to describe the medium from where the lead comes from (e.g: Facebook, Google, etc).
utm_campaign: used to describe the campign from where the lead comes.
Anyways, the product already picks up automatically if a lead comes from a Facebook ad or from an Instagram ad.
But, in this source object we can also create personalized fields where we can send data that might be useful to have in the conversation.
For example we can set the following:
“contact_id”: 3523
“contact_interest”: “Cars”
We can pick up this values in the state machine using the following place holders:
{session.source_parameters.contact_id}
{session.source_parameters.contact_interest}
The first value might be useful for an API request later in the conversation and the second value might be useful to start the converation and drive to an specific direction.


