mautic / mautic/api-library

Creating campaign via API call with parameter triggerDate returns error but campaign is created !!!

Open
#182 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
205
Forks
129
PR merge metrics
No merged PRs in 30d

Description

I am trying to create a campaign via api, i tried to implement triggerDate and triggerMode 'date' but i get an error (i cleared cashe)

the load is the above

           $this->load = array(
            'name' => 'test',
            'description' => 'desc',
            'isPublished' => 1,
            //segment
            'lists' => [
                [
                    'id' =>10,
                    'children' => ['new_44'],
                ]
            ],
            'events' => array(
                array(
                    'id' => 'new_44', // Event ID will be replaced on /new
                    'name' =>'test',
                    'description' => 'test',
                    'type' => 'email.send',
                    'eventType' => 'action',
                    'order' => 1,
                    'properties' => array(
                        'email' =>1,
                        'email_type' => 'transactional',
                    ),
                    'triggerDate' => '2019-01-10 14:00:00',
                    'triggerInterval' => 0,
                    'triggerIntervalUnit' => null,
                    'triggerMode' => 'date',
                    'children' => null,
                    'parent' => 'lists',
                    'decisionPath' => 'no',
                )
            ),
            'forms' => array(),
            'canvasSettings' => array(
                'nodes' => array(
                    array(
                        'id' => 'new_44', // Event ID will be replaced on /new
                        'positionX' => '433',
                        'positionY' => '348',
                    ),
                    array(
                        'id' => 'lists',
                        'positionX' => '629',
                        'positionY' => '65',
                    ),
                ),
                'connections' => array(
                    array(
                        'sourceId' => 'lists',
                        'targetId' => 'new_44', // Event ID will be replaced on /new
                        'anchors' => array(
                            'source' => 'leadsource',
                            'target' => 'top',
                        )
                    ),
                )
            )

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the campaign creation API call with the supplied triggerDate and triggerMode parameters, recording the error response and the resulting campaign. Trace the campaign API handling for these parameters and verify that a successful creation does not return an error while preserving the requested scheduling values.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.